summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-05 00:28:42 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-05 00:28:42 +0000
commitf96cd1fc402a3c6a1156b78a8a8489a45564f267 (patch)
treec71655d54288c19b5ac9bedae8d7de0e7399d5e1 /ui
parentfefc95229ca7b462052c27a33ee1297ddc072d1d (diff)
downloadchromium_src-f96cd1fc402a3c6a1156b78a8a8489a45564f267.zip
chromium_src-f96cd1fc402a3c6a1156b78a8a8489a45564f267.tar.gz
chromium_src-f96cd1fc402a3c6a1156b78a8a8489a45564f267.tar.bz2
Fix clicking on omnibox dropdown to select result on win aura
Match NativeWidgetWin's implementation of IsWidgetWindow. Otherwise because the omnibox popup is non-activatable, the mouse press is eaten rather than only disallowing activation. R=ben@chromium.org BUG=225192 Review URL: https://chromiumcodereview.appspot.com/13652006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.cc6
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.h5
2 files changed, 9 insertions, 2 deletions
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
index ed137d4..5d31694 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -59,7 +59,8 @@ DesktopRootWindowHostWin::DesktopRootWindowHostWin(
root_window_host_delegate_(NULL),
content_window_(NULL),
should_animate_window_close_(false),
- pending_close_(false) {
+ pending_close_(false),
+ has_non_client_view_(false) {
}
DesktopRootWindowHostWin::~DesktopRootWindowHostWin() {
@@ -110,6 +111,7 @@ aura::RootWindow* DesktopRootWindowHostWin::Init(
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
+ has_non_client_view_ = Widget::RequiresNonClientView(params.type);
message_handler_->Init(parent_hwnd, params.bounds);
aura::RootWindow::CreateParams rw_params(params.bounds);
@@ -505,7 +507,7 @@ void DesktopRootWindowHostWin::OnWindowHidingAnimationCompleted() {
// DesktopRootWindowHostWin, HWNDMessageHandlerDelegate implementation:
bool DesktopRootWindowHostWin::IsWidgetWindow() const {
- return true;
+ return has_non_client_view_;
}
bool DesktopRootWindowHostWin::IsUsingCustomFrame() const {
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.h b/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
index 9aa17c0..bba9d8f 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.h
@@ -258,6 +258,11 @@ class VIEWS_EXPORT DesktopRootWindowHostWin
// so that when the Hide is completed the host window should be closed.
bool pending_close_;
+ // True if the widget is going to have a non_client_view. We cache this value
+ // rather than asking the Widget for the non_client_view so that we know at
+ // Init time, before the Widget has created the NonClientView.
+ bool has_non_client_view_;
+
DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin);
};