From 4312df1a13b182ed3f00838b5300a8f848f6c2fa Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 5 Oct 2018 00:00:19 +0800 Subject: Only relayout window when new size is not zero. --- src/ui/window.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ui/window.cpp') 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() -- cgit v1.2.3