From d213e7286621cc9d3b5feea55a676eb6cc5e28e9 Mon Sep 17 00:00:00 2001 From: mara Date: Wed, 14 May 2025 13:32:57 +0000 Subject: [PATCH] wayland: Unbreak build with libdecor=no In #101774, some libdecor-specific code was added, but without adding the guards. This broke the build with `libdecor=no`. Add `#ifdef` guard as necessary. --- platform/linuxbsd/wayland/wayland_thread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/linuxbsd/wayland/wayland_thread.cpp b/platform/linuxbsd/wayland/wayland_thread.cpp index 4f5a08e96b6..51454185858 100644 --- a/platform/linuxbsd/wayland/wayland_thread.cpp +++ b/platform/linuxbsd/wayland/wayland_thread.cpp @@ -1287,6 +1287,7 @@ void WaylandThread::_xdg_popup_on_configure(void *data, struct xdg_popup *xdg_po ERR_FAIL_NULL(parent); Point2i pos = Point2i(x, y); +#ifdef LIBDECOR_ENABLED if (parent->libdecor_frame) { int translated_x = x; int translated_y = y; @@ -1295,6 +1296,7 @@ void WaylandThread::_xdg_popup_on_configure(void *data, struct xdg_popup *xdg_po pos.x = translated_x; pos.y = translated_y; } +#endif // Looks like the position returned here is relative to the parent. We have to // accumulate it or there's gonna be a lot of confusion godot-side.