From 3b3ff549644a1e136567f8a48c596b9800fa8f63 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 4 Aug 2026 14:56:37 -0600 Subject: [PATCH] feat(packaging): ship an optional KWin rule to keep the miniplayer above MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Measured, not assumed: under XWayland the same Qt hint DOES set _NET_WM_STATE_ABOVE and KWin honours it, so always-on-top is not impossible — it is only impossible for the app to ASK for it on Wayland, where no such request exists in the core protocol. So the app stops claiming it can pin itself and instead ships the thing that works: a window rule matching the miniplayer by its stable, never-translated title, narrowed by wmclass so no other app's window picks it up. The main window is titled "QBZ", which is why the title match is exact rather than a substring. OPTIONAL and never applied by an installer. It is the user's window manager and their configuration; a package that silently rewrote kwinrulesrc would be a worse citizen than one that ships a file and a sentence of documentation. The rationale, the two rejected routes and the import steps are in qbz-nix-docs/qt-frontend/2026-08-04-miniplayer-keep-above-kwin.md. cc --- .../linux/qbz-miniplayer-keep-above.kwinrule | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packaging/linux/qbz-miniplayer-keep-above.kwinrule diff --git a/packaging/linux/qbz-miniplayer-keep-above.kwinrule b/packaging/linux/qbz-miniplayer-keep-above.kwinrule new file mode 100644 index 000000000..cf0751312 --- /dev/null +++ b/packaging/linux/qbz-miniplayer-keep-above.kwinrule @@ -0,0 +1,20 @@ +[General] +count=1 +rules=qbz-miniplayer-keep-above + +[qbz-miniplayer-keep-above] +Description=QBZ miniplayer — keep above other windows +# Match the miniplayer by its window title, which is a stable literal the app +# never translates (qml/miniplayer/MiniWindow.qml: title: "QBZ Mini Player"). +# The main window is titled "QBZ", so a substring match would catch both — +# this is an EXACT match on purpose. +title=QBZ Mini Player +titlematch=1 +# Restrict to QBZ, so a stray window from another app with the same title +# cannot pick the rule up. +wmclass=com.blitzfc.qbz +wmclasscomplete=false +wmclassmatch=1 +# 2 = Force. The window has no say and cannot toggle it off. +above=true +aboverule=2