[gnome-builder] layoutgrid: only update focus from descendants
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] layoutgrid: only update focus from descendants
- Date: Tue, 9 May 2017 01:05:17 +0000 (UTC)
commit 3ce79fbacfcb7592c69e6a9b386cb640b8ca87e2
Author: Christian Hergert <chergert redhat com>
Date: Mon May 8 18:04:51 2017 -0700
layoutgrid: only update focus from descendants
If we get a focus widget that is not a descendant of ours, then ignore
any further processing of the updated focus.
libide/workbench/ide-layout-grid.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/workbench/ide-layout-grid.c b/libide/workbench/ide-layout-grid.c
index 40e04b5..23cdad3 100644
--- a/libide/workbench/ide-layout-grid.c
+++ b/libide/workbench/ide-layout-grid.c
@@ -698,6 +698,13 @@ ide_layout_grid_toplevel_set_focus (GtkWidget *toplevel,
{
GtkWidget *parent = focus;
+ /*
+ * If this focus widget does not belong to us, then we should just
+ * ignore updating any state now.
+ */
+ if (!gtk_widget_is_ancestor (focus, GTK_WIDGET (self)))
+ return;
+
while (parent && !IDE_IS_LAYOUT_STACK (parent))
{
if (GTK_IS_POPOVER (parent))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]