[gtk+/gtk-3-2] x11: Fix window manager change detection
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-2] x11: Fix window manager change detection
- Date: Sat, 12 Nov 2011 04:09:46 +0000 (UTC)
commit 6a5e53a34a72d7b24839f1492c62d93b56e46d57
Author: Rui Matos <tiagomatos gmail com>
Date: Sat Nov 5 01:36:52 2011 -0400
x11: Fix window manager change detection
Since the wmspec_check_window doesn't have a corresponding GdkWindow we can't
rely on the get_event_window() return value to get the XID from. Just use the
XID from the XEvent directly.
https://bugzilla.gnome.org/show_bug.cgi?id=662953
gdk/x11/gdkdisplay-x11.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 1eb62ff..401406c 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -385,7 +385,6 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkToplevelX11 *toplevel = NULL;
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gboolean return_val;
- Window xwindow = None;
/* Find the GdkWindow that this event relates to.
* Basically this means substructure events
@@ -405,7 +404,6 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
x11_screen = GDK_X11_SCREEN (screen);
toplevel = _gdk_x11_window_get_toplevel (window);
window_impl = GDK_WINDOW_IMPL_X11 (window->impl);
- xwindow = GDK_WINDOW_XID (window);
g_object_ref (window);
}
@@ -432,7 +430,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
screen = gdk_display_get_screen (display, i);
x11_screen = GDK_X11_SCREEN (screen);
- if (x11_screen->wmspec_check_window == xwindow)
+ if (x11_screen->wmspec_check_window == xevent->xdestroywindow.window)
{
x11_screen->wmspec_check_window = None;
x11_screen->last_wmspec_check_time = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]