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.
master
Geoff Greer 7 years ago
parent 8d99edf787
commit 0a79983f94

@ -15,12 +15,12 @@ struct cmd_results *cmd_default_border(int argc, char **argv) {
config->border = B_NORMAL; config->border = B_NORMAL;
} else if (strcmp(argv[0], "pixel") == 0) { } else if (strcmp(argv[0], "pixel") == 0) {
config->border = B_PIXEL; config->border = B_PIXEL;
if (argc == 2) {
config->border_thickness = atoi(argv[1]);
}
} else { } else {
return cmd_results_new(CMD_INVALID, "default_border", return cmd_results_new(CMD_INVALID, "default_border",
"Expected 'default_border <none|normal|pixel>' or 'default_border pixel <px>'"); "Expected 'default_border <none|normal|pixel>' or 'default_border <normal|pixel> <px>'");
}
if (argc == 2) {
config->border_thickness = atoi(argv[1]);
} }
return cmd_results_new(CMD_SUCCESS, NULL, NULL); return cmd_results_new(CMD_SUCCESS, NULL, NULL);

Loading…
Cancel
Save