Commit 81ffe540 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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)
parent d9204a33
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,
......
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,
......
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,
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment