mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-05 00:06:20 -04:00
fix: fix blur and shield node offset error for firfox
This commit is contained in:
parent
739f998214
commit
19e5198829
1 changed files with 9 additions and 4 deletions
|
|
@ -370,17 +370,22 @@ void client_draw_shield(Client *c, struct wlr_box clip_box) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct wlr_box surface_relative_geom;
|
||||||
|
client_get_clip(c, &surface_relative_geom);
|
||||||
|
|
||||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||||
!c->animation.tagouting)) {
|
!c->animation.tagouting)) {
|
||||||
clip_box.x = 0;
|
clip_box.x = surface_relative_geom.x;
|
||||||
clip_box.y = 0;
|
clip_box.y = surface_relative_geom.y;
|
||||||
clip_box.width = c->animation.current.width - 2 * (int32_t)c->bw;
|
clip_box.width = c->animation.current.width - 2 * (int32_t)c->bw;
|
||||||
clip_box.height = c->animation.current.height - 2 * (int32_t)c->bw;
|
clip_box.height = c->animation.current.height - 2 * (int32_t)c->bw;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (active_capture_count > 0 && c->shield_when_capture) {
|
if (active_capture_count > 0 && c->shield_when_capture) {
|
||||||
int32_t shield_x = clip_box.x + (int32_t)c->bw;
|
int32_t shield_x =
|
||||||
int32_t shield_y = clip_box.y + (int32_t)c->bw;
|
clip_box.x - surface_relative_geom.x + (int32_t)c->bw;
|
||||||
|
int32_t shield_y =
|
||||||
|
clip_box.y - surface_relative_geom.y + (int32_t)c->bw;
|
||||||
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, shield_x, shield_y);
|
wlr_scene_node_set_position(&c->shield->node, shield_x, shield_y);
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue