changeset 107997:d94009e7a0cc

gtkutils.c (xg_event_is_for_scrollbar): Check if grabbed widget is a scrollbar.
author Jan D. <jan.h.d@swipnet.se>
date Tue, 20 Apr 2010 13:38:30 +0200
parents b7a5dd2fb441
children 531d454c3a99
files src/ChangeLog src/gtkutil.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Apr 20 16:27:15 2010 +0900
+++ b/src/ChangeLog	Tue Apr 20 13:38:30 2010 +0200
@@ -1,3 +1,8 @@
+2010-04-20  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* gtkutil.c (xg_event_is_for_scrollbar): Check if grabbed
+	widget is a scrollbar.
+
 2010-04-20  Kenichi Handa  <handa@m17n.org>
 
 	* charset.c (char_charset): Consider Vcharset_non_preferred_head
--- a/src/gtkutil.c	Tue Apr 20 16:27:15 2010 +0900
+++ b/src/gtkutil.c	Tue Apr 20 13:38:30 2010 +0200
@@ -3371,8 +3371,8 @@
                || event->type == MotionNotify))
     {
       /* If we are releasing or moving the scroll bar, it has the grab.  */
-      retval = gtk_grab_get_current () != 0
-        && gtk_grab_get_current () != f->output_data.x->edit_widget;
+      GtkWidget *w = gtk_grab_get_current ();
+      retval = w != 0 && GTK_IS_SCROLLBAR (w);
     }
   
   return retval;