Repository navigation
KDE-Wayland focus backend (KWin) #31
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestfocus-watcherActive-window / app-awareness detectionActive-window / app-awareness detectionready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
What to build
Implement KdeFocusBackend(PlatformBackend) for KDE Plasma on Wayland, analogous to the existing GnomeShellFocusBackend in daemon/deckd/platform.py. The shape of the backend (D-Bus names, polling cadence, returned AppInfo fields: app_id, wm_class, title, pid) should follow whatever spike #30 decides.
End-to-end behaviour: a user on KDE Plasma Wayland installs the deckd focus counterpart (KWin script or however the spike decides), runs the daemon with no GNOME extension, focuses a window, and the connected client flips to that app's layout automatically. just watch-focus reports sensible output on KDE.
Acceptance criteria
-
KdeFocusBackendexists indaemon/deckd/platform.pyand returns anAppInfowith the same fields the GNOME backend does (app_id/wm_class/title/pidwhere available). -
default_backend()dispatches toKdeFocusBackendon KDE Plasma Wayland sessions (detect viaXDG_CURRENT_DESKTOP=KDE+XDG_SESSION_TYPE=wayland, per the spike). - Backend handles the focus source missing (no script installed) gracefully — log a clear install hint analogous to the GNOME case, do not crash the daemon.
- Tests in
tests/exercise the KDE backend against a faked D-Bus / focus source, mirroring the GNOME backend's test shape. - A
justrecipe (e.g.install-focus-kwinor similar) installs + enables the KWin script / counterpart, mirroringjust install-focus-extension. - The focus-watcher counterpart under
packaging/(e.g.packaging/kwin/) committed, licensed and structured to match repo conventions. - README Focus watcher section updated to describe the KDE install/enable flow +
just watch-focususage on KDE. -
docs/SPIKES.mdcross-references this delivery from the spike entry.
Blocked by
- Spike: KDE-Wayland active-window detection (focus watcher) #30 (Spike: KDE-Wayland active-window detection) — the implementation must use the path the spike decides.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfocus-watcherActive-window / app-awareness detectionActive-window / app-awareness detectionready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity
Promote X11 focus backend to supported (#29)
Spike: KDE-Wayland active-window detection (#30)
KDE Plasma Wayland focus backend (#31)
review (#31): KdeFocusBackend subclasses GnomeShellFocusBackend
jonocodes commentedon Jul 19, 2026
Verified end-to-end on real KDE Plasma 6.5.5 Wayland (aarch64). All acceptance criteria met:
KdeFocusBackendreturnsAppInfowithapp_id/wm_class/title/pid✅default_backend()dispatches onXDG_CURRENT_DESKTOP=KDE+XDG_SESSION_TYPE=wayland✅tests/test_focus.py✅just install-focus-kwinrecipe ✅packaging/kwin-script/deckd-focuscommitted ✅docs/SPIKES.mdcross-reference ✅Live behaviour confirmed:
workspace.windowActivatedfires on real focus changes (Konsole → System Monitor → Firefox) and the client layout follows;just watch-focusreports correct output.Real-hardware testing surfaced one bug in the install recipe (
kpackagetool6 -ufails on a first-ever install) plus aarch64 key-injection gaps — fixed in #34.