quickshell: pin the focus grab around the recorder's slurp pick
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
0d0009ca8e
commit
700c85e39a
1 changed files with 14 additions and 2 deletions
|
|
@ -6279,8 +6279,16 @@ in
|
|||
function start(mode) {
|
||||
if (recording || selecting) return;
|
||||
lastFile = "";
|
||||
// slurp wants the screen to itself, and the
|
||||
// panel would otherwise be in frame.
|
||||
// Same bracket the Shift+Super+S screenshot
|
||||
// keybind uses. Quickshell's HyprlandFocusGrab
|
||||
// is a seat grab: it redirects every pointer
|
||||
// event to the bar, so slurp gets none — and
|
||||
// slurp paints nothing until you drag, so an
|
||||
// input-starved one is simply invisible.
|
||||
// Closing the panel is not enough; reopening it
|
||||
// to reach Cancel re-arms the grab.
|
||||
if (mode === "region") bar.setScreenshotPin(true);
|
||||
// The panel would otherwise be in frame.
|
||||
qsDropdown.animateClose();
|
||||
if (mode === "region") slurpProc.running = true;
|
||||
else launch("");
|
||||
|
|
@ -6311,6 +6319,10 @@ in
|
|||
// resolve, and the exit code adds nothing.)
|
||||
onRunningChanged: {
|
||||
if (running) return;
|
||||
// Unpin on every exit — picked, cancelled
|
||||
// or crashed. (bar's own 30s watchdog is
|
||||
// the backstop if this is ever missed.)
|
||||
bar.setScreenshotPin(false);
|
||||
if (geom !== "") recCard.launch(geom);
|
||||
geom = "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue