repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

fix(nuguland): correct outside-click hit test for left-bar popouts

96f7ab0409c5358960daf9c09647de84a0b2f4ed

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Vertical orientation offsets the popout input region on the x-axis
(x = barHeight), but the outside-click dismiss only converted mouse.y to
root coords, comparing layer-local mouse.x against root-space card.x.
A click inside the card read as outside and dismissed it. Convert both
axes symmetrically.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (1)

quickshell/nuguland/PopoutHost.qml

Modified
137 137 height: popoutInputRegion.height
138 138 acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
139 139 onPressed: (mouse) => {
140 + // mouse.x/y are layer-local; the card rect is in root coords. The
141 + // layer origin is offset on both axes (below the top bar, or right
142 + // of the left bar), so convert both before the hit test.
143 + const rootX = mouse.x + outsideDismissLayer.x;
140 144 const rootY = mouse.y + outsideDismissLayer.y;
141 - const inside = mouse.x >= card.x && mouse.x <= card.x + card.width && rootY >= card.y && rootY <= card.y + card.height;
145 + const inside = rootX >= card.x && rootX <= card.x + card.width && rootY >= card.y && rootY <= card.y + card.height;
142 146 if (!inside && root.surfaces) {
143 147 mouse.accepted = true;
144 148 root.surfaces.closePopout("outside");