Repository navigation
[Wayland] Click-to-exit surface should cover the full output, including areas reserved by exclusive-zone surfaces #2357
n0xlite
started this conversation in
Ideas/Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
With click-to-exit enabled (the default since 2.1.0), the fullscreen capture surface is sized to the usable area, not the full output. Layer-shell compositors place a surface with exclusive zone
0inside the area left by other surfaces' exclusive zones, so the capture surface doesn't cover areas reserved by bars or panels. As a result, rofi can't be drawn over an exclusive bar, and clicks on the bar don't dismiss rofi.I'd like to ask whether the capture surface could request exclusive zone
-1. This is a feature request, not a bug report.click-to-exit: falseworks as a workaround for my use case.Use case
I use a dmenu-style theme anchored to the top of the screen. Waybar is on the
bottomlayer with an exclusive zone of 30px. When rofi opens, it should cover the bar, as dmenu does. In 2.0.0 I did this with a-30pxy-offsetin the theme.Observed behavior (sway,
WAYLAND_DEBUG=client)get_layer_surfacelayerset_size2560, 302560, 1410set_anchor1(top)5(top, left)set_margin-30, 0, 30, 00, 0, 0, 0Rofi sends no
set_exclusive_zonein either version, so it's0. On a2560x1440output with a 30px bar, the capture surface is2560x1410and starts below the bar.Why this happens
Since the click-to-exit change (#2272, which fixes #2158), the surface fills the usable area, the visible menu is drawn inside it, and a negative
y-offsetmoves content outside the surface, where it's clipped. In my tests with a transparent bar:y-offset: -15px, only the part of the menu below the bar's edge is visible.-30px, the menu isn't visible.click-to-exit: false, rofi uses the old small surface and margin-based placement, and the original theme works again.The compositor is behaving as the protocol specifies. A client can't draw outside its own surface.
Request
When click-to-exit is enabled, have the capture surface request an exclusive zone of
-1, and size or anchor it to cover the whole output. The protocol defines-1as "extend the surface to the full output edges and ignore other surfaces' exclusive zones". That would give the following:y-offsetwork over bars and panels again, with no need to disable click-to-exit.I haven't read the implementation, so I don't know how the surface size is chosen. Some adjustment may be needed, for example sizing to the full output and offsetting the menu inside it. If changing the default is a concern, this could be an opt-in option (the name is only a suggestion), such as
wayland-exclusive-zone: -1;.Workaround
or
-no-click-to-exiton the command line.Environment
bottom, exclusive zone 30Filtered
WAYLAND_DEBUGlogs for both versions are attached.rofi-2.0.0.filtered.txt
rofi-2.1.1.filtered.txt
All reactions