fix: argument protocol overriden by config file
This commit is contained in:
parent
692e3abc68
commit
17dd06139d
|
@ -21,8 +21,10 @@ void readargs(int argc, char *argv[]) {
|
|||
loadbinds = 0;
|
||||
} else if (!strcmp(argv[j], "-x11") || (!strcmp(argv[j], "--x11"))) {
|
||||
protocol = 0;
|
||||
protocol_override = 1;
|
||||
} else if (!strcmp(argv[j], "-wl") || (!strcmp(argv[j], "--wayland"))) {
|
||||
protocol = 1;
|
||||
protocol_override = 1;
|
||||
#if USECONFIG
|
||||
} else if (!strcmp(argv[j], "-cf") || (!strcmp(argv[j], "--config-file"))) { // specify a config file
|
||||
if (argv[j+1]) {
|
||||
|
|
|
@ -76,7 +76,10 @@ void conf_init(void) {
|
|||
config_setting_lookup_int(conf, "managed", &managed); // spmenu.window.managed
|
||||
config_setting_lookup_int(conf, "monitor", &mon); // spmenu.window.monitor
|
||||
config_setting_lookup_int(conf, "alpha", &alpha); // spmenu.window.alpha
|
||||
config_setting_lookup_int(conf, "protocol", &protocol); // spmenu.window.protocol
|
||||
|
||||
if (!protocol_override) {
|
||||
config_setting_lookup_int(conf, "protocol", &protocol); // spmenu.window.protocol
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue