Merge pull request #84151 from YeldhamDev/that_was_not_a_resize_you_dunce
Fix `NOTIFICATION_WM_SIZE_CHANGED` firing if the size hasn't changed
This commit is contained in:
commit
957378a69e
2 changed files with 5 additions and 1 deletions
|
@ -1160,7 +1160,10 @@ void Window::_update_viewport_size() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notification(NOTIFICATION_WM_SIZE_CHANGED);
|
if (old_size != size) {
|
||||||
|
old_size = size;
|
||||||
|
notification(NOTIFICATION_WM_SIZE_CHANGED);
|
||||||
|
}
|
||||||
|
|
||||||
if (embedder) {
|
if (embedder) {
|
||||||
embedder->_sub_window_update(this);
|
embedder->_sub_window_update(this);
|
||||||
|
|
|
@ -117,6 +117,7 @@ private:
|
||||||
mutable Size2i size = Size2i(DEFAULT_WINDOW_SIZE, DEFAULT_WINDOW_SIZE);
|
mutable Size2i size = Size2i(DEFAULT_WINDOW_SIZE, DEFAULT_WINDOW_SIZE);
|
||||||
mutable Size2i min_size;
|
mutable Size2i min_size;
|
||||||
mutable Size2i max_size;
|
mutable Size2i max_size;
|
||||||
|
mutable Size2i old_size = size;
|
||||||
mutable Vector<Vector2> mpath;
|
mutable Vector<Vector2> mpath;
|
||||||
mutable Mode mode = MODE_WINDOWED;
|
mutable Mode mode = MODE_WINDOWED;
|
||||||
mutable bool flags[FLAG_MAX] = {};
|
mutable bool flags[FLAG_MAX] = {};
|
||||||
|
|
Loading…
Reference in a new issue