From aa3e968b64b7e0a1db8de86b31435ebd152bc965 Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Wed, 18 Sep 2024 19:07:59 +0200 Subject: [PATCH] Indicate that an app is running on another workspace with a grey dot --- src/App.vala | 2 ++ src/Launcher.vala | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 84986dbe..8edb05bc 100644 --- a/src/Launcher.vala +++ b/src/Launcher.vala @@ -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);