correct the process of failure of resizing a window

This commit is contained in:
Jinhao
2017-09-28 08:29:19 +08:00
parent 8d9351e051
commit d715c87d93
8 changed files with 115 additions and 131 deletions

View File

@@ -250,17 +250,24 @@ namespace detail
_m_emit_core(evt_code, wd, false, arg, bForce__EmitInternal);
//A child of wd may not be drawn if it was out of wd's range before wd resized,
//so refresh all children of wd when a resized occurs.
if(ask_update || (event_code::resized == evt_code))
bool good_wd = false;
if(wd_manager().available(wd))
{
wd_manager().do_lazy_refresh(wd, false, (event_code::resized == evt_code));
//A child of wd may not be drawn if it was out of wd's range before wd resized,
//so refresh all children of wd when a resized occurs.
if(ask_update || (event_code::resized == evt_code) || (update_state::refreshed == wd->other.upd_state))
{
wd_manager().do_lazy_refresh(wd, false, (event_code::resized == evt_code));
}
else
wd->other.upd_state = update_state::none;
good_wd = true;
}
else if(wd_manager().available(wd))
wd->other.upd_state = core_window_t::update_state::none;
if(thrd) thrd->event_window = prev_wd;
return true;
return good_wd;
}
void assign_arg(arg_mouse& arg, basic_window* wd, unsigned msg, const XEvent& evt)