mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-07-04 00:07:04 -04:00
fix: fix blur and shield node offset error for firfox
This commit is contained in:
parent
c644c43d28
commit
65637b77a5
1 changed files with 15 additions and 8 deletions
|
|
@ -507,17 +507,20 @@ void client_draw_shield(Client *c, struct wlr_box clip_box) {
|
|||
return;
|
||||
}
|
||||
|
||||
struct wlr_box surface_relative_geom;
|
||||
client_get_clip(c, &surface_relative_geom);
|
||||
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
clip_box.x = 0;
|
||||
clip_box.y = 0;
|
||||
clip_box.x = surface_relative_geom.x;
|
||||
clip_box.y = surface_relative_geom.y;
|
||||
clip_box.width = c->animation.current.width - 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) {
|
||||
int32_t shield_x = clip_box.x + (int32_t)c->bw;
|
||||
int32_t shield_y = clip_box.y + (int32_t)c->bw;
|
||||
int32_t shield_x = 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_set_position(&c->shield->node, shield_x, shield_y);
|
||||
wlr_scene_rect_set_size(c->shield, clip_box.width, clip_box.height);
|
||||
|
|
@ -541,18 +544,22 @@ void client_draw_blur(Client *c, struct wlr_box clip_box, struct ivec2 offset) {
|
|||
return;
|
||||
} else {
|
||||
if (config.blur && !c->noblur) {
|
||||
|
||||
struct wlr_box surface_relative_geom;
|
||||
client_get_clip(c, &surface_relative_geom);
|
||||
|
||||
if (c == grabc || (!ISSCROLLTILED(c) && !c->animation.tagining &&
|
||||
!c->animation.tagouting)) {
|
||||
clip_box.x = 0;
|
||||
clip_box.y = 0;
|
||||
clip_box.x = surface_relative_geom.x;
|
||||
clip_box.y = surface_relative_geom.y;
|
||||
clip_box.width =
|
||||
c->animation.current.width - 2 * (int32_t)c->bw;
|
||||
clip_box.height =
|
||||
c->animation.current.height - 2 * (int32_t)c->bw;
|
||||
}
|
||||
|
||||
int32_t blur_x = clip_box.x + (int32_t)c->bw;
|
||||
int32_t blur_y = clip_box.y + (int32_t)c->bw;
|
||||
int32_t blur_x = clip_box.x - surface_relative_geom.x + (int32_t)c->bw;
|
||||
int32_t blur_y = clip_box.y - surface_relative_geom.y + (int32_t)c->bw;
|
||||
wlr_scene_node_set_enabled(&c->blur->node, true);
|
||||
wlr_scene_node_set_position(&c->blur->node, blur_x, blur_y);
|
||||
wlr_scene_blur_set_size(c->blur, clip_box.width, clip_box.height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue