summaryrefslogtreecommitdiffstats
path: root/sway/CMakeLists.txt
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-22 12:36:20 +0100
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-12-28 14:58:17 +0100
commit6750975b9f91d3e0aa632add0f56fc4611b0853a (patch)
tree27b2b8d85c070a8f8c00aa5b5e561e9fd6d977ca /sway/CMakeLists.txt
parentarrange_windows_r: Bring parent coordinates into layout calculations. (diff)
downloadsway-6750975b9f91d3e0aa632add0f56fc4611b0853a.tar.gz
sway-6750975b9f91d3e0aa632add0f56fc4611b0853a.tar.zst
sway-6750975b9f91d3e0aa632add0f56fc4611b0853a.zip
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.
Diffstat (limited to 'sway/CMakeLists.txt')
-rw-r--r--sway/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt
index 259e9ab3..23829dc3 100644
--- a/sway/CMakeLists.txt
+++ b/sway/CMakeLists.txt
@@ -32,6 +32,7 @@ target_link_libraries(sway
32 ${PCRE_LIBRARIES} 32 ${PCRE_LIBRARIES}
33 ${JSONC_LIBRARIES} 33 ${JSONC_LIBRARIES}
34 ${WAYLAND_SERVER_LIBRARIES} 34 ${WAYLAND_SERVER_LIBRARIES}
35 m
35) 36)
36 37
37install( 38install(