Conversation
The #133 short-term fix dropped KdeFocusBackend to focus-only because the KWin script could only push the active window in. This follow-up teaches the KWin script + daemon cache to answer enumeration and raise, so KDE honestly re-advertises watch_windows / raise_window / raise_app. Grounded in a primary-source pass over KWin master (windowList(), writable workspace.activeWindow, and — the crux — a QTimer global in the script sandbox), the push architecture is extended both directions the outbound-only callDBus constraint allows: - Enumeration inverts to push: the KWin script pushes the full window list (UpdateWindowList) into the same cache the daemon serves back on ListWindows(); the inherited GnomeShellFocusBackend.watch_windows gdbus-poll is answered unchanged. - Raise inverts to enqueue-and-poll: since the daemon can't call into KWin, raise_window / raise_app resolve the id against the daemon's own cached window list and enqueue it; the script drains the queue on a QTimer tick (DrainPendingRaises) and sets workspace.activeWindow. Wire shape stays byte-identical to GNOME: resourceClass -> wm_class, desktopFileName -> sandboxed_app_id, focused-first ordering, 0-based workspace index, retired-id -> RaiseWindowFailed. skipTaskbar is the sole enumeration filter (KDE's native switcher signal), matching GNOME's inclusiveness. Tests: cache/service/backend covered test-first in tests/test_platform_kde.py; the real main.js is driven headless via a node:vm sandbox in the new scripts/test_kwin_focus_bridge.mjs (wired into `just test` / `test-focus-wire`). docs/PLATFORM-PARITY.md flips the KDE column to ✓ (parity test #136 stays green) and documents the inverted plumbing; docs/TESTING.md notes the rows are code-and-CI truth, unverified on hardware. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…#133) Konsole (org.kde.konsole) fell to the default layout because the layout matcher compared identities exactly, and a bare `konsole` token never matched KDE/GNOME's reverse-DNS wm_class. Running-windows labels took the last dotted segment, so org.telegram.desktop labeled 'Desktop' instead of 'Telegram'. - matches_identity also matches the identity's last dotted segment against layout tokens (org.kde.konsole -> konsole); full tokens still match only their own exact identity. - _humanize_identity strips trailing .desktop/.app packaging segments before the last-dotted-segment split. - Tests for both; PLATFORM-PARITY.md KDE bullet updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #133 (field-verification follow-ups).
Changes
Two commits:
feat(kde): window enumeration + raise, reaching GNOME parity (
3a345a7)KWin script pushes the active window + full window list into a daemon-owned
org.deckd.Focus; daemon servesGetActiveWindow/ListWindows, and raise is enqueued-and-polled by the KWin script. Verified live on Plasma 6.5.6 Wayland.fix(layouts): reverse-DNS identity matching + packaging-suffix labels (
c2d5bd2)Two live field bugs found while verifying KDE backend advertises watch_windows/raise_window it can't fulfill #133:
Layout.matches_identitymatched identities exactly, so a barekonsoletoken never matched KDE/GNOME's reverse-DNSwm_class(org.kde.konsole) — Konsole silently fell to the default layout. Now also matches the identity's last dotted segment; full tokens still match only their exact identity._humanize_identitytook the last dotted segment, soorg.telegram.desktoplabeled "Desktop" instead of "Telegram". Now strips trailing.desktop/.apppackaging segments first.Verification
Environment note
On the verification machine, layout buttons (uinput injection) required granting
/dev/uinputaccess (udev rule +inputgroup) — fixed in the separate host config repo, not this PR.