diff options
author | Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> | 2019-08-12 01:18:24 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-12 09:33:30 +0900 |
commit | dac9c9c72b4ae1796fa212b78f418666a52ecb2e (patch) | |
tree | 682975f4e35d09550da8bfa06c2d2ffa7c903047 /sway/desktop/layer_shell.c | |
parent | Remove rootston from build manifests (diff) | |
download | sway-dac9c9c72b4ae1796fa212b78f418666a52ecb2e.tar.gz sway-dac9c9c72b4ae1796fa212b78f418666a52ecb2e.tar.zst sway-dac9c9c72b4ae1796fa212b78f418666a52ecb2e.zip |
layer_shell: Guard against negative exclusive zone
This can happen with surfaces that set negative margins.
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r-- | sway/desktop/layer_shell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index ed00b282..34ba5592 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c | |||
@@ -68,7 +68,7 @@ static void apply_exclusive(struct wlr_box *usable_area, | |||
68 | }, | 68 | }, |
69 | }; | 69 | }; |
70 | for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); ++i) { | 70 | for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); ++i) { |
71 | if ((anchor & edges[i].anchors) == edges[i].anchors) { | 71 | if ((anchor & edges[i].anchors) == edges[i].anchors && exclusive + edges[i].margin > 0) { |
72 | if (edges[i].positive_axis) { | 72 | if (edges[i].positive_axis) { |
73 | *edges[i].positive_axis += exclusive + edges[i].margin; | 73 | *edges[i].positive_axis += exclusive + edges[i].margin; |
74 | } | 74 | } |