mirror of
https://github.com/swaywm/sway.git
synced 2025-11-02 09:01:40 -05:00
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.
This commit is contained in:
parent
b542c5413e
commit
bb25194844
9 changed files with 68 additions and 20 deletions
|
|
@ -160,6 +160,7 @@ sway_cmd cmd_scratchpad;
|
|||
sway_cmd cmd_seamless_mouse;
|
||||
sway_cmd cmd_set;
|
||||
sway_cmd cmd_show_marks;
|
||||
sway_cmd cmd_smart_borders;
|
||||
sway_cmd cmd_smart_gaps;
|
||||
sway_cmd cmd_split;
|
||||
sway_cmd cmd_splith;
|
||||
|
|
|
|||
|
|
@ -253,7 +253,8 @@ enum edge_border_types {
|
|||
E_VERTICAL, /**< hide vertical edge borders */
|
||||
E_HORIZONTAL, /**< hide horizontal edge borders */
|
||||
E_BOTH, /**< hide vertical and horizontal edge borders */
|
||||
E_SMART /**< hide both if precisely one window is present in workspace */
|
||||
E_SMART, /**< hide both if precisely one window is present in workspace */
|
||||
E_SMART_NO_GAPS, /**< hide both if one window and gaps to edge is zero */
|
||||
};
|
||||
|
||||
enum command_context {
|
||||
|
|
@ -383,6 +384,7 @@ struct sway_config {
|
|||
int border_thickness;
|
||||
int floating_border_thickness;
|
||||
enum edge_border_types hide_edge_borders;
|
||||
enum edge_border_types saved_edge_borders;
|
||||
|
||||
// border colors
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue