[gtk+/gtk-3-16] scrolledwindow: reset more Indicator state on ::unmap
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] scrolledwindow: reset more Indicator state on ::unmap
- Date: Fri, 22 May 2015 19:25:12 +0000 (UTC)
commit cef7b4670f8f637194fa93574bd175abe972be54
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri May 22 20:52:17 2015 +0200
scrolledwindow: reset more Indicator state on ::unmap
If a GtkScrolledWindow is just unmapped and promptly mapped again, the
indicators are left in a semi-visible state, so the GdkWindow isn't raised
properly above scrolledwindow content. This inconsistent state went away
the next time the indicator is hidden.
So, reset all state about indicator window visibility, animation
progress and conceil timer on ::unmap, this will be enough to make the
indicators start out hidden like on newly created scrolledwindows.
gtk/gtkscrolledwindow.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 9d073fe..24e9a6f 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -3932,6 +3932,16 @@ indicator_stop_fade (Indicator *indicator)
gtk_widget_remove_tick_callback (indicator->scrollbar, indicator->tick_id);
indicator->tick_id = 0;
}
+
+ if (indicator->conceil_timer)
+ {
+ g_source_remove (indicator->conceil_timer);
+ indicator->conceil_timer = 0;
+ }
+
+ gdk_window_hide (indicator->window);
+ indicator->current_pos = indicator->source_pos = indicator->target_pos = 0;
+ indicator->start_time = indicator->end_time = indicator->last_scroll_time = 0;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]