mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
fix: error node enable when clip
This commit is contained in:
parent
763f523166
commit
60d9c3b23a
1 changed files with 5 additions and 9 deletions
14
maomao.c
14
maomao.c
|
|
@ -1046,9 +1046,7 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx,
|
||||||
wlr_scene_node_set_position(&c->border[3]->node, clip_box.width - c->bw,
|
wlr_scene_node_set_position(&c->border[3]->node, clip_box.width - c->bw,
|
||||||
c->bw);
|
c->bw);
|
||||||
|
|
||||||
if ((c->animation.running && c->animation.action != MOVE) ||
|
if (c->istiled) {
|
||||||
(c->istiled && strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name,
|
|
||||||
"scroller") == 0)) {
|
|
||||||
if (c->animation.current.x < c->mon->m.x) {
|
if (c->animation.current.x < c->mon->m.x) {
|
||||||
set_rect_size(c->border[2], 0, 0);
|
set_rect_size(c->border[2], 0, 0);
|
||||||
} else if (c->animation.current.x + c->animation.current.width >
|
} else if (c->animation.current.x + c->animation.current.width >
|
||||||
|
|
@ -1107,9 +1105,7 @@ void client_apply_clip(Client *c) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// // make tagout tagin animations not visible in other monitors
|
// // make tagout tagin animations not visible in other monitors
|
||||||
if ((c->animation.running && c->animation.action != MOVE) ||
|
if (c->istiled) {
|
||||||
(c->istiled && strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name,
|
|
||||||
"scroller") == 0)) {
|
|
||||||
if (c->animation.current.x <= c->mon->m.x) {
|
if (c->animation.current.x <= c->mon->m.x) {
|
||||||
offsetx = c->mon->m.x - c->animation.current.x;
|
offsetx = c->mon->m.x - c->animation.current.x;
|
||||||
clip_box.x = clip_box.x + offsetx;
|
clip_box.x = clip_box.x + offsetx;
|
||||||
|
|
@ -1133,15 +1129,15 @@ void client_apply_clip(Client *c) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
animationScale scale_data;
|
if((clip_box.width <= 0 || clip_box.height <= 0) && (c->istiled)) {
|
||||||
if(clip_box.width <= 0 || clip_box.height <= 0) {
|
|
||||||
c->is_clip_to_hide = true;
|
c->is_clip_to_hide = true;
|
||||||
wlr_scene_node_set_enabled(&c->scene->node, false);
|
wlr_scene_node_set_enabled(&c->scene->node, false);
|
||||||
return;
|
return;
|
||||||
} else if(c->is_clip_to_hide) {
|
} else if(c->is_clip_to_hide && VISIBLEON(c, c->mon)) {
|
||||||
c->is_clip_to_hide = false;
|
c->is_clip_to_hide = false;
|
||||||
wlr_scene_node_set_enabled(&c->scene->node, true);
|
wlr_scene_node_set_enabled(&c->scene->node, true);
|
||||||
}
|
}
|
||||||
|
animationScale scale_data;
|
||||||
scale_data.width = clip_box.width - 2 * c->bw;
|
scale_data.width = clip_box.width - 2 * c->bw;
|
||||||
scale_data.height = clip_box.height - 2 * c->bw;
|
scale_data.height = clip_box.height - 2 * c->bw;
|
||||||
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
|
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip_box);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue