Merge pull request #645 from jampe/feature-config-isfakefullscreen

support isfakefullscreen as windowrule property
This commit is contained in:
DreamMaoMao 2026-02-14 08:46:23 +08:00 committed by GitHub
commit 91110efe0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View file

@ -58,6 +58,7 @@ typedef struct {
uint32_t tags; uint32_t tags;
int32_t isfloating; int32_t isfloating;
int32_t isfullscreen; int32_t isfullscreen;
int32_t isfakefullscreen;
float scroller_proportion; float scroller_proportion;
const char *animation_type_open; const char *animation_type_open;
const char *animation_type_close; const char *animation_type_close;
@ -1995,6 +1996,7 @@ bool parse_option(Config *config, char *key, char *value) {
// int32_t rule value, relay to a client property // int32_t rule value, relay to a client property
rule->isfloating = -1; rule->isfloating = -1;
rule->isfullscreen = -1; rule->isfullscreen = -1;
rule->isfakefullscreen = -1;
rule->isnoborder = -1; rule->isnoborder = -1;
rule->isnoshadow = -1; rule->isnoshadow = -1;
rule->isnoradius = -1; rule->isnoradius = -1;
@ -2137,6 +2139,8 @@ bool parse_option(Config *config, char *key, char *value) {
rule->scroller_proportion = atof(val); rule->scroller_proportion = atof(val);
} else if (strcmp(key, "isfullscreen") == 0) { } else if (strcmp(key, "isfullscreen") == 0) {
rule->isfullscreen = atoi(val); rule->isfullscreen = atoi(val);
} else if (strcmp(key, "isfakefullscreen") == 0) {
rule->isfakefullscreen = atoi(val);
} else if (strcmp(key, "globalkeybinding") == 0) { } else if (strcmp(key, "globalkeybinding") == 0) {
char mod_str[256], keysym_str[256]; char mod_str[256], keysym_str[256];
sscanf(val, "%255[^-]-%255[a-zA-Z]", mod_str, keysym_str); sscanf(val, "%255[^-]-%255[a-zA-Z]", mod_str, keysym_str);

View file

@ -1297,6 +1297,7 @@ static void apply_rule_properties(Client *c, const ConfigWinRule *r) {
APPLY_INT_PROP(c, r, no_force_center); APPLY_INT_PROP(c, r, no_force_center);
APPLY_INT_PROP(c, r, isfloating); APPLY_INT_PROP(c, r, isfloating);
APPLY_INT_PROP(c, r, isfullscreen); APPLY_INT_PROP(c, r, isfullscreen);
APPLY_INT_PROP(c, r, isfakefullscreen);
APPLY_INT_PROP(c, r, isnoborder); APPLY_INT_PROP(c, r, isnoborder);
APPLY_INT_PROP(c, r, isnoshadow); APPLY_INT_PROP(c, r, isnoshadow);
APPLY_INT_PROP(c, r, isnoradius); APPLY_INT_PROP(c, r, isnoradius);
@ -1498,6 +1499,10 @@ void applyrules(Client *c) {
setfullscreen(c, fullscreen_state_backup); setfullscreen(c, fullscreen_state_backup);
if (c->isfakefullscreen) {
setfakefullscreen(c, 1);
}
/* /*
if there is a new non-floating window in the current tag, the fullscreen if there is a new non-floating window in the current tag, the fullscreen
window in the current tag will exit fullscreen and participate in tiling window in the current tag will exit fullscreen and participate in tiling