Revision: 1809
http://geeqie.svn.sourceforge.net/geeqie/?rev=1809&view=rev
Author: nadvornik
Date: 2009-07-28 22:27:24 +0000 (Tue, 28 Jul 2009)
Log Message:
-----------
improved scroll on slower machines
patch by Stanislav Brabec
Modified Paths:
--------------
trunk/src/pixbuf-renderer.c
Modified: trunk/src/pixbuf-renderer.c
===================================================================
--- trunk/src/pixbuf-renderer.c 2009-07-28 22:14:26 UTC (rev 1808)
+++ trunk/src/pixbuf-renderer.c 2009-07-28 22:27:24 UTC (rev 1809)
@@ -3746,6 +3746,13 @@
PixbufRenderer *pr;
gint accel;
+ /* This is a hack, but work far the best, at least for single pointer
systems.
+ * See http://bugzilla.gnome.org/show_bug.cgi?id=587714 for more. */
+ gint x, y;
+ gdk_window_get_pointer (bevent->window, &x, &y, NULL);
+ bevent->x = x;
+ bevent->y = y;
+
pr = PIXBUF_RENDERER(widget);
if (pr->scroller_id)
@@ -3787,6 +3794,11 @@
pr->drag_last_x = bevent->x;
pr->drag_last_y = bevent->y;
+ /* This is recommended by the GTK+ documentation, but does not work
properly.
+ * Use deprecated way until GTK+ gets a solution for correct motion
hint handling:
+ * http://bugzilla.gnome.org/show_bug.cgi?id=587714
+ */
+ /* gdk_event_request_motions (bevent); */
return FALSE;
}
@@ -3819,7 +3831,7 @@
pr->drag_last_y = bevent->y;
pr->drag_moved = 0;
gdk_pointer_grab(widget->window, FALSE,
- GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
+ GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_RELEASE_MASK,
NULL, NULL, bevent->time);
gtk_grab_add(widget);
break;
@@ -3919,7 +3931,7 @@
g_signal_connect(G_OBJECT(pr), "leave_notify_event",
G_CALLBACK(pr_leave_notify_cb), pr);
- gtk_widget_set_events(GTK_WIDGET(pr), GDK_POINTER_MOTION_MASK |
+ gtk_widget_set_events(GTK_WIDGET(pr), GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_LEAVE_NOTIFY_MASK);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn