Windows: Improve menu responsiveness (issue #194).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@950 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-12-19 16:23:51 +00:00
parent 9accdc8b01
commit f782b4b1e0
10 changed files with 73 additions and 0 deletions

View File

@@ -487,11 +487,15 @@ void BrowserWebViewDelegate::showContextMenu(
if (!menu)
return;
MessageLoop::current()->set_os_modal_loop(true);
// Show the context menu
int selected_id = TrackPopupMenu(menu,
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_RECURSE,
screenX, screenY, 0, browser_->UIT_GetMainWndHandle(), NULL);
MessageLoop::current()->set_os_modal_loop(false);
if (selected_id != 0) {
// An action was chosen
cef_menu_id_t menuId = static_cast<cef_menu_id_t>(selected_id);