diff options
author | Benjamin Otte <otte@redhat.com> | 2012-03-09 13:20:41 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-03-09 13:23:05 +0100 |
commit | 114b45c7ebb03b6b63dcbb51855d5ea87f634171 (patch) | |
tree | a23397e6260d50f2aaedb9b48823268d9a5175fc /gdk/win32 | |
parent | 50e3f532b93f7d7eb755804a80c69eac79ca078e (diff) | |
download | gtk+-114b45c7ebb03b6b63dcbb51855d5ea87f634171.tar.gz |
gdk: Make query_state() vfunc a void vfunc
... and make sure the backends implement it that way.
query_state() return value was ignored in all of GDK and caused crashes
when it failed.
Diffstat (limited to 'gdk/win32')
-rw-r--r-- | gdk/win32/gdkdevice-win32.c | 4 | ||||
-rw-r--r-- | gdk/win32/gdkdevice-wintab.c | 22 |
2 files changed, 12 insertions, 14 deletions
diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c index 6bdd7e31c8..e3d8106ca2 100644 --- a/gdk/win32/gdkdevice-win32.c +++ b/gdk/win32/gdkdevice-win32.c @@ -238,7 +238,7 @@ get_current_mask (void) return mask; } -static gboolean +static void gdk_device_win32_query_state (GdkDevice *device, GdkWindow *window, GdkWindow **root_window, @@ -303,8 +303,6 @@ gdk_device_win32_query_state (GdkDevice *device, if (mask) *mask = get_current_mask (); - - return TRUE; } static GdkGrabStatus diff --git a/gdk/win32/gdkdevice-wintab.c b/gdk/win32/gdkdevice-wintab.c index 122787d3dc..0a4474229d 100644 --- a/gdk/win32/gdkdevice-wintab.c +++ b/gdk/win32/gdkdevice-wintab.c @@ -52,15 +52,15 @@ static void gdk_device_wintab_warp (GdkDevice *device, GdkScreen *screen, gint x, gint y); -static gboolean gdk_device_wintab_query_state (GdkDevice *device, - GdkWindow *window, - GdkWindow **root_window, - GdkWindow **child_window, - gint *root_x, - gint *root_y, - gint *win_x, - gint *win_y, - GdkModifierType *mask); +static void gdk_device_wintab_query_state (GdkDevice *device, + GdkWindow *window, + GdkWindow **root_window, + GdkWindow **child_window, + gint *root_x, + gint *root_y, + gint *win_x, + gint *win_y, + GdkModifierType *mask); static GdkGrabStatus gdk_device_wintab_grab (GdkDevice *device, GdkWindow *window, gboolean owner_events, @@ -161,7 +161,7 @@ gdk_device_wintab_warp (GdkDevice *device, { } -static gboolean +static void gdk_device_wintab_query_state (GdkDevice *device, GdkWindow *window, GdkWindow **root_window, @@ -172,7 +172,7 @@ gdk_device_wintab_query_state (GdkDevice *device, gint *win_y, GdkModifierType *mask) { - return FALSE; + g_warning ("query_state unimplemented for wintab devices. Expect bad things."); } static GdkGrabStatus |