feat(windows): miniplayer keep-on-top, Windows only
A deliberate per-platform divergence, not a revert of ruling K1. That ruling removed always-on-top because the owner smoked it on real Plasma Wayland and the hint did nothing: a Wayland client cannot raise itself above other clients, there is no such request in the core protocol, and Qt had nothing to send. On Windows the same hint IS HWND_TOPMOST and does exactly what it says, so the pin exists where the window manager can honour it and stays absent where it cannot. Owner decision D8. `Qt::WindowStaysOnTopHint` is applied by SetWindowPos on the existing HWND, so toggling it does not recreate the native window and costs neither the geometry nor the transparent surface. The capsule already reserved the slot, and Qt Rows omit invisible children, so the Linux and macOS layouts are byte-identical. Session-scoped by design: the pin does not survive a restart. cc
This commit is contained in:
2 files changed
+28
-1
No files matched your search
@@ -43,7 +43,20 @@ Window {
|
||||
// clients — there is no such request in the core protocol; it takes a
|
||||
// compositor policy or a KWin rule, and Qt has nothing to send. The owner
|
||||
// chose removal over a button that lies.
|
||||
// WINDOWS ONLY, owner decision D8 (2026-08-27), reversing nothing about
|
||||
// K1: that ruling removed always-on-top because the owner smoked it on
|
||||
// real Plasma Wayland and the hint did nothing -- a Wayland client cannot
|
||||
// raise itself above other clients, there is no such request in the core
|
||||
// protocol, and Qt had nothing to send. On Windows the same hint IS
|
||||
// HWND_TOPMOST and does exactly what it says.
|
||||
//
|
||||
// So this is a DELIBERATE PER-PLATFORM DIVERGENCE, not a revert: the pin
|
||||
// exists where the window manager can honour it and stays absent where it
|
||||
// cannot. Linux and macOS keep the exact flags they had.
|
||||
property bool pinnedOnTop: false
|
||||
|
||||
flags: Qt.Window | Qt.FramelessWindowHint
|
||||
| ((QbzShell.isWindows && root.pinnedOnTop) ? Qt.WindowStaysOnTopHint : 0)
|
||||
|
||||
// Literal, never translated (app.slint:283 uses a plain string, not @tr).
|
||||
title: "QBZ Mini Player"
|
||||
|
||||
@@ -187,7 +187,21 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: QbzMini.exit()
|
||||
}
|
||||
// NO PIN. Owner ruling K1 shipped always-on-top as NEW work
|
||||
// THE PIN, on Windows only (owner decision D8, 2026-08-27).
|
||||
// `Qt.WindowStaysOnTopHint` is HWND_TOPMOST there and works;
|
||||
// everything below is why it is absent everywhere else, and
|
||||
// that reasoning still stands unchanged.
|
||||
CapBtn {
|
||||
name: "pin"
|
||||
visible: QbzShell.isWindows
|
||||
active: root.hostWindow ? root.hostWindow.pinnedOnTop : false
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
if (root.hostWindow)
|
||||
root.hostWindow.pinnedOnTop = !root.hostWindow.pinnedOnTop
|
||||
}
|
||||
}
|
||||
// NO PIN ELSEWHERE. Owner ruling K1 shipped always-on-top as NEW work
|
||||
// (the reference promises it in three comments and implements
|
||||
// it nowhere), and the owner smoked it on real Plasma Wayland
|
||||
// on 2026-08-04: `Qt.WindowStaysOnTopHint` did not keep the
|
||||
|
||||
Reference in new issue
Block a user