mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-03 09:01:47 -05:00
fix: opacity winrule not apply
This commit is contained in:
parent
a59b1040e4
commit
e0b8608cf0
2 changed files with 42 additions and 37 deletions
|
|
@ -1348,6 +1348,10 @@ void parse_config_line(Config *config, const char *line) {
|
|||
rule->isunglobal = atoi(val);
|
||||
} else if (strcmp(key, "isglobal") == 0) {
|
||||
rule->isglobal = atoi(val);
|
||||
} else if (strcmp(key, "unfocused_opacity") == 0) {
|
||||
rule->unfocused_opacity = atof(val);
|
||||
} else if (strcmp(key, "focused_opacity") == 0) {
|
||||
rule->focused_opacity = atof(val);
|
||||
} else if (strcmp(key, "isoverlay") == 0) {
|
||||
rule->isoverlay = atoi(val);
|
||||
} else if (strcmp(key, "isterm") == 0) {
|
||||
|
|
|
|||
13
src/maomao.c
13
src/maomao.c
|
|
@ -1436,11 +1436,11 @@ bool client_draw_frame(Client *c) {
|
|||
if (!c || !client_surface(c)->mapped)
|
||||
return false;
|
||||
|
||||
if(c->isfullscreen) {
|
||||
if (c->isfullscreen) {
|
||||
client_set_opacity(c, 1);
|
||||
} else if(c == selmon->sel && !c->animation.running) {
|
||||
} else if (c == selmon->sel && !c->animation.running) {
|
||||
client_set_opacity(c, c->focused_opacity);
|
||||
} else if(!c->animation.running) {
|
||||
} else if (!c->animation.running) {
|
||||
client_set_opacity(c, c->unfocused_opacity);
|
||||
}
|
||||
|
||||
|
|
@ -1451,7 +1451,8 @@ bool client_draw_frame(Client *c) {
|
|||
client_animation_next_tick(c);
|
||||
client_apply_clip(c);
|
||||
} else {
|
||||
wlr_scene_node_set_position(&c->scene->node, c->pending.x, c->pending.y);
|
||||
wlr_scene_node_set_position(&c->scene->node, c->pending.x,
|
||||
c->pending.y);
|
||||
c->animainit_geom = c->animation.initial = c->pending = c->current =
|
||||
c->geom;
|
||||
client_apply_clip(c);
|
||||
|
|
@ -2029,9 +2030,9 @@ applyrules(Client *c) {
|
|||
c->isglobal = r->isglobal >= 0 ? r->isglobal : c->isglobal;
|
||||
c->isoverlay = r->isoverlay >= 0 ? r->isoverlay : c->isoverlay;
|
||||
c->isunglobal = r->isunglobal >= 0 ? r->isunglobal : c->isunglobal;
|
||||
c->focused_opacity = r->focused_opacity > 0 ? r->focused_opacity
|
||||
c->focused_opacity = r->focused_opacity > 0.0f ? r->focused_opacity
|
||||
: c->focused_opacity;
|
||||
c->unfocused_opacity = r->unfocused_opacity > 0
|
||||
c->unfocused_opacity = r->unfocused_opacity > 0.0f
|
||||
? r->unfocused_opacity
|
||||
: c->unfocused_opacity;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue