Watch
1
0
Fork
You've already forked souveraine
0

the sheet scrims its own window, not the screen

This commit is contained in:
Fimeg 2026-08-05 16:43:14 -04:00
commit 6c0730a790

View file

@ -70,6 +70,10 @@ Scope {
return;
}
scope.target = id;
// Ask where that window is, now. The poll runs every two seconds, and
// a sheet that opened against two-second-old geometry would scrim the
// wrong rectangle for exactly as long as it took to notice.
ViewtopControl.refreshWindows();
scope.sheetOpen = true;
}
@ -197,17 +201,44 @@ Scope {
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
exclusionMode: ExclusionMode.Ignore
// The scrim. Also the outside-tap target: dismissal by tapping away
// is load-bearing on a phone, and it is the only exit that needs no
// explanation.
Rectangle {
// The tap-away target. Transparent and full-screen: dismissal by
// tapping outside is load-bearing on a phone and is the only exit
// that needs no explanation, so the *catcher* still spans the
// glass even though the *scrim* no longer does.
MouseArea {
anchors.fill: parent
color: "#99000000"
onClicked: scope.dismiss()
}
MouseArea {
anchors.fill: parent
onClicked: scope.dismiss()
// The scrim, over the target window only.
//
// Casey, 2026-08-05: *"Three finger tap overlay should overlay the
// app it's talking about; not all apps."* Dimming everything said
// the sheet was about the device; it is about one window, and on a
// split screen it was covering the app you were not asking about.
//
// Geometry comes from the compositor's `workspaces` reply rather
// than being computed here the strip offset and any pose are
// facts only it holds, which is the same reason the tap carries its
// target instead of a raw point.
Rectangle {
id: scrim
readonly property var target: {
for (const w of ViewtopControl.windows)
if (w.id === scope.target && w.at && w.size)
return w;
return null;
}
// Falls back to the whole screen when the compositor reported
// no geometry. A sheet with no visible subject is confusing;
// one that dims everything is merely less precise, and the
// buttons still work.
x: scrim.target ? scrim.target.at.x : 0
y: scrim.target ? scrim.target.at.y : 0
width: scrim.target ? scrim.target.size.width : parent.width
height: scrim.target ? scrim.target.size.height : parent.height
color: "#99000000"
radius: scrim.target ? 12 : 0
Behavior on opacity { NumberAnimation { duration: 120 } }
}
@ -271,11 +302,13 @@ Scope {
}
}
// The row. Above centre so a thumb does not cover the window.
// The row, centred on the window it acts on rather than on the
// panel a sheet floating mid-screen while the app it names is in
// the top half reads as belonging to neither.
RowLayout {
visible: !scope.choosing
anchors.horizontalCenter: parent.horizontalCenter
y: parent.height * 0.38
x: scrim.x + (scrim.width - width) / 2
y: scrim.y + scrim.height * 0.38
spacing: 28
SheetButton {