ref: 93cd7ae62c4e65e11aac070661146379ac7f7f08
parent: ec2964253977446f0ff98c9d6277eec94111fbd0
author: Simon Tatham <[email protected]>
date: Sun Jun 21 09:39:54 EDT 2009
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]
--- a/gtk.c
+++ b/gtk.c
@@ -646,6 +646,11 @@
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 @@
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);