multiwindow support for _NET_WM_STATE_SKIP_TASKBAR

Jon TURNEY jon.turney@dronecode.org.uk
Thu Jan 15 17:11:00 GMT 2009


Jon TURNEY wrote:
> Jon TURNEY wrote:
>> Yes, I see the same behaviour.  When I looked into this, it seems to 
>> be because the taskbar doesn't re-evaluate if the window should be in 
>> it or not when the style is changed, but only when a ShowWindow() occurs.
> 
> Attached is an updated version of this patch which fixes that problem, 
> but the changes involved are rather larger than I'm happy with.
> 
> This patch re-arranges the sequence of events at window creation so we 
> check all the styles before we first show the window (which is good)
> 
> However, it then exposes another problem: at the moment we only do this 
> window styling at window creation time, if the hinting properties are 
> updated after the window is shown, we don't use them.
> 
> This is accidentally demonstrated in the small test case posted 
> previously as XMapWindow() occurs before XChangeProperty(): reverse the 
> order and window is reliably styled correctly, but as it stands it is 
> timing sensitive as to if the XChangeProperty() takes effect before or 
> after we show the window...
> 
> So, I've added some more code to use the PropertyNotify event to watch 
> for hint changes, but as written this is very inefficient, so needs more 
> work...

Attached is an updated version of this patch, which does override-redirect 
windows more correctly, and is a bit more careful about checking that the 
PropertyNotify event is of interest before sending the WM_WM_HINTS_EVENT 
message to update the style.

One thing I can't get to work correctly and efficiently is supporting windows 
which turn the NET_WM_STATE_SKIP_TASKBAR state on or off after the window is 
created.  It seems this needs some code to conditionally hide/show the window 
depending on if the corresponding WS_ bits are changing, but the correct 
sequence of events to get this to work eludes me at the moment.

Note that for e.g. the gmplayer control panel constantly updates it's 
WM_NORMAL_HINTS whilst is being moved around the screen so it's no good to 
unconditionally hide and then show the window on every property change, this 
leads to a really unpleasant flickering.

(The attached test program also shows another problem with the 
NET_WM_STATE_SKIP_TASKBAR property change: the size of the window isn't 
adjusted correctly to keep the client area the same, but I this think may just 
be a problem that ValidateSizing() doesn't understand the WS_EX_TOOLWINDOW 
style correctly...)

So, this still needs more testing and work...

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 1.5-hint-handling-skip-taskbar.patch
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20090115/18d09e0b/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: skip_taskbar_toggle.c
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20090115/18d09e0b/attachment.c>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


More information about the Cygwin-xfree mailing list