Skip to content

Commit

Permalink
DesktopIntegration: Report wether the window is in the current active…
Browse files Browse the repository at this point in the history
… workspace

Allows to differentiate between them on the dock.
  • Loading branch information
tintou committed Jul 9, 2024
1 parent fc9a684 commit 7acfd2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DesktopIntegration.vala
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public class Gala.DesktopIntegration : GLib.Object {
public Window[] get_windows () throws GLib.DBusError, GLib.IOError {
Window[] returned_windows = {};
var apps = Gala.AppSystem.get_default ().get_running_apps ();
var active_workspace = wm.get_display ().get_workspace_manager ().get_active_workspace ();
foreach (unowned var app in apps) {
foreach (weak Meta.Window window in app.get_windows ()) {
if (!is_eligible_window (window)) {
Expand All @@ -74,6 +75,7 @@ public class Gala.DesktopIntegration : GLib.Object {
properties.insert ("client-type", new GLib.Variant.uint32 (window.get_client_type ()));
properties.insert ("is-hidden", new GLib.Variant.boolean (window.is_hidden ()));
properties.insert ("has-focus", new GLib.Variant.boolean (window.has_focus ()));
properties.insert ("on-active-workspace", new GLib.Variant.boolean (window.located_on_workspace (active_workspace)));
properties.insert ("width", new GLib.Variant.uint32 (frame_rect.width));
properties.insert ("height", new GLib.Variant.uint32 (frame_rect.height));

Expand Down

0 comments on commit 7acfd2c

Please sign in to comment.