]> git.mdlowis.com Git - proto/labwc.git/commit
view: Anchor right/bottom edge only when resizing via top/left edge
authorJohn Lindgren <john@jlindgren.net>
Sat, 25 Feb 2023 17:05:22 +0000 (12:05 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 5 Mar 2023 08:46:55 +0000 (08:46 +0000)
commit0b34b9f69fc547f3de5237c37ec073f3a05adcc6
tree874ddfa8380e0baf4e1068b67d03ad08ca2e90ef
parent9f00087a821a9ad420a1d4b93d9670b75b383ab3
view: Anchor right/bottom edge only when resizing via top/left edge

Currently, we anchor the right/bottom edge of the view whenever the top/
left edge is moving (current.x/y != pending.x/y). Doing so doesn't make
much sense when the right/bottom edge is also moving. In that case it's
probably best to move the view (or at least its top/left corner)
directly to its final position.

The most noticeable effect of this change is with views that don't
accept their requested size exactly when tiled or maximized (examples:
havoc, xfce4-terminal). Previously, their right-bottom corner would be
aligned with the screen edge, leaving gaps on the left and top. Now the
top-left corner will be aligned and the gaps will be on the right and
bottom. This is still not ideal, but IMHO less surprising to the user.
include/view-impl-common.h
src/view-impl-common.c
src/xdg.c
src/xwayland.c