mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
arrange_windows_r: Round pixels to match reality, fixes calculations.
If the width or height of a container can't be evenly distributed to its children, then the layout algorithm still thought it got it right (due to using decimals) which caused a gap of one or more pixels for some window arrangements. This is fixed by this patch by first rounding off the width and height (so that decimals are never introduced) and then adjusting the last view in a container to fill the remaining pixels (which now is counted correctly due to the decimals being removed). Also, due to the way gaps are implemented, an odd sized gap can never be aligned properly, so just adjust to closest even number.
This commit is contained in:
parent
831f6680f4
commit
6750975b9f
2 changed files with 24 additions and 2 deletions
|
|
@ -32,6 +32,7 @@ target_link_libraries(sway
|
|||
${PCRE_LIBRARIES}
|
||||
${JSONC_LIBRARIES}
|
||||
${WAYLAND_SERVER_LIBRARIES}
|
||||
m
|
||||
)
|
||||
|
||||
install(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue