awesome
awesome copied to clipboard
fix: bad argument to apply_size_hints
While in floating mode user can resize window to a zero width or height size. If this happens an error occures: bad argument 1 to apply_size_hints (value in [1, 65535] expected, got 0). After this error window size cannot be changed.
Codecov Report
Merging #2918 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #2918 +/- ##
=======================================
Coverage 87.55% 87.55%
=======================================
Files 610 610
Lines 42225 42225
=======================================
Hits 36972 36972
Misses 5253 5253
Flag | Coverage Δ | |
---|---|---|
#gcov | 76.06% <ø> (ø) |
:arrow_up: |
#luacov | 90.19% <100%> (ø) |
:arrow_up: |
Impacted Files | Coverage Δ | |
---|---|---|
lib/awful/placement.lua | 91.56% <100%> (ø) |
:arrow_up: |
I guess this needs a test, but... how exactly does the patch work? This just skips size hints and alignment for when a window is resized to width or height zero? Shouldn't that still cause errors/issues later on?
/This just skips size hints and alignment for when a window is resized to width or height zero?/ Exactly. /Shouldn't that still cause errors/issues later on?/ Unfortunately I cannot deep dig in architecture of awesome VM but on my local machine this patch fix the problem: an error goes away and window size can be changed back after window was resized to zero length (both direction was tested)