Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate that an app is running on another workspace with a grey dot #270

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
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