Do not activate the select list window on Windows (issue #169).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@179 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-02-01 15:37:47 +00:00
parent 915f3673f8
commit d2ce65040e
13 changed files with 109 additions and 135 deletions

View File

@@ -56,18 +56,14 @@ WebWidget* BrowserWebViewDelegate::createPopupMenu(
// WebWidgetClient ------------------------------------------------------------
void BrowserWebViewDelegate::show(WebNavigationPolicy) {
if (WebWidgetHost* host = GetWidgetHost()) {
HWND root = GetAncestor(host->view_handle(), GA_ROOT);
if (this == browser_->UIT_GetWebViewDelegate()) {
// Restore the window and bring it to the top.
HWND root = GetAncestor(browser_->UIT_GetMainWndHandle(), GA_ROOT);
ShowWindow(root, SW_SHOWNORMAL);
SetWindowPos(root, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
}
}
void BrowserWebViewDelegate::closeWidgetSoon() {
if (this == browser_->UIT_GetWebViewDelegate()) {
PostMessage(browser_->UIT_GetMainWndHandle(), WM_CLOSE, 0, 0);
} else if (this == browser_->UIT_GetPopupDelegate()) {
browser_->UIT_ClosePopupWidget();
// Show popup widgets without activation.
ShowWindow(browser_->UIT_GetPopupWndHandle(), SW_SHOWNA);
}
}