Fix problems with sticky handling (backport of 01320e57737).
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. https://bugzilla.gnome.org/show_bug.cgi?id=746064
This commit is contained in:

committed by
Matthias Clasen

parent
df09ce5e87
commit
ba48b46574
@ -462,7 +462,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);
|
||||
@ -543,7 +543,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