diff options
author | crupest <crupest@outlook.com> | 2022-03-29 12:24:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-03-29 12:24:06 +0800 |
commit | 7a564d98db0b7c7be5b3bfac955cb88998a472ac (patch) | |
tree | 891abaf06a4e011a798c8daf5f063230ec67f995 /src/ui/host/RoutedEventDispatch.h | |
parent | 91695b78f565239223fc6f3a10b0219b8dc1b6f8 (diff) | |
download | cru-7a564d98db0b7c7be5b3bfac955cb88998a472ac.tar.gz cru-7a564d98db0b7c7be5b3bfac955cb88998a472ac.tar.bz2 cru-7a564d98db0b7c7be5b3bfac955cb88998a472ac.zip |
...
Diffstat (limited to 'src/ui/host/RoutedEventDispatch.h')
-rw-r--r-- | src/ui/host/RoutedEventDispatch.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/host/RoutedEventDispatch.h b/src/ui/host/RoutedEventDispatch.h index 2f437b31..5d1c8ce5 100644 --- a/src/ui/host/RoutedEventDispatch.h +++ b/src/ui/host/RoutedEventDispatch.h @@ -3,10 +3,11 @@ #include "cru/common/log/Logger.h" #include "cru/ui/DebugFlags.h" #include "cru/ui/controls/Control.h" +#include "cru/ui/host/WindowHost.h" #include <vector> -namespace cru::ui { +namespace cru::ui::host { // Dispatch the event. // // This will raise routed event of the control and its parent and parent's @@ -40,6 +41,8 @@ void DispatchEvent( return; } + WindowHost::EnterEventHandling(); + std::vector<ObjectResolver<controls::Control>> receive_list; auto parent = original_sender; @@ -119,5 +122,7 @@ void DispatchEvent( if constexpr (debug_flags::routed_event) CRU_LOG_DEBUG(u"Routed event dispatch finished."); + + WindowHost::LeaveEventHandling(); } -} // namespace cru::ui +} // namespace cru::ui::host |