diff options
author | zverre <zverre@yandex-team.ru> | 2016-02-01 10:27:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-01 18:29:40 +0000 |
commit | 81b5cb0d50df07fd6959ee8d8a2f2601ce921401 (patch) | |
tree | 30306d54accf10a5ed7504b204e6c4f46946a832 /ui/views | |
parent | c9059f37c9eea0430389d9f0c8802e8654b21ba3 (diff) | |
download | chromium_src-81b5cb0d50df07fd6959ee8d8a2f2601ce921401.zip chromium_src-81b5cb0d50df07fd6959ee8d8a2f2601ce921401.tar.gz chromium_src-81b5cb0d50df07fd6959ee8d8a2f2601ce921401.tar.bz2 |
Allow all non-activatable windows to process clicks
This rolls back what was previosuly done in
https://codereview.chromium.org/1565713002 because simpler approach has
been found. Now every window that's been created with ACTIVATABLE_NO
flag can process clicks and remain unfocused.
BUG=
Review URL: https://codereview.chromium.org/1619523002
Cr-Commit-Position: refs/heads/master@{#372691}
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc | 3 | ||||
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h | 4 | ||||
-rw-r--r-- | ui/views/widget/widget.h | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc index c354154..f79b3c4 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -125,6 +125,7 @@ void DesktopWindowTreeHostWin::Init(aura::Window* content_window, const Widget::InitParams& params) { // TODO(beng): SetInitParams(). content_window_ = content_window; + wants_mouse_events_when_inactive_ = params.wants_mouse_events_when_inactive; aura::client::SetAnimationHost(content_window_, this); @@ -626,7 +627,7 @@ bool DesktopWindowTreeHostWin::CanActivate() const { } bool DesktopWindowTreeHostWin::WantsMouseEventsWhenInactive() const { - return false; + return wants_mouse_events_when_inactive_; } bool DesktopWindowTreeHostWin::WidgetSizeIsClientSize() const { diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h index ad82485..963658a 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h @@ -256,6 +256,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; + // Indicates if current window will receive mouse events when should not + // become activated. + bool wants_mouse_events_when_inactive_ = false; + DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostWin); }; diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h index 11778fd..8c92b90 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h @@ -270,6 +270,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // If true then the widget uses software compositing. Defaults to false. // Only used on Windows. bool force_software_compositing; + + // Used if widget is not activatable to do determine if mouse events should + // be sent to the widget. + bool wants_mouse_events_when_inactive = false; }; Widget(); |