[gtk+/xi2: 1198/1239] Ensure device events are selected for all windows in GdkInputWindow.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 1198/1239] Ensure device events are selected for all windows in GdkInputWindow.
- Date: Tue, 29 Sep 2009 10:58:29 +0000 (UTC)
commit 2df87a720557eed4dd9f6d0f3aa7b425b2fdbc3f
Author: Carlos Garnacho <carlos gnome org>
Date: Sun Sep 20 16:29:15 2009 +0200
Ensure device events are selected for all windows in GdkInputWindow.
gdk/x11/gdkinput.c | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/gdk/x11/gdkinput.c b/gdk/x11/gdkinput.c
index adfd018..a22b86f 100644
--- a/gdk/x11/gdkinput.c
+++ b/gdk/x11/gdkinput.c
@@ -369,21 +369,23 @@ _gdk_input_select_device_events (GdkWindow *impl_window,
"has-cursor", &has_cursor,
NULL);
- if (iw != NULL && mode != GDK_MODE_DISABLED)
+ if (iw == NULL || mode == GDK_MODE_DISABLED)
+ return;
+
+ for (l = iw->windows; l != NULL; l = l->next)
{
- for (l = iw->windows; l != NULL; l = l->next)
- {
- w = l->data;
- if (has_cursor || (w->extension_events & GDK_ALL_DEVICES_MASK))
- event_mask |= w->extension_events;
- }
- }
- event_mask &= ~GDK_ALL_DEVICES_MASK;
+ w = l->data;
+
+ if (has_cursor || (w->extension_events & GDK_ALL_DEVICES_MASK))
+ {
+ event_mask = w->extension_events;
- if (event_mask)
- event_mask |= GDK_PROXIMITY_OUT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK;
+ if (event_mask)
+ event_mask |= GDK_PROXIMITY_OUT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK;
- gdk_window_set_device_events (impl_window, dev, event_mask);
+ gdk_window_set_device_events ((GdkWindow *) w, dev, event_mask);
+ }
+ }
}
static void
@@ -480,7 +482,7 @@ gdk_input_set_extension_events (GdkWindow *window, gint mask,
for (tmp_list = display_x11->input_devices; tmp_list; tmp_list = tmp_list->next)
{
GdkDevice *dev = tmp_list->data;
- _gdk_input_select_device_events (window, dev);
+ _gdk_input_select_device_events (impl_window, dev);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]