[gnome-builder] layout: be more relaxed in releasing the sidebar
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] layout: be more relaxed in releasing the sidebar
- Date: Wed, 19 Jul 2017 11:18:23 +0000 (UTC)
commit faed1193573cc9ce4f2301924a58ab1273363c54
Author: Christian Hergert <chergert redhat com>
Date: Thu Jul 13 01:42:54 2017 -0700
layout: be more relaxed in releasing the sidebar
We can be a bit more relaxed by keeping the sidebar visible
when focus enters the header bar and such. Basically, anything
that is not another view.
We don't need to protect against the view going away since we
can rely on getting another call to update focus afterwards.
libide/layout/ide-layout-transient-sidebar.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/libide/layout/ide-layout-transient-sidebar.c b/libide/layout/ide-layout-transient-sidebar.c
index bc14dcc..db91b4b 100644
--- a/libide/layout/ide-layout-transient-sidebar.c
+++ b/libide/layout/ide-layout-transient-sidebar.c
@@ -39,7 +39,6 @@ has_view_related_focus (IdeLayoutTransientSidebar *self)
GtkWidget *focus_view;
GtkWidget *toplevel;
GtkWidget *focus;
- GtkWidget *stack;
g_assert (IDE_IS_LAYOUT_TRANSIENT_SIDEBAR (self));
@@ -73,12 +72,12 @@ has_view_related_focus (IdeLayoutTransientSidebar *self)
if (focus_view && focus_view != GTK_WIDGET (view))
return FALSE;
- /* If the focus has ended up in layout stack, we're okay too */
- stack = dzl_gtk_widget_get_relative (focus, IDE_TYPE_LAYOUT_STACK);
- if (dzl_gtk_widget_is_ancestor_or_relative (focus, stack))
- return TRUE;
+ /* Focus hasn't landed anywhere that indicates to us that the
+ * view definitely isn't visible anymore, so we can just keep
+ * the panel visible for now.
+ */
- return FALSE;
+ return TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]