Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Wayland: Ensure popup size is at least 1x1

Dery Almas977a0a6e4c04
diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp
index c9305a87032..3ad1c48df84 100644
--- a/platform/linuxbsd/wayland/wayland_thread.cpp
+++ b/platform/linuxbsd/wayland/wayland_thread.cpp
@@ -4445,6 +4445,9 @@ void WaylandThread::window_create_popup(DisplayServerEnums::WindowID p_window_id
p_rect.position = scale_vector2i(p_rect.position, 1.0 / parent_scale);
p_rect.size = scale_vector2i(p_rect.size, 1.0 / parent_scale);
+
+ p_rect.size = p_rect.size.maxi(1);
+
// We manually scaled based on the parent. If we don't set the relevant fields,
// the resizing routines will get confused and scale once more.
ws.preferred_fractional_scale = parent.preferred_fractional_scale;