Skip to content

Commit c3b04e6

Browse files
committed
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.
1 parent 19bb187 commit c3b04e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/linuxbsd/wayland/display_server_wayland.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,12 +1236,12 @@ void DisplayServerWayland::window_set_flag(WindowFlags p_flag, bool p_enabled, D
12361236

12371237
case WINDOW_FLAG_POPUP: {
12381238
ERR_FAIL_COND_MSG(p_window_id == MAIN_WINDOW_ID, "Main window can't be popup.");
1239-
ERR_FAIL_COND_MSG(wd.visible, "Popup flag can't changed while window is opened.");
1239+
ERR_FAIL_COND_MSG(wd.visible && (wd.flags & WINDOW_FLAG_POPUP_BIT) != p_enabled, "Popup flag can't changed while window is opened.");
12401240
} break;
12411241

12421242
case WINDOW_FLAG_POPUP_WM_HINT: {
12431243
ERR_FAIL_COND_MSG(p_window_id == MAIN_WINDOW_ID, "Main window can't have popup hint.");
1244-
ERR_FAIL_COND_MSG(wd.visible, "Popup hint can't changed while window is opened.");
1244+
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.");
12451245
} break;
12461246

12471247
default: {

0 commit comments

Comments
 (0)