[gtk+] Fix problems with sticky handling
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix problems with sticky handling
- Date: Wed, 28 Dec 2011 16:24:39 +0000 (UTC)
commit 01320e5773768827b5754470d3ed52392151f67a
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 28 11:20:47 2011 -0500
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
gdk/x11/gdkdisplay-x11.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 02a7968..49ddb6b 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]