feat: add winrule option nofadein
This commit is contained in:
@@ -36,6 +36,7 @@ typedef struct {
|
|||||||
int offsety;
|
int offsety;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
int nofadein;
|
||||||
int isterm;
|
int isterm;
|
||||||
int noswallow;
|
int noswallow;
|
||||||
int scratchpad_width;
|
int scratchpad_width;
|
||||||
@@ -1099,6 +1100,7 @@ void parse_config_line(Config *config, const char *line) {
|
|||||||
rule->monitor = 0;
|
rule->monitor = 0;
|
||||||
rule->offsetx = 0;
|
rule->offsetx = 0;
|
||||||
rule->offsety = 0;
|
rule->offsety = 0;
|
||||||
|
rule->nofadein = 0;
|
||||||
rule->scratchpad_width = 0;
|
rule->scratchpad_width = 0;
|
||||||
rule->scratchpad_height = 0;
|
rule->scratchpad_height = 0;
|
||||||
rule->width = 0;
|
rule->width = 0;
|
||||||
@@ -1140,6 +1142,8 @@ void parse_config_line(Config *config, const char *line) {
|
|||||||
rule->offsetx = atoi(val);
|
rule->offsetx = atoi(val);
|
||||||
} else if (strcmp(key, "offsety") == 0) {
|
} else if (strcmp(key, "offsety") == 0) {
|
||||||
rule->offsety = atoi(val);
|
rule->offsety = atoi(val);
|
||||||
|
} else if (strcmp(key, "nofadein") == 0) {
|
||||||
|
rule->nofadein = atoi(val);
|
||||||
} else if (strcmp(key, "scratchpad_width") == 0) {
|
} else if (strcmp(key, "scratchpad_width") == 0) {
|
||||||
rule->scratchpad_width = atoi(val);
|
rule->scratchpad_width = atoi(val);
|
||||||
} else if (strcmp(key, "scratchpad_height") == 0) {
|
} else if (strcmp(key, "scratchpad_height") == 0) {
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ struct Client {
|
|||||||
bool is_clip_to_hide;
|
bool is_clip_to_hide;
|
||||||
bool drag_to_tile;
|
bool drag_to_tile;
|
||||||
bool fake_no_border;
|
bool fake_no_border;
|
||||||
|
int nofadein;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -1011,7 +1012,7 @@ void client_animation_next_tick(Client *c) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!c->iskilling && (c->is_open_animation || c->animation.begin_fade_in) &&
|
if (!c->iskilling && (c->is_open_animation || c->animation.begin_fade_in) &&
|
||||||
animation_fade_in) {
|
animation_fade_in && !c->nofadein) {
|
||||||
c->animation.begin_fade_in = true;
|
c->animation.begin_fade_in = true;
|
||||||
client_set_opacity(c, MIN(animation_passed + fadein_begin_opacity, 1.0));
|
client_set_opacity(c, MIN(animation_passed + fadein_begin_opacity, 1.0));
|
||||||
}
|
}
|
||||||
@@ -1841,6 +1842,7 @@ applyrules(Client *c) {
|
|||||||
regex_match(r->title, title))) {
|
regex_match(r->title, title))) {
|
||||||
c->isterm = r->isterm > 0 ? r->isterm : c->isterm;
|
c->isterm = r->isterm > 0 ? r->isterm : c->isterm;
|
||||||
c->noswallow = r->noswallow > 0 ? r->noswallow : c->noswallow;
|
c->noswallow = r->noswallow > 0 ? r->noswallow : c->noswallow;
|
||||||
|
c->nofadein = r->nofadein > 0 ? r->nofadein : c->nofadein;
|
||||||
c->scratchpad_geom.width = r->scratchpad_width > 0
|
c->scratchpad_geom.width = r->scratchpad_width > 0
|
||||||
? r->scratchpad_width
|
? r->scratchpad_width
|
||||||
: c->scratchpad_geom.width;
|
: c->scratchpad_geom.width;
|
||||||
@@ -4488,6 +4490,7 @@ mapnotify(struct wl_listener *listener, void *data) {
|
|||||||
c->is_open_animation = true;
|
c->is_open_animation = true;
|
||||||
c->drag_to_tile = false;
|
c->drag_to_tile = false;
|
||||||
c->fake_no_border = false;
|
c->fake_no_border = false;
|
||||||
|
c->nofadein = 0;
|
||||||
|
|
||||||
if (new_is_master && selmon &&
|
if (new_is_master && selmon &&
|
||||||
strcmp(selmon->pertag->ltidxs[selmon->pertag->curtag]->name,
|
strcmp(selmon->pertag->ltidxs[selmon->pertag->curtag]->name,
|
||||||
|
|||||||
Reference in New Issue
Block a user