feat: add winrule option nofadeout
This commit is contained in:
@@ -37,6 +37,7 @@ typedef struct {
|
||||
int width;
|
||||
int height;
|
||||
int nofadein;
|
||||
int nofadeout;
|
||||
int no_force_center;
|
||||
int isterm;
|
||||
int noswallow;
|
||||
@@ -1105,6 +1106,7 @@ void parse_config_line(Config *config, const char *line) {
|
||||
rule->offsetx = 0;
|
||||
rule->offsety = 0;
|
||||
rule->nofadein = 0;
|
||||
rule->nofadeout = 0;
|
||||
rule->no_force_center = 0;
|
||||
rule->scratchpad_width = 0;
|
||||
rule->scratchpad_height = 0;
|
||||
@@ -1149,6 +1151,8 @@ void parse_config_line(Config *config, const char *line) {
|
||||
rule->offsety = atoi(val);
|
||||
} else if (strcmp(key, "nofadein") == 0) {
|
||||
rule->nofadein = atoi(val);
|
||||
} else if (strcmp(key, "nofadeout") == 0) {
|
||||
rule->nofadeout = atoi(val);
|
||||
} else if (strcmp(key, "no_force_center") == 0) {
|
||||
rule->no_force_center = atoi(val);
|
||||
} else if (strcmp(key, "scratchpad_width") == 0) {
|
||||
|
||||
@@ -279,6 +279,7 @@ struct Client {
|
||||
bool drag_to_tile;
|
||||
bool fake_no_border;
|
||||
int nofadein;
|
||||
int nofadeout;
|
||||
int no_force_center;
|
||||
int isunglobal;
|
||||
};
|
||||
@@ -958,6 +959,7 @@ void fadeout_client_animation_next_tick(Client *c) {
|
||||
|
||||
double opacity = MAX(fadeout_begin_opacity - animation_passed, 0);
|
||||
|
||||
if(!c->nofadeout)
|
||||
wlr_scene_node_for_each_buffer(&c->scene->node, scene_buffer_apply_opacity,
|
||||
&opacity);
|
||||
|
||||
@@ -1853,6 +1855,7 @@ applyrules(Client *c) {
|
||||
c->isterm = r->isterm > 0 ? r->isterm : c->isterm;
|
||||
c->noswallow = r->noswallow > 0 ? r->noswallow : c->noswallow;
|
||||
c->nofadein = r->nofadein > 0 ? r->nofadein : c->nofadein;
|
||||
c->nofadeout = r->nofadeout > 0 ? r->nofadeout : c->nofadeout;
|
||||
c->no_force_center = r->no_force_center > 0 ? r->no_force_center
|
||||
: c->no_force_center;
|
||||
c->scratchpad_geom.width = r->scratchpad_width > 0
|
||||
@@ -4502,6 +4505,7 @@ mapnotify(struct wl_listener *listener, void *data) {
|
||||
c->drag_to_tile = false;
|
||||
c->fake_no_border = false;
|
||||
c->nofadein = 0;
|
||||
c->nofadeout = 0;
|
||||
c->no_force_center = 0;
|
||||
|
||||
if (new_is_master && selmon &&
|
||||
@@ -6676,6 +6680,7 @@ void init_fadeout_client(Client *c) {
|
||||
fadeout_cient->animation_type_close = c->animation_type_close;
|
||||
fadeout_cient->animation.action = CLOSE;
|
||||
fadeout_cient->bw = c->bw;
|
||||
fadeout_cient->nofadeout = c->nofadeout;
|
||||
|
||||
// 这里snap节点的坐标设置是使用的相对坐标,所以不能加上原来坐标
|
||||
// 这跟普通node有区别
|
||||
|
||||
Reference in New Issue
Block a user