add event filter contributed by A2Razor

This commit is contained in:
Jinhao
2017-09-01 22:57:12 +08:00
parent 2cf0adf777
commit 2974fe2137
9 changed files with 254 additions and 89 deletions

View File

@@ -755,7 +755,7 @@ namespace detail
}
template<typename Arg>
void draw_invoker(void (::nana::detail::drawer::*event_ptr)(const Arg&), basic_window* wd, const Arg& arg, bedrock::thread_context* thrd)
void draw_invoker(void (::nana::detail::drawer::*event_ptr)(const Arg&, const bool), basic_window* wd, const Arg& arg, bedrock::thread_context* thrd)
{
if (bedrock::instance().wd_manager().available(wd) == false)
return;
@@ -770,7 +770,7 @@ namespace detail
if (wd->other.upd_state == basic_window::update_state::none)
wd->other.upd_state = basic_window::update_state::lazy;
(wd->drawer.*event_ptr)(arg);
(wd->drawer.*event_ptr)(arg, false);
if (thrd) thrd->event_window = prev_event_wd;
}
@@ -1626,7 +1626,7 @@ namespace detail
}
}
bool bedrock::emit(event_code evt_code, core_window_t* wd, const ::nana::event_arg& arg, bool ask_update, thread_context* thrd)
bool bedrock::emit(event_code evt_code, core_window_t* wd, const ::nana::event_arg& arg, bool ask_update, thread_context* thrd, const bool bForce__EmitInternal)
{
if (wd_manager().available(wd) == false)
return false;
@@ -1642,7 +1642,7 @@ namespace detail
if (wd->other.upd_state == core_window_t::update_state::none)
wd->other.upd_state = core_window_t::update_state::lazy;
_m_emit_core(evt_code, wd, false, arg);
_m_emit_core(evt_code, wd, false, arg, bForce__EmitInternal);
bool good_wd = false;
if (wd_manager().available(wd))