[gtk+/xi2-playground: 5/15] 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+/xi2-playground: 5/15] GdkDeviceManagerCore: protect against xevent->xany.window not being a GdkWindow.
- Date: Tue, 8 Jun 2010 17:42:19 +0000 (UTC)
commit 8ca308315dbbdefc60bbc8c4b6b03c594ca4929f
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]