fix: fix typo for idleinhibit_when_focus option in windowrule

This commit is contained in:
DreamMaoMao 2026-05-21 18:12:35 +08:00
parent 06d76199d8
commit 5b83ba5236
3 changed files with 10 additions and 10 deletions

View file

@ -34,7 +34,7 @@ windowrule=Parameter:Values,Parameter:Values,appid:Values,title:Values
| `noopenmaximized` | integer | `0` / `1` | Window does not open as maximized mode |
| `single_scratchpad` | integer | `0` / `1` (default 1) | Only show one out of named scratchpads or the normal scratchpad |
| `allow_shortcuts_inhibit` | integer | `0` / `1` (default 1) | Allow shortcuts to be inhibited by clients |
| `indleinhibit_when_focus` | integer | `0` / `1` (default 0) | Automatically keep idle inhibit active when this window is focused |
| `idleinhibit_when_focus` | integer | `0` / `1` (default 0) | Automatically keep idle inhibit active when this window is focused |
### Geometry & Position

View file

@ -78,7 +78,7 @@ typedef struct {
int32_t ignore_maximize;
int32_t ignore_minimize;
int32_t isnosizehint;
int32_t indleinhibit_when_focus;
int32_t idleinhibit_when_focus;
char *monitor;
int32_t offsetx;
int32_t offsety;
@ -2137,7 +2137,7 @@ bool parse_option(Config *config, char *key, char *value) {
rule->ignore_maximize = -1;
rule->ignore_minimize = -1;
rule->isnosizehint = -1;
rule->indleinhibit_when_focus = -1;
rule->idleinhibit_when_focus = -1;
rule->isterm = -1;
rule->allow_csd = -1;
rule->force_fakemaximize = -1;
@ -2248,8 +2248,8 @@ bool parse_option(Config *config, char *key, char *value) {
rule->ignore_minimize = atoi(val);
} else if (strcmp(key, "isnosizehint") == 0) {
rule->isnosizehint = atoi(val);
} else if (strcmp(key, "indleinhibit_when_focus") == 0) {
rule->indleinhibit_when_focus = atoi(val);
} else if (strcmp(key, "idleinhibit_when_focus") == 0) {
rule->idleinhibit_when_focus = atoi(val);
} else if (strcmp(key, "isterm") == 0) {
rule->isterm = atoi(val);
} else if (strcmp(key, "allow_csd") == 0) {

View file

@ -356,7 +356,7 @@ struct Client {
struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel;
int32_t isfloating, isurgent, isfullscreen, isfakefullscreen,
need_float_size_reduce, isminimized, isoverlay, isnosizehint,
ignore_maximize, ignore_minimize, indleinhibit_when_focus;
ignore_maximize, ignore_minimize, idleinhibit_when_focus;
int32_t ismaximizescreen;
int32_t overview_backup_bw;
int32_t fullscreen_backup_x, fullscreen_backup_y, fullscreen_backup_w,
@ -1504,7 +1504,7 @@ static void apply_rule_properties(Client *c, const ConfigWinRule *r) {
APPLY_INT_PROP(c, r, ignore_maximize);
APPLY_INT_PROP(c, r, ignore_minimize);
APPLY_INT_PROP(c, r, isnosizehint);
APPLY_INT_PROP(c, r, indleinhibit_when_focus);
APPLY_INT_PROP(c, r, idleinhibit_when_focus);
APPLY_INT_PROP(c, r, isunglobal);
APPLY_INT_PROP(c, r, noblur);
APPLY_INT_PROP(c, r, allow_shortcuts_inhibit);
@ -4383,7 +4383,7 @@ void init_client_properties(Client *c) {
c->force_tiled_state = 1;
c->force_tearing = 0;
c->allow_shortcuts_inhibit = SHORTCUTS_INHIBIT_ENABLE;
c->indleinhibit_when_focus = 0;
c->idleinhibit_when_focus = 0;
c->scroller_proportion_single = 0.0f;
c->float_geom.width = 0;
c->float_geom.height = 0;
@ -6243,7 +6243,7 @@ int32_t hidecursor(void *data) {
}
void check_keep_idle_inhibit(Client *c) {
if (c && c->indleinhibit_when_focus && keep_idle_inhibit_source) {
if (c && c->idleinhibit_when_focus && keep_idle_inhibit_source) {
wl_event_source_timer_update(keep_idle_inhibit_source, 1000);
}
}
@ -6260,7 +6260,7 @@ int32_t keep_idle_inhibit(void *data) {
return 1;
}
if (!selmon || !selmon->sel || !selmon->sel->indleinhibit_when_focus) {
if (!selmon || !selmon->sel || !selmon->sel->idleinhibit_when_focus) {
wl_event_source_timer_update(keep_idle_inhibit_source, 0);
return 1;
}