| Index: ui/views/widget/desktop_aura/x11_window_event_filter.cc
|
| diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.cc b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
|
| index 887bb979e0b16f3facdf5037d93f315cf05cf882..d6fbfc0fbd637fae65f7819bd45a7c5b19371605 100644
|
| --- a/ui/views/widget/desktop_aura/x11_window_event_filter.cc
|
| +++ b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
|
| @@ -68,8 +68,7 @@
|
| x_root_window_(DefaultRootWindow(xdisplay_)),
|
| atom_cache_(xdisplay_, kAtomsToCache),
|
| window_tree_host_(window_tree_host),
|
| - is_active_(false),
|
| - click_component_(HTNOWHERE) {
|
| + is_active_(false) {
|
| }
|
|
|
| X11WindowEventFilter::~X11WindowEventFilter() {
|
| @@ -103,13 +102,8 @@
|
| if (!target->delegate())
|
| return;
|
|
|
| - int previous_click_component = HTNOWHERE;
|
| int component =
|
| target->delegate()->GetNonClientComponent(event->location());
|
| - if (event->IsLeftMouseButton()) {
|
| - previous_click_component = click_component_;
|
| - click_component_ = component;
|
| - }
|
| if (component == HTCLIENT)
|
| return;
|
|
|
| @@ -140,18 +134,15 @@
|
| }
|
|
|
| // Left button case.
|
| - if (event->flags() & ui::EF_IS_DOUBLE_CLICK) {
|
| - click_component_ = HTNOWHERE;
|
| - if (component == HTCAPTION &&
|
| - target->GetProperty(aura::client::kCanMaximizeKey) &&
|
| - previous_click_component == component) {
|
| - // Our event is a double click in the caption area in a window that can be
|
| - // maximized. We are responsible for dispatching this as a minimize/
|
| - // maximize on X11 (Windows converts this to min/max events for us).
|
| - ToggleMaximizedState();
|
| - event->SetHandled();
|
| - return;
|
| - }
|
| + if (event->flags() & ui::EF_IS_DOUBLE_CLICK &&
|
| + component == HTCAPTION &&
|
| + target->GetProperty(aura::client::kCanMaximizeKey)) {
|
| + // Our event is a double click in the caption area in a window that can be
|
| + // maximized. We are responsible for dispatching this as a minimize/
|
| + // maximize on X11 (Windows converts this to min/max events for us).
|
| + ToggleMaximizedState();
|
| + event->SetHandled();
|
| + return;
|
| }
|
|
|
| // Get the |x_root_window_| location out of the native event.
|
|
|