aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-03-23 17:24:53 -0400
committerLibravatar emersion <contact@emersion.fr>2019-03-23 23:39:42 +0200
commitcd8b4ace926bd5a5289a5d5d6f6dddc1e4732287 (patch)
treec6923a5abb407b59dea0e42364ee988a6c39c3ff /common/util.c
parentcriteria: fix __focused__ when no focus or unset (diff)
downloadsway-cd8b4ace926bd5a5289a5d5d6f6dddc1e4732287.tar.gz
sway-cd8b4ace926bd5a5289a5d5d6f6dddc1e4732287.tar.zst
sway-cd8b4ace926bd5a5289a5d5d6f6dddc1e4732287.zip
fix opening a floating view on the NOOP output
Since the NOOP output has no size, the minimum floating size is greater than the workspace size for the NOOP output. In this case, the floater gets centered in the output instead of the workspace. However, the NOOP output is not part of the output layout and thus has a NULL box. Attempting to access the properties of this box was causing a segfault. This fixes the issue by just setting the floater's box to all zeroes when mapping on the NOOP output. When the workspace gets moved from the NOOP output to a new output, any floater whose width or height is zero or has an x or y location outside of the output, gets passed to `container_init_floating` again. This will then set the appropriate size and centering. For any floater that has a valid size and location, they are preserved.
Diffstat (limited to 'common/util.c')
0 files changed, 0 insertions, 0 deletions