Skip to content

feat: allow talking to KWin for Picture-in-Picture bounds and minimize detection - #8

Merged
D3SOX merged 2 commits into
mainfrom
kwin-talk-name
Nov 8, 2026
Merged

D3SOX merged 2 commits into
mainfrom
kwin-talk-name

Conversation

@D3SOX

@D3SOX D3SOX commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

OpenTubeX remembers the Picture-in-Picture window bounds and detects minimizing on KDE Plasma Wayland through KWin scripts, which it loads over KWin's D-Bus interface. The Flatpak can't reach org.kde.KWin, so those calls fail with ServiceUnknown and both features stay off.

This adds --talk-name=org.kde.KWin to the finish args. The app side, which writes the scripts where KWin can read them and matches sandboxed windows by the Flatpak app ID, is in OpenTubeX/OpenTubeX#2863. The build runs on release and nightly dispatch, so this change takes effect with the next build.

Flathub's linter rejects org.kde.KWin by default (finish-args-kwin-talk-name). This repository publishes to its own remote, so flatpak-builder-lint-exceptions.json exempts only that check, with the reason, and both validate.yml and the release build in build.yml pass it with --exceptions --user-exceptions. The release build gets the file through the prepared manifest artifact, since that job has no checkout.

Proof: flatpak-builder-lint with the exception file and the Python tests pass. A Flatpak built from this manifest with OpenTubeX/OpenTubeX#2863 ran end to end inside a nested kwin_wayland --virtual session on a private D-Bus bus. It loaded both KWin scripts, restored the Picture-in-Picture bounds after reopening and after a restart, and reported minimize to the renderer.

Reviewed with sol-loop: 1 round with gpt-6.1-sol on high.
Sol verdict: approved

Made with Claude Opus 5.5 in Claude Code.

OpenTubeX restores Picture-in-Picture bounds and detects minimizing on KDE Plasma Wayland through KWin scripts, which it loads over KWin's D-Bus interface. Without this name, the calls fail with ServiceUnknown.
This repository publishes to its own remote, so Flathub's default refusal of org.kde.KWin does not apply. A user exception file keeps every other lint error fatal, and the build job gets the file through the prepared manifest artifact.
@D3SOX
D3SOX merged commit a457cc2 into main Nov 8, 2026
6 checks passed
@D3SOX
D3SOX deleted the kwin-talk-name branch November 8, 2026 16:14
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