[gnome-builder] libide/gui: always treat primary workspace as last workspace



commit 422cf63e2afa8b894a085058205d7bb4ad17f1d8
Author: Christian Hergert <chergert redhat com>
Date:   Thu Sep 15 17:45:42 2022 -0700

    libide/gui: always treat primary workspace as last workspace
    
    That way we always unload the project when that workspace is closed.

 src/libide/gui/ide-workbench.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/libide/gui/ide-workbench.c b/src/libide/gui/ide-workbench.c
index 13ecc3fa6..550d098e4 100644
--- a/src/libide/gui/ide-workbench.c
+++ b/src/libide/gui/ide-workbench.c
@@ -2641,6 +2641,10 @@ _ide_workbench_is_last_workspace (IdeWorkbench *self,
   g_return_val_if_fail (IDE_IS_MAIN_THREAD (), FALSE);
   g_return_val_if_fail (IDE_IS_WORKBENCH (self), FALSE);
 
+  /* Always close when primary workspace is closed */
+  if (IDE_IS_PRIMARY_WORKSPACE (workspace))
+    return TRUE;
+
   return self->mru_queue.length == 1 &&
          g_queue_peek_head (&self->mru_queue) == (gpointer)workspace;
 }


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