Initial commit of the Quickshell desktop suite: bar, dock, launcher, settings, Control Center, dashboard, OSD, lock screen, desktop widgets, plugin host with the vendored Noctalia/Omarchy compatibility layer, helpers, packaging, tests and phase documentation. Includes the optimization work so far: usage widgets and dashboard gauges no longer animate continuously, desktop widgets pause while covered, system controls stop flickering on background polls, dock app matching uses an indexed catalog, and workspace ghosts are created only for occupied slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.4 KiB
QML
44 lines
1.4 KiB
QML
import QtQuick
|
|
|
|
// Hyprland leaves an already-mapped layer surface at its old global position
|
|
// when its monitor moves within the layout: undocking disables the internal
|
|
// panel, the external monitor shifts to x=0, and long-lived surfaces such as
|
|
// the bar and background keep rendering at the old offset — or entirely
|
|
// off-screen — until they are unmapped and remapped. Watch the screen's
|
|
// origin and pulse `remapping` when it moves; the owning window folds that
|
|
// into its `visible` binding so the compositor re-places the surface at the
|
|
// monitor's new origin.
|
|
Item {
|
|
id: root
|
|
|
|
required property var window
|
|
readonly property var screen: window ? window.screen : null
|
|
|
|
// Fold into the window's binding: visible: <shown> && !guard.remapping
|
|
property bool remapping: false
|
|
|
|
visible: false
|
|
|
|
// A layout reshuffle can move the monitor more than once before it lands.
|
|
// Let the positions settle before the single remap pulse.
|
|
Timer {
|
|
id: settleTimer
|
|
interval: 200
|
|
onTriggered: root.remapping = true
|
|
}
|
|
|
|
// Hold the surface unmapped for a beat so the compositor processes the
|
|
// unmap before the remap instead of coalescing them into a no-op.
|
|
Timer {
|
|
interval: 50
|
|
running: root.remapping
|
|
onTriggered: root.remapping = false
|
|
}
|
|
|
|
Connections {
|
|
target: root.screen
|
|
function onXChanged() { settleTimer.restart() }
|
|
function onYChanged() { settleTimer.restart() }
|
|
}
|
|
}
|