diff options
author | crupest <crupest@outlook.com> | 2019-06-14 00:44:14 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-06-14 00:44:14 +0800 |
commit | 5ec370e5f91ad8b5ed7717eb93f4e3240ea4e784 (patch) | |
tree | 970188397f236715d3d021ddcfcbdeeee73ee860 /src/win | |
parent | 7b1e9fd2410c9d4fafbe5de9459b18775e6cc465 (diff) | |
download | cru-5ec370e5f91ad8b5ed7717eb93f4e3240ea4e784.tar.gz cru-5ec370e5f91ad8b5ed7717eb93f4e3240ea4e784.tar.bz2 cru-5ec370e5f91ad8b5ed7717eb93f4e3240ea4e784.zip |
...
Diffstat (limited to 'src/win')
-rw-r--r-- | src/win/native/win_native_window.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/win/native/win_native_window.cpp b/src/win/native/win_native_window.cpp index a2f23a2c..9ca37321 100644 --- a/src/win/native/win_native_window.cpp +++ b/src/win/native/win_native_window.cpp @@ -254,13 +254,13 @@ RECT WinNativeWindow::GetClientRectPixel() { void WinNativeWindow::OnDestroyInternal() { application_->GetWindowManager()->UnregisterWindow(hwnd_); hwnd_ = nullptr; - destroy_event_.Raise(); + destroy_event_.Raise(nullptr); if (delete_this_on_destroy_) application_->InvokeLater([this] { delete this; }); } void WinNativeWindow::OnPaintInternal() { - paint_event_.Raise(); + paint_event_.Raise(nullptr); ValidateRect(hwnd_, nullptr); } @@ -302,8 +302,7 @@ void WinNativeWindow::OnMouseMoveInternal(const POINT point) { mouse_enter_leave_event_.Raise(true); } - const auto dip_point = PiToDip(point); - mouse_move_event_.Raise(dip_point); + mouse_move_event_.Raise(PiToDip(point)); } void WinNativeWindow::OnMouseLeaveInternal() { @@ -314,13 +313,13 @@ void WinNativeWindow::OnMouseLeaveInternal() { void WinNativeWindow::OnMouseDownInternal(platform::native::MouseButton button, POINT point) { const auto dip_point = PiToDip(point); - mouse_down_event_.Raise(button, dip_point); + mouse_down_event_.Raise({button, dip_point}); } void WinNativeWindow::OnMouseUpInternal(platform::native::MouseButton button, POINT point) { const auto dip_point = PiToDip(point); - mouse_up_event_.Raise(button, dip_point); + mouse_up_event_.Raise({button, dip_point}); } void WinNativeWindow::OnMouseWheelInternal(short delta, POINT point) {} |