[gtk+] GdkDeviceManagerCore: protect against xevent->xany.window not being a GdkWindow.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GdkDeviceManagerCore: protect against xevent->xany.window not being a GdkWindow.
- Date: Tue, 15 Jun 2010 19:06:57 +0000 (UTC)
commit 07b1a2e081d76fea9cb81d086b73c2049c892156
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 4 16:17:41 2010 +0200
GdkDeviceManagerCore: protect against xevent->xany.window not being a GdkWindow.
Conceivably this GdkEventTranslator may still be asked for events such as
NoExpose or GraphicsExpose for pixmaps. It is not meant to translate such events,
but should at least behave with them.
gdk/x11/gdkdevicemanager-core.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-core.c b/gdk/x11/gdkdevicemanager-core.c
index 0e7b8c3..7d2e9e4 100644
--- a/gdk/x11/gdkdevicemanager-core.c
+++ b/gdk/x11/gdkdevicemanager-core.c
@@ -425,11 +425,11 @@ gdk_device_manager_core_translate_event (GdkEventTranslator *translator,
window = get_event_window (translator, xevent);
window_private = (GdkWindowObject *) window;
- if (window && GDK_WINDOW_DESTROYED (window))
- return FALSE;
-
if (window)
{
+ if (GDK_WINDOW_DESTROYED (window) || !GDK_IS_WINDOW (window))
+ return FALSE;
+
toplevel = _gdk_x11_window_get_toplevel (window);
window_impl = GDK_WINDOW_IMPL_X11 (window_private->impl);
g_object_ref (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]