diff options
author | Martin Renold <martinxyz@gmx.ch> | 2013-11-16 01:49:55 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2013-11-16 01:50:53 +0100 |
commit | faf43e2e42e4bae0e4a4a84cfaee4665e75b14dd (patch) | |
tree | 8c69c08ee6febd83411e02bf801bcf0dcac7dd4d /tests/testinput.c | |
parent | f8ba25877d9107bacd59f8a3f3a7b6a19686e7f0 (diff) | |
download | gtk+-faf43e2e42e4bae0e4a4a84cfaee4665e75b14dd.tar.gz |
tests: Make testinput example not compress events
Diffstat (limited to 'tests/testinput.c')
-rw-r--r-- | tests/testinput.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/testinput.c b/tests/testinput.c index 2a2e4cc8ee..45ad366e21 100644 --- a/tests/testinput.c +++ b/tests/testinput.c @@ -256,8 +256,6 @@ motion_notify_event (GtkWidget *widget, GdkEventMotion *event) motion_time = event->time; } - if (event->is_hint) - gdk_device_get_state (event->device, event->window, NULL, NULL); print_axes (event->device, event->axes); update_cursor (widget, event->x, event->y); @@ -299,8 +297,8 @@ main (int argc, char *argv[]) GtkWidget *window; GtkWidget *drawing_area; GtkWidget *vbox; - GtkWidget *button; + GdkWindow *gdk_win; gtk_init (&argc, &argv); @@ -351,7 +349,6 @@ main (int argc, char *argv[]) GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_POINTER_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK | GDK_PROXIMITY_OUT_MASK; gtk_widget_set_events (drawing_area, event_mask); @@ -383,6 +380,10 @@ main (int argc, char *argv[]) gtk_widget_show (window); + /* request all motion events */ + gdk_win = gtk_widget_get_window (drawing_area); + gdk_window_set_event_compression (gdk_win, FALSE); + gtk_main (); return 0; |