mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-06 07:15:53 -04:00
opt: make surface node as shield parent node
This commit is contained in:
parent
b400fd5aad
commit
593084b036
2 changed files with 3 additions and 4 deletions
|
|
@ -353,8 +353,7 @@ void client_draw_shadow(Client *c) {
|
||||||
void apply_shield(Client *c, struct wlr_box clip_box) {
|
void apply_shield(Client *c, struct wlr_box clip_box) {
|
||||||
if (active_capture_count > 0 && c->shield_when_capture) {
|
if (active_capture_count > 0 && c->shield_when_capture) {
|
||||||
wlr_scene_node_raise_to_top(&c->shield->node);
|
wlr_scene_node_raise_to_top(&c->shield->node);
|
||||||
wlr_scene_node_set_position(&c->shield->node, clip_box.x + c->bw,
|
wlr_scene_node_set_position(&c->shield->node, clip_box.x, clip_box.y);
|
||||||
clip_box.y + c->bw);
|
|
||||||
wlr_scene_rect_set_size(c->shield, clip_box.width, clip_box.height);
|
wlr_scene_rect_set_size(c->shield, clip_box.width, clip_box.height);
|
||||||
wlr_scene_node_set_enabled(&c->shield->node, true);
|
wlr_scene_node_set_enabled(&c->shield->node, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -4015,8 +4015,8 @@ mapnotify(struct wl_listener *listener, void *data) {
|
||||||
wlr_scene_node_lower_to_bottom(&c->shadow->node);
|
wlr_scene_node_lower_to_bottom(&c->shadow->node);
|
||||||
wlr_scene_node_set_enabled(&c->shadow->node, true);
|
wlr_scene_node_set_enabled(&c->shadow->node, true);
|
||||||
|
|
||||||
c->shield =
|
c->shield = wlr_scene_rect_create(c->scene_surface, 0, 0,
|
||||||
wlr_scene_rect_create(c->scene, 0, 0, (float[4]){0, 0, 0, 0xff});
|
(float[4]){0, 0, 0, 0xff});
|
||||||
c->shield->node.data = c;
|
c->shield->node.data = c;
|
||||||
wlr_scene_node_lower_to_bottom(&c->shield->node);
|
wlr_scene_node_lower_to_bottom(&c->shield->node);
|
||||||
wlr_scene_node_set_enabled(&c->shield->node, false);
|
wlr_scene_node_set_enabled(&c->shield->node, false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue