[gnome-builder/wip/gtk4-port] libide/gui: keep tests working



commit 38bbacaeb1c723113e0bde7b64a7b9e8b2723b64
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 6 09:23:10 2022 -0700

    libide/gui: keep tests working

 src/libide/gui/ide-shortcut-bundle.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/gui/ide-shortcut-bundle.c b/src/libide/gui/ide-shortcut-bundle.c
index 4331a0a8e..89f54981a 100644
--- a/src/libide/gui/ide-shortcut-bundle.c
+++ b/src/libide/gui/ide-shortcut-bundle.c
@@ -127,7 +127,9 @@ ide_shortcut_activate (GtkWidget *widget,
       IdeWorkbench *workbench = ide_widget_get_workbench (widget);
       IdePage *page = workspace ? ide_workspace_get_most_recent_page (workspace) : NULL;
 
-      focus = gtk_root_get_focus (GTK_ROOT (workspace));
+      if (GTK_IS_ROOT (widget))
+        focus = gtk_root_get_focus (GTK_ROOT (widget));
+
       if (focus == NULL)
         focus = widget;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]