]> git.eshelyaron.com Git - emacs.git/commitdiff
Make jump scroll work with Gtk+
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 1 Jun 2014 18:00:56 +0000 (20:00 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 1 Jun 2014 18:00:56 +0000 (20:00 +0200)
* xterm.c (xg_scroll_callback): Remove position, for jump set portion
to min(value, whole).

src/ChangeLog
src/xterm.c

index 23027c38c733b3f783f22db9a10a9ec34c080f0e..781e29dd30816a42fea8533650f51d3aa2812d9c 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-01  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (xg_scroll_callback): Remove position, for jump set portion
+       to min(value, whole).
+
 2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        Bring back the changes to GDB-visible symbols, but only on AIX.
index d4bb2256d3b17dca7159a09842ff91e93b979da2..ed98fb10b898c1107ced99bbf61c3ec34ff49fcc 100644 (file)
@@ -4441,14 +4441,11 @@ xg_scroll_callback (GtkRange     *range,
                     gpointer      user_data)
 {
   struct scroll_bar *bar = user_data;
-  gdouble position;
   int part = -1, whole = 0, portion = 0;
   GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range));
   struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA);
 
   if (xg_ignore_gtk_scrollbar) return FALSE;
-  position = gtk_adjustment_get_value (adj);
-
 
   switch (scroll)
     {
@@ -4460,7 +4457,7 @@ xg_scroll_callback (GtkRange     *range,
           part = scroll_bar_handle;
           whole = gtk_adjustment_get_upper (adj) -
             gtk_adjustment_get_page_size (adj);
-          portion = min ((int)position, whole);
+          portion = min ((int)value, whole);
           bar->dragging = portion;
         }
       break;