outfoxxed / hy3

Hyprland plugin for an i3 / sway like manual tiling layout
GNU General Public License v3.0
459 stars 41 forks source link

Fully implement `resizeactivewindow` dispatcher for tiled and floating windows #60

Closed github-usr-name closed 7 months ago

github-usr-name commented 8 months ago

Overview

The resizeactivewindow implementation in v0.34.0 was incomplete and only allowed tiled windows to be grown, not shrunk. It was possible to workaround this by changing focus to a sibling node and then growing that node, but this is clunky and inefficient. This PR provides the missing functionality so that the resizeactivewindow dispatcher works similarly to the dwindle layout and i3/sway. It also implements resizeactivewindow for floating windows, using the same logic as the master layer.

Trivia:

Changes:

github-usr-name commented 8 months ago

This has had reasonable amount of adhoc testing with 3-deep nested groups of various types without any stability or display issues. Valgrind doesn't report any memory leaks. The "which edge should we move?" detection logic would benefit from improvement because the centre window in a 3x3 matrix always gets expanded as consequence of the somewhat naive algorithm ("Is there space available in the direction of the delta? Great, let's move that edge then") always picking that edge. Nevertheless, I think it's a big usability improvement. I have a few thoughts about possibly adding either an additional dispatcher which would permit explicit specification of the edge to be resized, and/or adding eRectCorner m_anchor to Hy3Node (defaulting to CORNER_NONE with a semantic meaning of auto)

github-usr-name commented 8 months ago

Changelog updated & #ifdev removed - apologies, I don't know your versioning workflow, will bear that in mind for future.

Expanded node resize breakage - bollocks, that's annoying, thank you for spotting the mouse-resize regression. Going to be AFK till the weekend though so not able to do anything that can't be handled with SSH (esp. testing :( ).

github-usr-name commented 8 months ago

Reworked, still in progress - expanded resize looks OK, but there are some bugs relating to [1] minimum window size (needs to be validated recursively, not just at the resize level) & [2] mouse-based resizing permitting windows to exceed node area

github-usr-name commented 7 months ago

Any update on this please? I have somewhat under 2,000 lines of diff against master now that I'd really like to get merged which provide a lot of additional/missing functionality & bug fixes e.g. integration of floating window focus logic

outfoxxed commented 7 months ago

Sorry, the review request either didn't give me a notification or I didn't see it.