diff options
author | crupest <crupest@outlook.com> | 2019-04-04 17:52:15 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-04 17:52:15 +0800 |
commit | 4d650160a388b0192e04c454ba1a3de21b0d4cc3 (patch) | |
tree | f9c416767e039eeb7c5a37f93b70443f37c49f1d /src/platform_win/win_native_window.cpp | |
parent | a410e2048db6f5ef6fb50e401a59b4b98b979050 (diff) | |
download | cru-4d650160a388b0192e04c454ba1a3de21b0d4cc3.tar.gz cru-4d650160a388b0192e04c454ba1a3de21b0d4cc3.tar.bz2 cru-4d650160a388b0192e04c454ba1a3de21b0d4cc3.zip |
...
Diffstat (limited to 'src/platform_win/win_native_window.cpp')
-rw-r--r-- | src/platform_win/win_native_window.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platform_win/win_native_window.cpp b/src/platform_win/win_native_window.cpp index ae740205..12c25674 100644 --- a/src/platform_win/win_native_window.cpp +++ b/src/platform_win/win_native_window.cpp @@ -4,6 +4,7 @@ #include "cru/platform/win/win_application.hpp" #include "cru/platform/win/win_painter.hpp" #include "cru/platform/win/window_class.hpp" +#include "cru/platform/win/window_render_target.hpp" #include "dpi_util.hpp" #include "window_manager.hpp" @@ -258,10 +259,11 @@ void WinNativeWindow::OnPaintInternal() { void WinNativeWindow::OnResizeInternal(const int new_width, const int new_height) { - // render_target_->ResizeBuffer(new_width, new_height); - if (!(new_width == 0 && new_height == 0)) + if (!(new_width == 0 && new_height == 0)) { + window_render_target_->ResizeBuffer(new_width, new_height); resize_event_.Raise( ui::Size{PixelToDipX(new_width), PixelToDipY(new_height)}); + } } void WinNativeWindow::OnSetFocusInternal() { |