aboutsummaryrefslogtreecommitdiff
path: root/CruUI-Generate
diff options
context:
space:
mode:
Diffstat (limited to 'CruUI-Generate')
-rw-r--r--CruUI-Generate/cru_ui.cpp13
-rw-r--r--CruUI-Generate/cru_ui.hpp7
2 files changed, 5 insertions, 15 deletions
diff --git a/CruUI-Generate/cru_ui.cpp b/CruUI-Generate/cru_ui.cpp
index 2a1d93e1..6db99a0e 100644
--- a/CruUI-Generate/cru_ui.cpp
+++ b/CruUI-Generate/cru_ui.cpp
@@ -2307,15 +2307,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) {
diff --git a/CruUI-Generate/cru_ui.hpp b/CruUI-Generate/cru_ui.hpp
index 1912e243..f662f4bd 100644
--- a/CruUI-Generate/cru_ui.hpp
+++ b/CruUI-Generate/cru_ui.hpp
@@ -1067,13 +1067,6 @@ namespace cru {
(handler.second)(args);
}
-
- //TODO: Remove this!
- bool IsNoHandler() const
- {
- return handlers_.empty();
- }
-
private:
std::map<EventHandlerToken, EventHandler> handlers_;