Skip to content

Commit

Permalink
Indicate that an app is running on another workspace with a grey dot
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Sep 18, 2024
1 parent aec10aa commit aa3e968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/App.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class Dock.App : Object {
public bool progress_visible { get; set; default = false; }
public double progress { get; set; default = 0; }
public bool prefers_nondefault_gpu { get; private set; default = false; }
public bool running { get { return windows.size > 0; } }
public bool running_on_active_workspace {
get {
foreach (var win in windows) {
Expand Down Expand Up @@ -174,6 +175,7 @@ public class Dock.App : Object {
}

notify_property ("running-on-active-workspace");
notify_property ("running");
}

public AppWindow? find_window (uint64 window_uid) {
Expand Down
3 changes: 2 additions & 1 deletion src/Launcher.vala
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ public class Dock.Launcher : Gtk.Box {

app.bind_property ("progress-visible", progress_revealer, "reveal-child", SYNC_CREATE);
app.bind_property ("progress", progressbar, "fraction", SYNC_CREATE);
app.bind_property ("running-on-active-workspace", running_revealer, "reveal-child", SYNC_CREATE);
app.bind_property ("running", running_revealer, "reveal-child", SYNC_CREATE);
app.bind_property ("running-on-active-workspace", running_revealer, "sensitive", SYNC_CREATE);

var drop_target_file = new Gtk.DropTarget (typeof (File), COPY);
add_controller (drop_target_file);
Expand Down

0 comments on commit aa3e968

Please sign in to comment.