From 0a79983f9430263cf508535c7ce1aa27967b7ae8 Mon Sep 17 00:00:00 2001 From: Geoff Greer Date: Thu, 10 May 2018 23:35:37 -0700 Subject: Allow setting border widths for normal borders using default_border. In Sway 0.15, `default_border normal 1` would set 1px wide borders. This recreates that behavior. --- sway/commands/default_border.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sway/commands/default_border.c') diff --git a/sway/commands/default_border.c b/sway/commands/default_border.c index fcd2c075..2e356d3d 100644 --- a/sway/commands/default_border.c +++ b/sway/commands/default_border.c @@ -15,12 +15,12 @@ struct cmd_results *cmd_default_border(int argc, char **argv) { config->border = B_NORMAL; } else if (strcmp(argv[0], "pixel") == 0) { config->border = B_PIXEL; - if (argc == 2) { - config->border_thickness = atoi(argv[1]); - } } else { return cmd_results_new(CMD_INVALID, "default_border", - "Expected 'default_border ' or 'default_border pixel '"); + "Expected 'default_border ' or 'default_border '"); + } + if (argc == 2) { + config->border_thickness = atoi(argv[1]); } return cmd_results_new(CMD_SUCCESS, NULL, NULL); -- cgit v1.2.3