aboutsummaryrefslogtreecommitdiff
path: root/src/ui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.cpp')
-rw-r--r--src/ui/window.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ui/window.cpp b/src/ui/window.cpp
index c757c4e1..ac79392b 100644
--- a/src/ui/window.cpp
+++ b/src/ui/window.cpp
@@ -322,15 +322,12 @@ namespace cru::ui
bool Window::HandleWindowMessage(HWND hwnd, int msg, WPARAM w_param, LPARAM l_param, LRESULT & result) {
- if (!native_message_event.IsNoHandler())
+ events::WindowNativeMessageEventArgs args(this, this, {hwnd, msg, w_param, l_param});
+ native_message_event.Raise(args);
+ if (args.GetResult().has_value())
{
- events::WindowNativeMessageEventArgs args(this, this, {hwnd, msg, w_param, l_param});
- native_message_event.Raise(args);
- if (args.GetResult().has_value())
- {
- result = args.GetResult().value();
- return true;
- }
+ result = args.GetResult().value();
+ return true;
}
switch (msg) {