summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-07-25 23:53:15 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-25 23:53:15 +0000
commit7ecccfdcb4995d1f32a4c4d3374b9a880d14b329 (patch)
tree3a67da186d782f3635732bdcc6a0d490da58d3f5
parent92295447cb49bf909dcf4229b3be05dc10311066 (diff)
downloadgtk+-7ecccfdcb4995d1f32a4c4d3374b9a880d14b329.tar.gz
Ignore scroll events from the content of the page. (#148409, Gabriel de
Sun Jul 25 19:51:17 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll events from the content of the page. (#148409, Gabriel de Perthuis)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gtk/gtknotebook.c13
5 files changed, 37 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a1c1a72f90..0c3e2677e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+ events from the content of the page. (#148409, Gabriel
+ de Perthuis)
+
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index a1c1a72f90..0c3e2677e8 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+ events from the content of the page. (#148409, Gabriel
+ de Perthuis)
+
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index a1c1a72f90..0c3e2677e8 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+ events from the content of the page. (#148409, Gabriel
+ de Perthuis)
+
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index a1c1a72f90..0c3e2677e8 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+ events from the content of the page. (#148409, Gabriel
+ de Perthuis)
+
Sat Jul 24 21:38:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 751c0ae0b3..88d6091042 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1767,6 +1767,19 @@ gtk_notebook_scroll (GtkWidget *widget,
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
+ GtkWidget* child;
+ GtkWidget* originator;
+
+ if (!notebook->cur_page)
+ return FALSE;
+
+ child = notebook->cur_page->child;
+ originator = gtk_get_event_widget ((GdkEvent *)event);
+
+ /* ignore scroll events from the content of the page */
+ if (!originator || gtk_widget_is_ancestor (originator, child))
+ return FALSE;
+
switch (event->direction)
{
case GDK_SCROLL_RIGHT: