mirror of
https://github.com/swaywm/sway.git
synced 2026-03-01 01:40:32 -05:00
Merge 182682dc79 into 40aabb80c6
This commit is contained in:
commit
e8d018e1c1
1 changed files with 0 additions and 11 deletions
|
|
@ -7,24 +7,13 @@
|
||||||
|
|
||||||
struct cmd_results *cmd_titlebar_padding(int argc, char **argv) {
|
struct cmd_results *cmd_titlebar_padding(int argc, char **argv) {
|
||||||
struct cmd_results *error = NULL;
|
struct cmd_results *error = NULL;
|
||||||
if ((error = checkarg(argc, "titlebar_padding", EXPECTED_AT_LEAST, 1))) {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *inv;
|
char *inv;
|
||||||
int h_value = strtol(argv[0], &inv, 10);
|
int h_value = strtol(argv[0], &inv, 10);
|
||||||
if (*inv != '\0' || h_value < 0 || h_value < config->titlebar_border_thickness) {
|
|
||||||
return cmd_results_new(CMD_FAILURE, "Invalid size specified");
|
|
||||||
}
|
|
||||||
|
|
||||||
int v_value;
|
int v_value;
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
v_value = h_value;
|
v_value = h_value;
|
||||||
} else {
|
} else {
|
||||||
v_value = strtol(argv[1], &inv, 10);
|
v_value = strtol(argv[1], &inv, 10);
|
||||||
if (*inv != '\0' || v_value < 0 || v_value < config->titlebar_border_thickness) {
|
|
||||||
return cmd_results_new(CMD_FAILURE, "Invalid size specified");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config->titlebar_v_padding = v_value;
|
config->titlebar_v_padding = v_value;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue