[gtk+/gtk-3-14] win32: Don't check the position of a NULL device
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] win32: Don't check the position of a NULL device
- Date: Wed, 28 Jan 2015 17:05:13 +0000 (UTC)
commit 765902dbd6a6dc8c1bc832d4081613618d143f1a
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 27 11:24:18 2015 +0000
win32: Don't check the position of a NULL device
This function is given a barely setup GdkEvent, so the GdkDevice field
is still unset, causing warnings and misbehaviors when the position
is queried for it.
Given that the wintab GTK+ code seems to rely somewhat hard on the wintab
device managing the pointer cursor, query the pointer position from the
pointer itself.
https://bugzilla.gnome.org/show_bug.cgi?id=743330
gdk/win32/gdkdevicemanager-win32.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index a645c10..7eba80b 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -886,7 +886,6 @@ _gdk_input_other_event (GdkEvent *event,
GdkDeviceManagerWin32 *device_manager;
GdkDeviceWintab *source_device = NULL;
GdkDeviceGrabInfo *last_grab;
- GdkDevice *device = NULL;
GdkEventMask masktest;
guint key_state;
POINT pt;
@@ -908,9 +907,7 @@ _gdk_input_other_event (GdkEvent *event,
}
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (_gdk_display));
-
- device = gdk_event_get_device (event);
- window = gdk_device_get_window_at_position (device, &x, &y);
+ window = gdk_device_get_window_at_position (device_manager->core_pointer, &x, &y);
if (window == NULL)
window = _gdk_root;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]