From 584a6aeeb76415524b068e733d23f73a2836eb88 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 21 Feb 2024 15:28:34 -0300 Subject: [PATCH] Revert "Fix `NOTIFICATION_WM_SIZE_CHANGED` firing if the size hasn't changed" This reverts commit 957378a69eb4dbd0066f91a9f4e44dc02cd360bd, reversing changes made to 0d88840e81596e8378f8cc444c6fcb61cfa676d0. --- scene/main/window.cpp | 5 +---- scene/main/window.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scene/main/window.cpp b/scene/main/window.cpp index c7cd52124aca..3dbd96a53f79 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1193,10 +1193,7 @@ void Window::_update_viewport_size() { } } - if (old_size != size) { - old_size = size; - notification(NOTIFICATION_WM_SIZE_CHANGED); - } + notification(NOTIFICATION_WM_SIZE_CHANGED); if (embedder) { embedder->_sub_window_update(this); diff --git a/scene/main/window.h b/scene/main/window.h index 73dba67f4554..768bd407bb3c 100644 --- a/scene/main/window.h +++ b/scene/main/window.h @@ -116,7 +116,6 @@ class Window : public Viewport { mutable Size2i size = Size2i(DEFAULT_WINDOW_SIZE, DEFAULT_WINDOW_SIZE); mutable Size2i min_size; mutable Size2i max_size; - mutable Size2i old_size = size; mutable Vector mpath; mutable Mode mode = MODE_WINDOWED; mutable bool flags[FLAG_MAX] = {};