@@ -28,7 +28,10 @@ public class Gala.DesktopIntegration : GLib.Object {
2828
2929 unowned var display = wm. get_display ();
3030 unowned var workspace_manager = display. get_workspace_manager ();
31- workspace_manager. active_workspace_changed. connect (() = > active_workspace_changed ());
31+ workspace_manager. active_workspace_changed. connect (() = > {
32+ active_workspace_changed ();
33+ windows_changed (); // windows have 'on-active-workspace' property that we need to update
34+ });
3235 workspace_manager. workspaces_reordered. connect (() = > windows_changed ());
3336 workspace_manager. workspace_added. connect (() = > windows_changed ());
3437 workspace_manager. workspace_removed. connect (() = > windows_changed ());
@@ -75,6 +78,7 @@ public class Gala.DesktopIntegration : GLib.Object {
7578 public Window [] get_windows () throws GLib .DBusError , GLib .IOError {
7679 Window [] returned_windows = {};
7780 var apps = Gala . AppSystem . get_default (). get_running_apps ();
81+ unowned var active_workspace = wm. get_display (). get_workspace_manager (). get_active_workspace ();
7882 foreach (unowned var app in apps) {
7983 foreach (weak Meta . Window window in app. get_windows ()) {
8084 if (! is_eligible_window (window)) {
@@ -91,6 +95,7 @@ public class Gala.DesktopIntegration : GLib.Object {
9195 properties. insert (" client-type" , new GLib .Variant .uint32 (window. get_client_type ()));
9296 properties. insert (" is-hidden" , new GLib .Variant .boolean (window. is_hidden ()));
9397 properties. insert (" has-focus" , new GLib .Variant .boolean (window. has_focus ()));
98+ properties. insert (" on-active-workspace" , new GLib .Variant .boolean (window. located_on_workspace (active_workspace)));
9499 properties. insert (" workspace-index" , new GLib .Variant .int32 (window. get_workspace (). index ()));
95100 properties. insert (" width" , new GLib .Variant .uint32 (frame_rect. width));
96101 properties. insert (" height" , new GLib .Variant .uint32 (frame_rect. height));
0 commit comments