diff options
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/wayland_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index a19f9c1c03..cf4fb8a574 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -890,6 +890,11 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel, struct mp_vo_opts *vo_opts = wl->vo_opts; struct mp_rect old_geometry = wl->geometry; + if (width < 0 || height < 0) { + MP_WARN(wl, "Compositor sent negative width/height values. Treating them as zero.\n"); + width = height = 0; + } + int old_toplevel_width = wl->toplevel_width; int old_toplevel_height = wl->toplevel_height; wl->toplevel_width = width; |