[gnome-builder] libide/gui: ignore move-to-front unless in queue



commit 5bb6cfad684958da9e3873fd130adf569fed4d4e
Author: Christian Hergert <chergert redhat com>
Date:   Fri Sep 16 12:30:30 2022 -0700

    libide/gui: ignore move-to-front unless in queue
    
    We don't want to add items to the queue that might not be in the grid such
    as IdeTerminalPage found in panels.

 src/libide/gui/ide-workspace.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/libide/gui/ide-workspace.c b/src/libide/gui/ide-workspace.c
index 97853ac0b..fe4e68702 100644
--- a/src/libide/gui/ide-workspace.c
+++ b/src/libide/gui/ide-workspace.c
@@ -1018,6 +1018,10 @@ _ide_workspace_move_front_page_mru (IdeWorkspace *self,
   if (mru_link == priv->page_mru.head)
     return;
 
+  /* Ignore unless the page is already in the MRU */
+  if (g_queue_link_index (&priv->page_mru, mru_link) == -1)
+    return;
+
   g_debug ("Moving %s to front of page MRU",
            G_OBJECT_TYPE_NAME (mru_link->data));
 


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