diff options
| author | Simon Tatham <anakin@pobox.com> | 2009-06-21 13:39:54 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2009-06-21 13:39:54 +0000 |
| commit | 93cd7ae62c4e65e11aac070661146379ac7f7f08 (patch) | |
| tree | a9e4b62128626ea59f9c916fed9a94f9a6bcdb46 | |
| parent | ec2964253977446f0ff98c9d6277eec94111fbd0 (diff) | |
| download | puzzles-93cd7ae62c4e65e11aac070661146379ac7f7f08.zip puzzles-93cd7ae62c4e65e11aac070661146379ac7f7f08.tar.gz puzzles-93cd7ae62c4e65e11aac070661146379ac7f7f08.tar.bz2 puzzles-93cd7ae62c4e65e11aac070661146379ac7f7f08.tar.xz | |
Patch from Mark Wooding: use gdk_event_request_motions() where
available, which magically seems to eliminate most if not all of the
update lag when dragging a point in a large (say 250-point)
Untangle. I don't fully understand how this works, but it seems to!
[originally from svn r8600]
| -rw-r--r-- | gtk.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -646,6 +646,11 @@ static gint motion_event(GtkWidget *widget, GdkEventMotion *event, if (!midend_process_key(fe->me, event->x - fe->ox, event->y - fe->oy, button)) gtk_widget_destroy(fe->window); +#if GTK_CHECK_VERSION(2,12,0) + gdk_event_request_motions(event); +#else + gdk_window_get_pointer(widget->window, NULL, NULL, NULL); +#endif return TRUE; } @@ -1898,7 +1903,8 @@ static frontend *new_window(char *arg, int argtype, char **error) gtk_widget_add_events(GTK_WIDGET(fe->area), GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_BUTTON_MOTION_MASK); + GDK_BUTTON_MOTION_MASK | + GDK_POINTER_MOTION_HINT_MASK); if (n_xpm_icons) { gtk_widget_realize(fe->window); |