Skip to content

[ryoku] shell: keep clicks in an expanded Controls drawer inside - #760

Open
techapostle wants to merge 1 commit into
Ryoku-dev:unstable-devfrom
techapostle:fix/sidebar-drawer-dismiss
Open

techapostle wants to merge 1 commit into
Ryoku-dev:unstable-devfrom
techapostle:fix/sidebar-drawer-dismiss

Conversation

@techapostle

Copy link
Copy Markdown

What changed

In Controls (Super+Escape), expanding the Brightness drawer (one slider per display) or the Volume drawer grows the panel, but clicking anywhere in the grown part closes the panel as if the click landed outside it.

Cause. The panel's QML geometry is right. The ryoku-sidebar-left layer goes from 688x654 to 688x883 when the drawer opens, and the dismiss mask's hole updates to 12,64 688x883 in QML. But the ryoku-corner-dismiss window sits above the panel and never redraws after its first frame, so the new input region is never committed. A WAYLAND_DEBUG trace of the running shell shows one set_input_region (hole 654 tall) with the first frame and nothing after it until the surface is destroyed. Bisecting with synthetic clicks puts the close boundary at y=718, which is 64 + 654, the old height. A standalone Quickshell repro with the same env and mask bindings does update its mask, so I could not pin the stall below the Qt/Quickshell level. The same flaw hits the Volume drawer, the media section appearing, and a panel that shrinks, where the freed area lets clicks through to windows underneath.

Fix. Nothing depends on the dismiss window redrawing anymore:

  • Sidebar.qml: the dismiss hole is the panel's whole column (panelX, roomY, wantedWidth, availableHeight), which does not change while the panel is open. The panel window takes that same column and places the card at panelY - roomY with height wantedHeight. A MouseArea under the card closes the panel on presses in the clear part of the column and ignores presses on the card.
  • ControlsBar.qml, ControlsBoard.qml, SidebarChrome.qml: the column window starts above the card at the Center placement. The window-wide overlay that fb5693d bounds the settings popup by would then let the popup rise about 105 px above the card. So the card is passed down, and the popup's x, y and maxHeight are measured against it, falling back to the overlay when no card is given. At the top placements the card equals the window, so the numbers match fb5693d exactly. ControlsSettingsPopup.qml is unchanged.

Cost: the panel's transparent buffer is column-sized while open (688x1004 here instead of 688x654). It redraws only while content animates. Nothing becomes resident, and no probes or timers are added.

Known limit: a store design that changes its width while open would still leave the hole stale horizontally. That is the same root cause; I have not seen it happen.

Independent of #759; both add an entry at the top of ryoku/shell/CHANGELOG.md, so whichever merges second needs a one-line rebase.

Area

ryoku

How it was tested

Arch, Hyprland 0.57.0, NVIDIA. The live shell's sidebar was set to unstable-dev's sidebar (including fb5693d) plus this change. Clicks were synthetic (ydotool), with screenshots (grim) and hyprctl layers.

Top-left placement:

  • Brightness drawer expanded, clicks at y=740, 800 and 860 keep the panel open (before: everything from y=718 down closed it).
  • Volume drawer open, click inside it: stays open. Click on the card's padding: stays open.
  • Click below a collapsed panel inside its column: closes. Click below the expanded panel: closes. Click outside the column: closes. Escape: closes.
  • Settings popup opens above the bar inside the card, scrolls when short, and a second click on the gear closes it.

Center placement, set through the gear and restored afterwards:

  • Settings popup top sits at the card top with no overhang (before this fix about 105 px above it), and the gear toggles it closed.
  • Brightness drawer expanded: clicks in the newly grown area above and below the original card stay open. A click above the card in the column closes.

Also:

  • No QML errors in the shell log.
  • bin/ryoku-dev-lint-qml passes and bin/ryoku-dev-verify-qml-bindings reports no property set twice. qmllint shows only the unqualified SidebarState access the files already have.

Not tested: store designs, top-center/top-right/left/right (same code path as top-left, the card at the window top), additional monitors, and reduced motion.

Checklist

  • One logical change, with a clear [area] scope: summary commit subject.
  • Matching CHANGELOG.md updated in the area I touched.
  • The git hooks pass locally; I did not use --no-verify.
  • Lua parses (luac -p), shell scripts pass bash -n, and QML passes
    qmllint where applicable.
  • No duplicated config, no dead code, no commented-out code, no em-dash.
  • Docs updated if behavior or layout changed.

Opening the Brightness or Volume drawer grows the Controls panel, and the
panel window grows with it, but a press on the grown part closed the
panel. The click-away window sits above the panel and passes presses
through only where its mask cuts a hole. It never redraws after its first
frame, so the mask edit for the taller panel never reached the
compositor: a WAYLAND_DEBUG trace shows one set_input_region with the
first frame and no later commit, and presses closed the panel from the
old bottom edge down. The same applied to the media section appearing
and to a panel that shrank.

The hole is now the panel's whole column, which does not change while the
panel is open. The panel window takes that column and places the card in
it; a press in the clear part above or below the card closes the panel
from there. The settings popup is bounded by the card instead of the
window, so at the Center placement it no longer rises above the card.

Note: Fixed: clicking inside the expanded Brightness or Volume drawer in Controls no longer closes the panel

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant