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

DesktopIntegration: Report wether the window is in the current active workspace #1977

Merged
merged 1 commit into from
Jul 10, 2024
Merged
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/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
Loading