Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: ui/views/widget/desktop_aura/x11_window_event_filter.cc

Issue 239213003: Revert of Prevents double-clicks on a tab close button from aslo maximizing the browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/x11_window_event_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « ui/views/widget/desktop_aura/x11_window_event_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698