summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-03-22 17:36:41 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-03-22 17:36:41 +0000
commit81ffe540561161b32878409e90651ba0716c11fe (patch)
tree3136905b5eb9a75b0b73eb4ecf6e3a6b3ae44a5e
parentd9204a33293a360f2209f85d2cc28a8179ba8744 (diff)
downloadgtk+-81ffe540561161b32878409e90651ba0716c11fe.tar.gz
Stop scrolling when the widget is unmapped. (#168791, Ryan Lortie)
2005-03-22 Matthias Clasen <mclasen@redhat.com> * gtk/gtkpathbar.c (gtk_path_bar_unmap): * gtk/gtkspinbutton.c (gtk_spin_button_unmap): * gtk/gtknotebook.c (gtk_notebook_unmap): * gtk/gtkrange.c (gtk_range_unmap): Stop scrolling when the widget is unmapped. (#168791, Ryan Lortie)
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.pre-2-108
-rw-r--r--ChangeLog.pre-2-88
-rw-r--r--gtk/gtknotebook.c5
-rw-r--r--gtk/gtkpathbar.c10
-rw-r--r--gtk/gtkrange.c7
-rw-r--r--gtk/gtkspinbutton.c2
7 files changed, 46 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e2f96a9b19..a6f7d951de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-03-22 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_unmap):
+ * gtk/gtkspinbutton.c (gtk_spin_button_unmap):
+ * gtk/gtknotebook.c (gtk_notebook_unmap):
+ * gtk/gtkrange.c (gtk_range_unmap): Stop scrolling when
+ the widget is unmapped. (#168791, Ryan Lortie)
+
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index e2f96a9b19..a6f7d951de 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,11 @@
+2005-03-22 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_unmap):
+ * gtk/gtkspinbutton.c (gtk_spin_button_unmap):
+ * gtk/gtknotebook.c (gtk_notebook_unmap):
+ * gtk/gtkrange.c (gtk_range_unmap): Stop scrolling when
+ the widget is unmapped. (#168791, Ryan Lortie)
+
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index e2f96a9b19..a6f7d951de 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,11 @@
+2005-03-22 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkpathbar.c (gtk_path_bar_unmap):
+ * gtk/gtkspinbutton.c (gtk_spin_button_unmap):
+ * gtk/gtknotebook.c (gtk_notebook_unmap):
+ * gtk/gtkrange.c (gtk_range_unmap): Stop scrolling when
+ the widget is unmapped. (#168791, Ryan Lortie)
+
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 87e391ce9f..0c42e2003b 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -288,6 +288,9 @@ static gboolean focus_tabs_in (GtkNotebook *notebook);
static gboolean focus_child_in (GtkNotebook *notebook,
GtkDirectionType direction);
+static void stop_scrolling (GtkNotebook *notebook);
+
+
static GtkContainerClass *parent_class = NULL;
static guint notebook_signals[LAST_SIGNAL] = { 0 };
@@ -1119,6 +1122,8 @@ gtk_notebook_unmap (GtkWidget *widget)
{
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
+ stop_scrolling (GTK_NOTEBOOK (widget));
+
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gdk_window_hide (GTK_NOTEBOOK (widget)->event_window);
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index f6dbb02c57..ec00e225d0 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -78,6 +78,7 @@ static void gtk_path_bar_finalize (GObject *object);
static void gtk_path_bar_dispose (GObject *object);
static void gtk_path_bar_size_request (GtkWidget *widget,
GtkRequisition *requisition);
+static void gtk_path_bar_unmap (GtkWidget *widget);
static void gtk_path_bar_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_path_bar_add (GtkContainer *container,
@@ -167,6 +168,7 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
gobject_class->dispose = gtk_path_bar_dispose;
widget_class->size_request = gtk_path_bar_size_request;
+ widget_class->unmap = gtk_path_bar_unmap;
widget_class->size_allocate = gtk_path_bar_size_allocate;
widget_class->style_set = gtk_path_bar_style_set;
widget_class->screen_changed = gtk_path_bar_screen_changed;
@@ -312,6 +314,14 @@ gtk_path_bar_update_slider_buttons (GtkPathBar *path_bar)
}
}
+static void
+gtk_path_bar_unmap (GtkWidget *widget)
+{
+ gtk_path_bar_stop_scrolling (GTK_PATH_BAR (widget));
+
+ GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->unmap (widget);
+}
+
/* This is a tad complicated
*/
static void
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 4be87a6b81..e78446a3a0 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -135,7 +135,7 @@ static void gtk_range_style_set (GtkWidget *widget,
static void update_slider_position (GtkRange *range,
gint mouse_x,
gint mouse_y);
-
+static void stop_scrolling (GtkRange *range);
/* Range methods */
@@ -891,6 +891,8 @@ gtk_range_unmap (GtkWidget *widget)
{
GtkRange *range = GTK_RANGE (widget);
+ stop_scrolling (range);
+
gdk_window_hide (range->event_window);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
@@ -1362,7 +1364,8 @@ update_slider_position (GtkRange *range,
&handled);
}
-static void stop_scrolling (GtkRange *range)
+static void
+stop_scrolling (GtkRange *range)
{
range_grab_remove (range);
gtk_range_remove_step_timer (range);
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 7b263746a2..435470a735 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -521,6 +521,8 @@ gtk_spin_button_unmap (GtkWidget *widget)
{
if (GTK_WIDGET_MAPPED (widget))
{
+ gtk_spin_button_stop_spinning (GTK_SPIN_BUTTON (widget));
+
gdk_window_hide (GTK_SPIN_BUTTON (widget)->panel);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
}