aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-10-01 12:56:27 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-10-01 21:19:06 -0400
commitbb25194844599bb653a78633c9c09c0c0ff225ee (patch)
treea19bcbc62ff5d4ddcb822914a4f3516c7766406a /include/sway/config.h
parentMerge pull request #2739 from RedSoxFan/fix-2653 (diff)
downloadsway-bb25194844599bb653a78633c9c09c0c0ff225ee.tar.gz
sway-bb25194844599bb653a78633c9c09c0c0ff225ee.tar.zst
sway-bb25194844599bb653a78633c9c09c0c0ff225ee.zip
Handle border options for gaps
Fixes `hide_edge_borders smart` when gaps are in use. Implements `hide_edge_borders smart_no_gaps` and `smart_borders on|no_gaps|off`. Since `smart_borders on` is equivalent to `hide_edge_borders smart` and `smart_borders no_gaps` is equivalent to `hide_edge_borders smart_no_gaps`, I opted to just save the last value set for `hide_edge_borders` and restore that on `smart_borders off`. This simplifies the conditions for setting the border.
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index eab48aed..98a18b76 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -253,7 +253,8 @@ enum edge_border_types {
253 E_VERTICAL, /**< hide vertical edge borders */ 253 E_VERTICAL, /**< hide vertical edge borders */
254 E_HORIZONTAL, /**< hide horizontal edge borders */ 254 E_HORIZONTAL, /**< hide horizontal edge borders */
255 E_BOTH, /**< hide vertical and horizontal edge borders */ 255 E_BOTH, /**< hide vertical and horizontal edge borders */
256 E_SMART /**< hide both if precisely one window is present in workspace */ 256 E_SMART, /**< hide both if precisely one window is present in workspace */
257 E_SMART_NO_GAPS, /**< hide both if one window and gaps to edge is zero */
257}; 258};
258 259
259enum command_context { 260enum command_context {
@@ -383,6 +384,7 @@ struct sway_config {
383 int border_thickness; 384 int border_thickness;
384 int floating_border_thickness; 385 int floating_border_thickness;
385 enum edge_border_types hide_edge_borders; 386 enum edge_border_types hide_edge_borders;
387 enum edge_border_types saved_edge_borders;
386 388
387 // border colors 389 // border colors
388 struct { 390 struct {