From: Jan Djärv Date: Wed, 15 Dec 2004 21:34:14 +0000 (+0000) Subject: * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before X-Git-Tag: ttn-vms-21-2-B4~3248 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fecad3f6597e12724d2329354905a99450347d0c;p=emacs.git * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before returning when xg_ignore_gtk_scrollbar is true. --- diff --git a/src/ChangeLog b/src/ChangeLog index 84955d3b0ff..abeef641313 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-12-15 Jan Dj,Ad(Brv + + * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before + returning when xg_ignore_gtk_scrollbar is true. + 2004-12-14 Kim F. Storm * keyboard.c (read_char): Save and restore echo_string when diff --git a/src/xterm.c b/src/xterm.c index d4841f75c28..0f78ba66efa 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4283,8 +4283,6 @@ xg_scroll_callback (widget, data) int part = -1, whole = 0, portion = 0; GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (widget)); - if (xg_ignore_gtk_scrollbar) return; - position = gtk_adjustment_get_value (adj); p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); @@ -4298,6 +4296,8 @@ xg_scroll_callback (widget, data) previous = *p; *p = position; + if (xg_ignore_gtk_scrollbar) return; + diff = (int) (position - previous); if (diff == (int) adj->step_increment) @@ -4329,7 +4329,7 @@ xg_scroll_callback (widget, data) } if (part >= 0) - { + { window_being_scrolled = bar->window; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, portion, whole);