From f25428b37baf97066bfe6c8dd3b280afbe36988b Mon Sep 17 00:00:00 2001 From: Leonhard Date: Wed, 26 Aug 2026 17:49:38 +0200 Subject: [PATCH] Handle windows that are on all workspaces --- src/WindowSystem/Window.vala | 5 +++++ src/WorkspaceSystem/WorkspaceSystem.vala | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/WindowSystem/Window.vala b/src/WindowSystem/Window.vala index 76dd3159..546cde30 100644 --- a/src/WindowSystem/Window.vala +++ b/src/WindowSystem/Window.vala @@ -11,6 +11,7 @@ public class Dock.Window : GLib.Object { public bool has_focus { get; private set; default = false; } public int workspace_index { get; private set; default = 0; } public int64 time_appeared_on_workspace { get; private set; default = 0; } + public bool on_all_workspaces { get; private set; default = false; } public GLib.Icon icon { get; private set; default = new GLib.ThemedIcon ("application-default-icon"); } @@ -35,6 +36,10 @@ public class Dock.Window : GLib.Object { time_appeared_on_workspace = (int64) properties["time-appeared-on-workspace"]; } + if ("on-all-workspaces" in properties) { + on_all_workspaces = (bool) properties["on-all-workspaces"]; + } + var app_info = new GLib.DesktopAppInfo (app_id); if (app_info != null) { var icon = app_info.get_icon (); diff --git a/src/WorkspaceSystem/WorkspaceSystem.vala b/src/WorkspaceSystem/WorkspaceSystem.vala index 36a8e643..c17ca1d2 100644 --- a/src/WorkspaceSystem/WorkspaceSystem.vala +++ b/src/WorkspaceSystem/WorkspaceSystem.vala @@ -41,6 +41,14 @@ public class Dock.WorkspaceSystem : Object { } foreach (var window in WindowSystem.get_default ().windows) { + if (window.on_all_workspaces) { + foreach (var window_list in workspace_window_list) { + window_list.add (window); + } + + continue; + } + var workspace_index = window.workspace_index; if (workspace_index < 0 || workspace_index >= n_workspaces) {