aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorLibravatar Tarmack <git@tarmack.eu>2018-10-11 21:51:11 +0200
committerLibravatar Tarmack <git@tarmack.eu>2018-10-13 17:42:49 +0200
commit36d9037f2c419756b00d1fe2dbeefca278bc2799 (patch)
treed2300c007bbd28a68fc83d1d36faf459c971186c /sway/tree/workspace.c
parentMerge pull request #2825 from RyanDwyer/fractional-scale-pixel-leaks (diff)
downloadsway-36d9037f2c419756b00d1fe2dbeefca278bc2799.tar.gz
sway-36d9037f2c419756b00d1fe2dbeefca278bc2799.tar.zst
sway-36d9037f2c419756b00d1fe2dbeefca278bc2799.zip
fix_edge_gaps: Allow negative values for outer gaps.
While allowing negative values for the outer gaps it is still prevented that negative values move windows out of the container. This replaces the non-i3 option for edge_gaps.
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index d7650560..a1282c1e 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -73,10 +73,10 @@ struct sway_workspace *workspace_create(struct sway_output *output,
73 if (name) { 73 if (name) {
74 struct workspace_config *wsc = workspace_find_config(name); 74 struct workspace_config *wsc = workspace_find_config(name);
75 if (wsc) { 75 if (wsc) {
76 if (wsc->gaps_outer != -1) { 76 if (wsc->gaps_outer != INT_MIN) {
77 ws->gaps_outer = wsc->gaps_outer; 77 ws->gaps_outer = wsc->gaps_outer;
78 } 78 }
79 if (wsc->gaps_inner != -1) { 79 if (wsc->gaps_inner != INT_MIN) {
80 ws->gaps_inner = wsc->gaps_inner; 80 ws->gaps_inner = wsc->gaps_inner;
81 } 81 }
82 } 82 }
@@ -618,9 +618,6 @@ void workspace_add_gaps(struct sway_workspace *ws) {
618 if (ws->current_gaps > 0) { 618 if (ws->current_gaps > 0) {
619 return; 619 return;
620 } 620 }
621 if (!config->edge_gaps) {
622 return;
623 }
624 if (config->smart_gaps) { 621 if (config->smart_gaps) {
625 struct sway_seat *seat = input_manager_get_default_seat(input_manager); 622 struct sway_seat *seat = input_manager_get_default_seat(input_manager);
626 struct sway_container *focus = 623 struct sway_container *focus =