[gnome-builder] gui: always push new workspaces to head of MRU
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gui: always push new workspaces to head of MRU
- Date: Fri, 22 Mar 2019 23:58:03 +0000 (UTC)
commit b45e7b52da12b0cdfa326fd27e5a7f4bbd9f9fcd
Author: Christian Hergert <chergert redhat com>
Date: Fri Mar 22 16:54:57 2019 -0700
gui: always push new workspaces to head of MRU
This ensures the newly added workspace is the first to be
retrieved from get_current_workspace(). This is more natural
for when performing operations like loading the workbench.
src/libide/gui/ide-workbench.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/gui/ide-workbench.c b/src/libide/gui/ide-workbench.c
index 2a30bf361..83c11cc29 100644
--- a/src/libide/gui/ide-workbench.c
+++ b/src/libide/gui/ide-workbench.c
@@ -783,10 +783,10 @@ ide_workbench_add_workspace (IdeWorkbench *self,
/* Now place the workspace into our MRU tracking */
mru_link = _ide_workspace_get_mru_link (workspace);
- if (gtk_window_has_toplevel_focus (GTK_WINDOW (workspace)))
- g_queue_push_head_link (&self->mru_queue, mru_link);
- else
- g_queue_push_tail_link (&self->mru_queue, mru_link);
+ /* New workspaces are expected to be displayed right away, so we can
+ * just push the window onto the head.
+ */
+ g_queue_push_head_link (&self->mru_queue, mru_link);
/* Update the context for the workspace, even if we're not loaded,
* this IdeContext will be updated later.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]