[BUG] Region screenshot overlay gets no keyboard input while the launcher is open (Enter launches app)
Submission checklist
- I have searched existing issues and confirmed this is not a duplicate.
- I am using the latest available version of Noctalia.
Bug description
If the launcher is open when a region screenshot starts, the region overlay never gets keyboard input: keys keep going to the launcher underneath. Enter launches the selected app instead of confirming the capture; Space, Ctrl+C, Ctrl+S and letters go into the launcher search field. Only Esc works, and it cancels the capture but leaves the launcher open.
Steps to reproduce
- Set
[shell.screenshot] confirm_region = true(only needed for the Enter/Space/Ctrl+C/Ctrl+S confirm step). noctalia msg panel-toggle launchernoctalia msg screenshot-region, drag a region.- Press Enter (or type a few letters, then Esc).
Expected behavior
The region overlay owns the keyboard while it is active: Enter/Space/Ctrl+C/Ctrl+S confirm the capture, and nothing reaches the launcher.
Actual behavior
Enter launches the launcher's selected app. Typed keys, Space included, appear in the launcher search field. Esc cancels the capture; the launcher stays open.
Logs / error output
niri msg -j layers, while the overlay is up (index order = niri's layer-map order):
[3] Overlay Exclusive noctalia-panel
[4] Overlay Exclusive noctalia-screenshot-regionNoctalia version
v5.2.0 (ec70437)
Compositor
Niri
Distribution
Arch-based
Environment information
Installation method: CachyOS package noctalia 5.2.0-1.1
Compositor: niri 26.04 (8ed0da4)
GPU: Intel Raptor Lake-P UHD Graphics (i915)Additional context
Cause, from the v5.2.0 source:
- The floating launcher and the region overlay are both
Overlay+Exclusivelayer surfaces (niri has no focus-grab, so the launcher is never relaxed). niri gives keyboard focus to the first exclusive surface on the layer, which is the older launcher; the overlay only gets the pointer. ScreenshotRegionOverlay::onKeyboardEventignores every key unlesslastKeyboardSurface()is one of its own surfaces (added in 093cf68f18), so keys fall through toPanelManagerand the launcher. Esc still works only becauseScreenshotService::onKeyboardEventhas a Cancel fallback without that check, which also consumes it beforePanelManager.
Suggested direction: while a region capture is active, have ScreenshotService handle the confirm/cancel keys regardless of which Noctalia surface holds focus, and consume other key presses so they don't reach panels.
Possibly affected, untested: AnnotationOverlay::onKeyboardEvent has the same focused-surface check and no fallback.
Source: noctalia-dev/noctalia