]> git.mdlowis.com Git - proto/labwc.git/commit
view: respect client-initiated resize of non-maximized axis
authorJohn Lindgren <john@jlindgren.net>
Sat, 23 Aug 2025 14:44:26 +0000 (10:44 -0400)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sun, 24 Aug 2025 14:05:59 +0000 (23:05 +0900)
commitebd39dfe0d1ded5af933075f5400909c9d2a2c99
tree4b3eaf130b30664f53fa406f0c18b115baf0c534
parent888dbedeed416ee18e73129fc5bb0a23eebc31d8
view: respect client-initiated resize of non-maximized axis

When implementing single-axis maximize some time ago, I made the
simplifying assumption that a view couldn't be resized while maximized
(even in only one axis). And indeed for compositor-initiated resize,
we always unmaximize the view first.

However, I didn't account for the client resizing the non-maximized
axis, which we can't (and shouldn't) prevent. When this happens, we
should also update the natural geometry of that single axis so that we
don't undo the resize when un-maximizing.

P.S. xdg-shell clients resizing the *maximized* axis is still an
unsolved problem, exacerbated by the fact that xdg-shell protocol
doesn't allow clients to even know about single-axis maximize.

P.P.S. the view_invalidate_last_layout_geometry() logic may need
similar updates, I'm not sure.
src/interactive.c
src/view.c