fix caret issue

This commit is contained in:
Jinhao
2017-11-02 16:36:23 +08:00
parent 0796c1540b
commit 74f5a8f40b
5 changed files with 26 additions and 17 deletions

View File

@@ -151,7 +151,8 @@ namespace nana
arg.window_handle = reinterpret_cast<window>(wd);
if (emit(event_code::expose, wd, arg, false, get_thread_context()))
{
const core_window_t * caret_wd = (wd->annex.caret_ptr ? wd : wd->child_caret());
//Get the window who has the activated caret
const core_window_t * caret_wd = ((wd->annex.caret_ptr && wd->annex.caret_ptr->activated()) ? wd : wd->child_caret());
if (caret_wd)
{
if (exposed)