diff options
author | crupest <crupest@outlook.com> | 2018-10-05 00:00:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-10-05 00:00:19 +0800 |
commit | 4312df1a13b182ed3f00838b5300a8f848f6c2fa (patch) | |
tree | 9ce27f5fe5e3dc745bc31cfd97bdb10bb973c0fe | |
parent | 01ab4511d3006e9f65ff96ae63b21de14b41bc48 (diff) | |
download | cru-4312df1a13b182ed3f00838b5300a8f848f6c2fa.tar.gz cru-4312df1a13b182ed3f00838b5300a8f848f6c2fa.tar.bz2 cru-4312df1a13b182ed3f00838b5300a8f848f6c2fa.zip |
Only relayout window when new size is not zero.
-rw-r--r-- | src/ui/window.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/window.cpp b/src/ui/window.cpp index 5e0dd694..ca19e8ee 100644 --- a/src/ui/window.cpp +++ b/src/ui/window.cpp @@ -498,9 +498,10 @@ namespace cru ValidateRect(hwnd_, nullptr); } - void Window::OnResizeInternal(int new_width, int new_height) { + void Window::OnResizeInternal(const int new_width, const int new_height) { render_target_->ResizeBuffer(new_width, new_height); - Relayout(); + if (!(new_width == 0 && new_height == 0)) + Relayout(); } void Window::OnSetFocusInternal() |