summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-03-03 22:27:11 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-03-03 22:27:11 +0000
commit7a9bec2891e0af67c23c24fd01a299e6a92fae24 (patch)
tree15db6d39491c7bf239dd964384f666978030860b /gtk/gtkmain.c
parent0d898ffc6ac083f1a49c3e161970855e20ff525f (diff)
downloadgdk-pixbuf-7a9bec2891e0af67c23c24fd01a299e6a92fae24.tar.gz
Special case scroll events so that they propagate up the widget heirarchy
Wed Mar 3 17:20:15 2004 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_propagate_event): Special case scroll events so that they propagate up the widget heirarchy when received on insensitive widgets. (#101102, reported by Geoff Reedy)
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 1af4cb1eb..08c49f91b 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2331,8 +2331,17 @@ gtk_propagate_event (GtkWidget *widget,
while (TRUE)
{
GtkWidget *tmp;
-
- handled_event = !GTK_WIDGET_IS_SENSITIVE (widget) || gtk_widget_event (widget, event);
+
+ /* Scroll events are special cased here because it
+ * feels wrong when scrolling a GtkViewport, say,
+ * to have children of the viewport eat the scroll
+ * event
+ */
+ if (!GTK_WIDGET_IS_SENSITIVE (widget))
+ handled_event = event->type != GDK_SCROLL;
+ else
+ handled_event = gtk_widget_event (widget, event);
+
tmp = widget->parent;
g_object_unref (widget);