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]
This commit is contained in:
Simon Tatham
2009-06-21 13:39:54 +00:00
parent ec29642539
commit 93cd7ae62c

8
gtk.c
View File

@ -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);