Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/WindowSystem/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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"); }

Expand All @@ -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 ();
Expand Down
8 changes: 8 additions & 0 deletions src/WorkspaceSystem/WorkspaceSystem.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down