diff --git a/cosmic-app-list/src/wayland_handler.rs b/cosmic-app-list/src/wayland_handler.rs index de89d768..b34edb3d 100644 --- a/cosmic-app-list/src/wayland_handler.rs +++ b/cosmic-app-list/src/wayland_handler.rs @@ -401,6 +401,10 @@ impl CaptureData { .unwrap(); let (width, height) = formats.buffer_size; + if width == 0 || height == 0 { + return None; + } + // XXX if !formats .shm_formats diff --git a/cosmic-applet-minimize/src/wayland_handler.rs b/cosmic-applet-minimize/src/wayland_handler.rs index 15636a77..a98c2539 100644 --- a/cosmic-applet-minimize/src/wayland_handler.rs +++ b/cosmic-applet-minimize/src/wayland_handler.rs @@ -167,6 +167,10 @@ impl CaptureData { .unwrap(); let (width, height) = formats.buffer_size; + if width == 0 || height == 0 { + return None; + } + // XXX if !formats .shm_formats