mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-02 09:01:43 -05:00
fix: error scale offset affter apply clip_to_hide
This commit is contained in:
parent
b56a99770f
commit
940ff0c1cc
1 changed files with 12 additions and 2 deletions
14
src/maomao.c
14
src/maomao.c
|
|
@ -1274,8 +1274,8 @@ void client_apply_clip(Client *c) {
|
|||
scale_data.should_scale = true;
|
||||
scale_data.width = clip_box.width - 2 * c->bw;
|
||||
scale_data.height = clip_box.height - 2 * c->bw;
|
||||
scale_data.width_scale = (float)scale_data.width / geometry.width;
|
||||
scale_data.height_scale = (float)scale_data.height / geometry.height;
|
||||
scale_data.width_scale = (float)scale_data.width / (geometry.width - offset.x);
|
||||
scale_data.height_scale = (float)scale_data.height / (geometry.height - offset.y);
|
||||
buffer_set_effect(c, scale_data);
|
||||
}
|
||||
|
||||
|
|
@ -4917,6 +4917,16 @@ void scene_buffer_apply_effect(struct wlr_scene_buffer *buffer, int sx, int sy,
|
|||
surface_height = scale_data->height;
|
||||
}
|
||||
|
||||
if (surface_width > scale_data->width &&
|
||||
wlr_subsurface_try_from_wlr_surface(surface) != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (surface_height > scale_data->height &&
|
||||
wlr_subsurface_try_from_wlr_surface(surface) != NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (surface_height > 0 && surface_width > 0) {
|
||||
wlr_scene_buffer_set_dest_size(buffer, surface_width, surface_height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue