From c3b04e6e1e022aaef0185b9daea8a0516b365b27 Mon Sep 17 00:00:00 2001 From: Riteo Date: Mon, 12 May 2025 05:07:09 +0200 Subject: [PATCH] Wayland: fix error spam when closing popup Previously we did not check whether the value actually changed or not and thus would get constant errors for no reason. --- platform/linuxbsd/wayland/display_server_wayland.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index 7b9b7ac502..674a0f5b06 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -1236,12 +1236,12 @@ void DisplayServerWayland::window_set_flag(WindowFlags p_flag, bool p_enabled, D case WINDOW_FLAG_POPUP: { ERR_FAIL_COND_MSG(p_window_id == MAIN_WINDOW_ID, "Main window can't be popup."); - ERR_FAIL_COND_MSG(wd.visible, "Popup flag can't changed while window is opened."); + ERR_FAIL_COND_MSG(wd.visible && (wd.flags & WINDOW_FLAG_POPUP_BIT) != p_enabled, "Popup flag can't changed while window is opened."); } break; case WINDOW_FLAG_POPUP_WM_HINT: { ERR_FAIL_COND_MSG(p_window_id == MAIN_WINDOW_ID, "Main window can't have popup hint."); - ERR_FAIL_COND_MSG(wd.visible, "Popup hint can't changed while window is opened."); + ERR_FAIL_COND_MSG(wd.visible && (wd.flags & WINDOW_FLAG_POPUP_WM_HINT_BIT) != p_enabled, "Popup hint can't changed while window is opened."); } break; default: {