[gnome-builder/wip/gtk4-port: 862/1774] libide/gui: handle non-workspace windows
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 862/1774] libide/gui: handle non-workspace windows
- Date: Mon, 11 Jul 2022 22:31:26 +0000 (UTC)
commit 47725e1b4bb3f8a5667f107eb3f8a5808c60af83
Author: Christian Hergert <chergert redhat com>
Date: Tue May 3 16:02:24 2022 -0700
libide/gui: handle non-workspace windows
src/libide/gui/ide-gui-global.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/gui/ide-gui-global.c b/src/libide/gui/ide-gui-global.c
index d4314bbb5..224898b94 100644
--- a/src/libide/gui/ide-gui-global.c
+++ b/src/libide/gui/ide-gui-global.c
@@ -229,7 +229,11 @@ ide_widget_get_workbench (GtkWidget *widget)
IdeWorkspace *
ide_widget_get_workspace (GtkWidget *widget)
{
+ GtkRoot *root;
+
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- return IDE_WORKSPACE (gtk_widget_get_root (widget));
+ root = gtk_widget_get_root (widget);
+
+ return IDE_IS_WORKSPACE (root) ? IDE_WORKSPACE (root) : NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]