diff --git a/data/Application.css b/data/Application.css index 520d55e1..cbd3b266 100644 --- a/data/Application.css +++ b/data/Application.css @@ -53,3 +53,7 @@ launcher progressbar progress { -gtk-icon-size: 9px; margin-top: -3px; } + +.running-indicator:disabled { + color: @text_color; +} diff --git a/src/App.vala b/src/App.vala index 079ec15a..3d443962 100644 --- a/src/App.vala +++ b/src/App.vala @@ -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) { @@ -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) { diff --git a/src/Launcher.vala b/src/Launcher.vala index 5b826be5..1ea5fce7 100644 --- a/src/Launcher.vala +++ b/src/Launcher.vala @@ -249,7 +249,9 @@ public class Dock.Launcher : Gtk.Box { app.notify["progress-visible"].connect (update_progress_revealer); update_progress_revealer (); - app.notify["running-on-active-workspace"].connect (update_running_revealer); + app.bind_property ("running-on-active-workspace", running_revealer, "sensitive", SYNC_CREATE); + + app.notify["running"].connect (update_running_revealer); update_running_revealer (); var drop_target_file = new Gtk.DropTarget (typeof (File), COPY); @@ -500,6 +502,6 @@ public class Dock.Launcher : Gtk.Box { } private void update_running_revealer () { - running_revealer.reveal_child = !moving && app.running_on_active_workspace; + running_revealer.reveal_child = !moving && app.running; } }