fix the issue of restoring focus(#37)

This commit is contained in:
Jinhao
2015-04-15 22:36:24 +08:00
parent 53c36b7363
commit f11e5efe80
3 changed files with 42 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ namespace nana
private:
void _m_move(bool to_left);
bool _m_popup_menu();
void _m_total_close();
void _m_total_close(bool try_restore);
bool _m_close_menu();
void _m_unload_menu_window();
std::size_t _m_item_by_pos(const ::nana::point&);
@@ -90,6 +90,11 @@ namespace nana
nana::menu *menu;
nana::point mouse_pos;
//The menu will restore the focus of taken window. But the restoring during
//key_press and key_release resets the focus to the taken window, it causes
//the taken window to receive a key_char which should be received by menubar.
bool delay_restore;
}state_;
};
}//end namespace menubar