mirror of
https://github.com/vale981/spectrwm
synced 2025-03-05 18:01:37 -05:00
Remove setquirk error; just ignore when attempting to set quirk to NONE.
This commit is contained in:
parent
a5b560b41f
commit
983382db57
1 changed files with 5 additions and 5 deletions
10
spectrwm.c
10
spectrwm.c
|
@ -6173,6 +6173,7 @@ setquirk(const char *class, const char *name, unsigned long quirk)
|
||||||
DNPRINTF(SWM_D_QUIRK, "setquirk: enter %s:%s [%lu]\n", class, name,
|
DNPRINTF(SWM_D_QUIRK, "setquirk: enter %s:%s [%lu]\n", class, name,
|
||||||
quirk);
|
quirk);
|
||||||
|
|
||||||
|
/* Remove/replace existing quirk. */
|
||||||
TAILQ_FOREACH(qp, &quirks, entry) {
|
TAILQ_FOREACH(qp, &quirks, entry) {
|
||||||
if (!strcmp(qp->class, class) && !strcmp(qp->name, name)) {
|
if (!strcmp(qp->class, class) && !strcmp(qp->name, name)) {
|
||||||
if (!quirk)
|
if (!quirk)
|
||||||
|
@ -6183,12 +6184,11 @@ setquirk(const char *class, const char *name, unsigned long quirk)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!quirk) {
|
|
||||||
warnx("error: setquirk: cannot find class/name combination");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
quirk_insert(class, name, quirk);
|
/* Only insert if quirk is not NONE. */
|
||||||
|
if (quirk)
|
||||||
|
quirk_insert(class, name, quirk);
|
||||||
|
|
||||||
DNPRINTF(SWM_D_QUIRK, "setquirk: leave\n");
|
DNPRINTF(SWM_D_QUIRK, "setquirk: leave\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue