mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
fix:avoid to set error size to buffer
This commit is contained in:
parent
6a08dc117e
commit
4c59533fad
1 changed files with 9 additions and 0 deletions
9
maomao.c
9
maomao.c
|
|
@ -4206,6 +4206,15 @@ void scene_buffer_apply_opacity(struct wlr_scene_buffer *buffer, int sx, int sy,
|
||||||
void scene_buffer_apply_size(struct wlr_scene_buffer *buffer, int sx, int sy,
|
void scene_buffer_apply_size(struct wlr_scene_buffer *buffer, int sx, int sy,
|
||||||
void *data) {
|
void *data) {
|
||||||
animationScale *scale_data = (animationScale *)data;
|
animationScale *scale_data = (animationScale *)data;
|
||||||
|
|
||||||
|
if(scale_data->height_scale <= 0 || scale_data->width_scale <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(scale_data->height <= 0 || scale_data->width <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct wlr_scene_surface *surface = wlr_scene_surface_try_from_buffer(buffer);
|
struct wlr_scene_surface *surface = wlr_scene_surface_try_from_buffer(buffer);
|
||||||
if (wlr_subsurface_try_from_wlr_surface(surface->surface) != NULL) {
|
if (wlr_subsurface_try_from_wlr_surface(surface->surface) != NULL) {
|
||||||
wlr_scene_buffer_set_dest_size(
|
wlr_scene_buffer_set_dest_size(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue