Skip to content

List XWayland windows through the X server - #118

Open
Avasam wants to merge 2 commits into
Kalmat:masterfrom
Avasam:Wayland-list-XWayland-windows
Open

Avasam wants to merge 2 commits into
Kalmat:masterfrom
Avasam:Wayland-list-XWayland-windows

Conversation

@Avasam

@Avasam Avasam commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

On Wayland, getActiveWindow() and getAllWindows() queried GNOME Shell through gdbus Eval. That fails outside GNOME (e.g. KDE) and on GNOME without unsafe_mode, and even when it works it only returns windows that have an X Window ID. The compositor manages XWayland windows as an X11 window manager, so EWMH on the X server already lists them and tracks the active one.

  • Remove _WgetAllWindows and unused LinuxWindow._currSessionType
  • Drop unsafe_mode instructions from docstrings and README
  • Add test that finds windows without GNOME Shell running

Taken from my own patches in AutoSplit for XWayland support: Toufool/AutoSplit@81ff9bd (#380)

I'm still on X11 myself, but between Ubuntu 26.04's GNOME and KDE Plasma 6.8 completely dropping X11 sessions, this is becoming important.

On Wayland, `getActiveWindow()` and `getAllWindows()` queried GNOME Shell through `gdbus` `Eval`. That fails outside GNOME (e.g. KDE) and on GNOME without `unsafe_mode`, and even when it works it only returns windows that have an X Window ID. The compositor manages XWayland windows as an X11 window manager, so EWMH on the X server already lists them and tracks the active one.

- Remove `_WgetAllWindows` and unused `LinuxWindow._currSessionType`
- Drop `unsafe_mode` instructions from docstrings and README
- Add test that finds windows without GNOME Shell running
@Avasam

Avasam commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Ruff recently changed its list of rules enabled by default to include a lot more !

I'll update all 4 related projects CI over the weekend.

Edit: Ruff on CI wasn't using the lockfile. astral-sh/ruff-action@v4.1.0 can now use the lockfile for ruff version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant