Fix problems with sticky handling
Reading a card32 property into a long may lead to undefined high bits, so mask them off. Also, make the conditions for setting and unsetting the stick flag opposites, to avoid unintended changes. Patch by John Lindgren, bug 666842
This commit is contained in:
@ -203,7 +203,7 @@ do_net_wm_state_changes (GdkWindow *window)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (toplevel->have_sticky || toplevel->on_all_desktops)
|
||||
if (toplevel->have_sticky && toplevel->on_all_desktops)
|
||||
gdk_synthesize_window_state (window,
|
||||
0,
|
||||
GDK_WINDOW_STATE_STICKY);
|
||||
@ -284,7 +284,7 @@ gdk_check_wm_desktop_changed (GdkWindow *window)
|
||||
if (type != None)
|
||||
{
|
||||
desktop = (gulong *)data;
|
||||
toplevel->on_all_desktops = (*desktop == 0xFFFFFFFF);
|
||||
toplevel->on_all_desktops = ((*desktop & 0xFFFFFFFF) == 0xFFFFFFFF);
|
||||
XFree (desktop);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user