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

Issue 222203006: Prevents double-clicks on a tab close button from aslo maximizing the browser (Closed)

Created:
6 years, 8 months ago by jonross
Modified:
6 years, 8 months ago
Reviewers:
flackr, varkha, sadrul
CC:
chromium-reviews, kalyank, ben+views_chromium.org, sadrul, ben+ash_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Prevents double-clicks on a tab close button from aslo maximizing the browser The code responsible for listening to a double-click, and for maximizing the browser is platform dependant. The path on Aura desktop differs from that of Chrome OS. In both cases they use alternate means to trigger the maximizing. This change modifies both so that they only attempt to maximize if the initial click has the same target as the second click. Tab deletion is destructive by nature, lead do different targets processing different parts of the same series of user events. TEST=WorkspaceEventHandlerTest BUG=348817 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263841

Patch Set 1 #

Total comments: 26

Patch Set 2 : Add left-click restrictions #

Total comments: 6

Patch Set 3 : Add X11 Unittest #

Total comments: 11

Patch Set 4 : Address bug in toplevel_window_event_handler #

Total comments: 8

Patch Set 5 : #

Total comments: 8

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+371 lines, -96 lines) Patch
M ash/wm/toplevel_window_event_handler.cc View 1 2 3 4 5 2 chunks +8 lines, -4 lines 0 comments Download
M ash/wm/workspace/workspace_event_handler.h View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M ash/wm/workspace/workspace_event_handler.cc View 1 2 3 4 5 3 chunks +61 lines, -31 lines 0 comments Download
M ash/wm/workspace/workspace_event_handler_unittest.cc View 1 2 20 chunks +137 lines, -43 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc View 1 2 3 4 6 chunks +132 lines, -8 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_window_event_filter.h View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_window_event_filter.cc View 1 2 3 4 5 3 chunks +19 lines, -10 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
jonross
Currently the implementation is separate in both classes. Though I dislike duplicating code, each Aura ...
6 years, 8 months ago (2014-04-02 21:07:15 UTC) #1
varkha
I like the approach. A few small things and questions, thanks for looking into this. ...
6 years, 8 months ago (2014-04-03 04:13:20 UTC) #2
flackr
https://codereview.chromium.org/222203006/diff/1/ash/wm/workspace/workspace_event_handler.cc File ash/wm/workspace/workspace_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/1/ash/wm/workspace/workspace_event_handler.cc#newcode47 ash/wm/workspace/workspace_event_handler.cc:47: GetNonClientComponent(event->location()); On 2014/04/03 04:13:21, varkha wrote: > Does this ...
6 years, 8 months ago (2014-04-04 18:51:44 UTC) #3
jonross
Updated to enforce left-click restrictions. Some logic cleanup due to processing events twice. https://codereview.chromium.org/222203006/diff/1/ash/wm/workspace/workspace_event_handler.cc File ...
6 years, 8 months ago (2014-04-07 15:49:29 UTC) #4
flackr
https://codereview.chromium.org/222203006/diff/20001/ash/wm/workspace/workspace_event_handler.cc File ash/wm/workspace/workspace_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/20001/ash/wm/workspace/workspace_event_handler.cc#newcode61 ash/wm/workspace/workspace_event_handler.cc:61: double_click_component_ = component; why not only change the double ...
6 years, 8 months ago (2014-04-08 14:07:59 UTC) #5
jonross
Added unit tests for the x11 changes. Also addressed comments. https://codereview.chromium.org/222203006/diff/20001/ash/wm/workspace/workspace_event_handler.cc File ash/wm/workspace/workspace_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/20001/ash/wm/workspace/workspace_event_handler.cc#newcode61 ...
6 years, 8 months ago (2014-04-08 15:34:35 UTC) #6
jonross
Hi Sadrul, Could you be the owner reviewer for this change? It involves the x11_window_event_filter ...
6 years, 8 months ago (2014-04-08 19:00:00 UTC) #7
flackr
https://codereview.chromium.org/222203006/diff/40001/ash/wm/workspace/workspace_event_handler.cc File ash/wm/workspace/workspace_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/40001/ash/wm/workspace/workspace_event_handler.cc#newcode45 ash/wm/workspace/workspace_event_handler.cc:45: // and ET_MOUSE_RELEASED events. So it can not get ...
6 years, 8 months ago (2014-04-08 21:11:38 UTC) #8
jonross
https://codereview.chromium.org/222203006/diff/40001/ash/wm/workspace/workspace_event_handler.cc File ash/wm/workspace/workspace_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/40001/ash/wm/workspace/workspace_event_handler.cc#newcode45 ash/wm/workspace/workspace_event_handler.cc:45: // and ET_MOUSE_RELEASED events. On 2014/04/08 21:11:39, flackr wrote: ...
6 years, 8 months ago (2014-04-08 22:29:07 UTC) #9
sadrul
A couple of nits. ui/views/ LGTM otherwise https://codereview.chromium.org/222203006/diff/60001/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc File ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc (right): https://codereview.chromium.org/222203006/diff/60001/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc#newcode387 ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc:387: DesktopWindowTreeHost* rwh ...
6 years, 8 months ago (2014-04-10 20:49:58 UTC) #10
jonross
https://codereview.chromium.org/222203006/diff/60001/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc File ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc (right): https://codereview.chromium.org/222203006/diff/60001/ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc#newcode387 ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc:387: DesktopWindowTreeHost* rwh = static_cast<DesktopWindowTreeHost*>( On 2014/04/10 20:49:59, sadrul wrote: ...
6 years, 8 months ago (2014-04-11 16:46:41 UTC) #11
varkha
lgtm with a nit. https://codereview.chromium.org/222203006/diff/80001/ui/views/widget/desktop_aura/x11_window_event_filter.cc File ui/views/widget/desktop_aura/x11_window_event_filter.cc (right): https://codereview.chromium.org/222203006/diff/80001/ui/views/widget/desktop_aura/x11_window_event_filter.cc#newcode109 ui/views/widget/desktop_aura/x11_window_event_filter.cc:109: previous_target_component = click_component_; nit: The ...
6 years, 8 months ago (2014-04-11 19:00:12 UTC) #12
flackr
lgtm too with nits https://codereview.chromium.org/222203006/diff/80001/ash/wm/toplevel_window_event_handler.cc File ash/wm/toplevel_window_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/80001/ash/wm/toplevel_window_event_handler.cc#newcode497 ash/wm/toplevel_window_event_handler.cc:497: // make the event as ...
6 years, 8 months ago (2014-04-12 03:27:45 UTC) #13
jonross
https://codereview.chromium.org/222203006/diff/80001/ash/wm/toplevel_window_event_handler.cc File ash/wm/toplevel_window_event_handler.cc (right): https://codereview.chromium.org/222203006/diff/80001/ash/wm/toplevel_window_event_handler.cc#newcode497 ash/wm/toplevel_window_event_handler.cc:497: // make the event as handled so no other ...
6 years, 8 months ago (2014-04-14 18:36:15 UTC) #14
jonross
The CQ bit was checked by jonross@chromium.org
6 years, 8 months ago (2014-04-14 18:36:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jonross@chromium.org/222203006/100001
6 years, 8 months ago (2014-04-14 18:36:31 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 19:11:15 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_clang_dbg tryserver.chromium on linux_chromium_gn_rel
6 years, 8 months ago (2014-04-14 19:11:15 UTC) #18
jonross
The CQ bit was checked by jonross@chromium.org
6 years, 8 months ago (2014-04-14 20:25:05 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jonross@chromium.org/222203006/100001
6 years, 8 months ago (2014-04-14 20:25:22 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-15 04:16:33 UTC) #21
jonross
The CQ bit was checked by jonross@chromium.org
6 years, 8 months ago (2014-04-15 13:01:45 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jonross@chromium.org/222203006/100001
6 years, 8 months ago (2014-04-15 13:02:30 UTC) #24
commit-bot: I haz the power
Change committed as 263841
6 years, 8 months ago (2014-04-15 14:30:08 UTC) #25
bungeman-skia
6 years, 8 months ago (2014-04-15 15:15:40 UTC) #26
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/239213003/ by bungeman@google.com.

The reason for reverting is: Broke build..

Powered by Google App Engine
This is Rietveld 408576698