We don't know if the client-list-combined-menu is standalone
ie. triggered by a keybind or a submenu of another menu.
So we update client-list-combined-menu every time ShowMenu is called.
It looks slightly awkward when the client menu shows up
in the left corner of the view and the window menu button
is configured to be on the right side.
...utilizing x,y coordinates where values can be a number, a negative
number, a percentage or "center".
- (0,0) is top left corner
- (-0,-0) is bottom right corner
- % is percentage of width and/or height
- 'center' centers the menu vertically and/or horizontally
<action name="ShowMenu">
<menu>root-menu</menu>
<position>
<x>0</x>
<y>0</y>
</position>
</action>
Note: both x and y values must be supplied for positioning to work.
This fixes the ugly look of SSD for tiny windows (e.g. "xterm -geometry
1x1") due to the early return in `ssd_update_geometry()`. Now SSDs are
rendered correctly for those windows by hiding some buttons when the
window width is smaller than the total width of buttons. Additionally for
windows smaller than (button width)*2, the corners are un-rounded so a
small titlebar can be rendered with a scene-rect.
When labwc un-tiles views, it generally changes their size, which sends
a configure request to the client. However, because the view has been
disabled in the wlroots scene, it will not receive and process the
configure when labwc expects. Instead, the handling will be deferred
until the user unshades the view at some arbitrary time in the future,
resulting in labwc registering complains like
[../src/xdg.c:239] client did not respond to configure request in 100 ms
Furthermore, the reconfigure will still generally produce flicker (as
the view opens in its tiled size and then jumps to its natural
geometry). Because skipping the unshade might cause client problems and
doesn't eliminate the problem it sought to resolve, let's revert this.
This reverts commit 2e19bd4d5b.
Applies drag resistance unidirectionally for horizontally/vertically
maximized windows, allowing them to be dragged without being untiled
immediately. When the distance of cursor movement orthogonal to the
maximized direction exceeds <resistance><unMaximizeThreshold>.
While dragging a horizontally/vertically maximized window, edge/region
snapping is disabled to prevent unintentional snapping and overlays.
This commit also includes some refactoring to simplify the logic.
Before this commit, the backgrounds of titlebar corners were tagged as
LAB_SSD_PART_CORNER_TOP_{LEFT,RIGHT}, so the cursor shape on titlebar
corners without buttons were north-west or north-east.
This commit fixes it by tagging those backgrounds as
LAB_SSD_TITLEBAR_CORNER_{LEFT,RIGHT}.
This works around a wrong truncation warning in older GCC versions:
```
../src/common/buf.c:110:10: error: null destination pointer [-Werror=format-truncation=]
110 | int n = vsnprintf(NULL, size, fmt, ap)
```
...defined by `<separator label="">`.
Also add the theme option `menu.title.bg.color: #589bda`
The following will be added in separate commits
- menu.title.bg.border.color: #7cb6ec
- menu.title.text.color: #ffffff
- menu.title.text.justify: center
xdg-shell protocol says:
All active operations (e.g., move, resize) are canceled and all
attributes (e.g. title, state, stacking, ...) are discarded for an
xdg_toplevel surface when it is unmapped.
So, when a xdg-toplevel is unmapped (not minimized), the corresponding
foreign handler should be destroyed to reset attributes.
Fixes a bug that `zwlr_foreign_toplevel_handle_v1::output_enter` is not
sent when a xwayland surface is re-mapped (e.g. opening Slack desktop
app when it's running in background).
Using the output damage_ring for early out will break VRR in
direct scanout mode. The reason being that the damage_ring
will be completely ignored in that mode so we need to check
`output->pending_commit_damage` instead. This matches with
what wlroots has been doing since [0] and it was missed in
the initial port to wlroots 0.18.x.
However, that would then break the magnifier which only adds
its damage to the damage ring. After some discussion with
the wlroots devs we came up with a solution that should work
for both, wlroots 0.18.0 and when [1] is backported to 0.18.1.
Note that even with this PR, VRR in direct scanout mode is
broken in 0.18.0 from the wlroots side and will be fixed once
[1] is backported to the 0.18 branch and 0.18.1 is released.
Fixes: #2078
[0] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4253
[1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4753