[gtk+/xi2: 526/1239] Fix fake keyboard grabs on offscreen windows in XI2.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 526/1239] Fix fake keyboard grabs on offscreen windows in XI2.
- Date: Tue, 29 Sep 2009 10:48:35 +0000 (UTC)
commit 9e01476d9a94b1592af8565af22ec7db3e0b6be1
Author: Carlos Garnacho <carlos lanedo com>
Date: Sat Jul 11 22:06:05 2009 +0200
Fix fake keyboard grabs on offscreen windows in XI2.
gdk/x11/gdkdevicemanager-xi2.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 2b78797..c1a3329 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -376,6 +376,7 @@ static void
gdk_device_manager_xi2_event_translator_init (GdkEventTranslatorIface *iface)
{
iface->translate_event = gdk_device_manager_xi2_translate_event;
+ iface->get_event_window = gdk_device_manager_xi2_get_event_window;
}
static void
@@ -923,14 +924,34 @@ gdk_device_manager_xi2_translate_event (GdkEventTranslator *translator,
return return_val;
}
+static gboolean
+is_parent_of (GdkWindow *parent,
+ GdkWindow *child)
+{
+ GdkWindow *w;
+
+ w = child;
+ while (w != NULL)
+ {
+ if (w == parent)
+ return TRUE;
+
+ w = gdk_window_get_parent (w);
+ }
+
+ return FALSE;
+}
+
static Window
gdk_device_manager_xi2_get_event_window (GdkEventTranslator *translator,
XEvent *xevent)
{
+ GdkDeviceManagerXI2 *device_manager;
GdkDisplay *display;
XIEvent *ev;
ev = (XIEvent *) xevent;
+ device_manager = GDK_DEVICE_MANAGER_XI2 (translator);
if (ev->type != GenericEvent || ev->extension != device_manager->opcode)
return None;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]