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

Issue 11761027: context menu does not work if one already open (Closed)

Created:
7 years, 11 months ago by sschmitz
Modified:
7 years, 11 months ago
Reviewers:
oshima, sky
CC:
chromium-reviews, tfarina, oshima
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

context menu does not work if one already open This improves how ChromeOS handles mouse button presses outside of a context menu. On mouse button presses not only is the context menu and is message loop exited, but the event is processed with the same result as if the context menu had not been present. For example, a window may be activated, another context menu may be brought up, a new tab button may be executed, etc. This CL does not yet handle touch events (separate issue). The behavior is now more similar to how it works on Windows. BUG=151074, 162172 TEST=manual Bring up various context menus, then click various mouse buttons outside of it. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178717

Patch Set 1 #

Patch Set 2 : 'fix for unit test' #

Patch Set 3 : test #

Total comments: 2

Patch Set 4 : crbug.com/151074 #

Patch Set 5 : rebase #

Patch Set 6 : tweak #

Total comments: 2

Patch Set 7 : improve #

Patch Set 8 : crbug.com/151074 #

Total comments: 4

Patch Set 9 : crbug.com/151074 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -5 lines) Patch
M ui/base/events/event.cc View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 4 5 6 7 8 3 chunks +26 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
sschmitz
Scott, this CL needs more work. It accomplishes most of what we want with some ...
7 years, 11 months ago (2013-01-04 00:41:05 UTC) #1
sschmitz
Fixed problem with unit test. Had to be more careful as to when reposting a ...
7 years, 11 months ago (2013-01-04 22:56:50 UTC) #2
sky
https://codereview.chromium.org/11761027/diff/18001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/11761027/diff/18001/ui/views/controls/menu/menu_controller.cc#newcode849 ui/views/controls/menu/menu_controller.cc:849: root_window->PostNativeEvent(&xevent); Is PostNativeEvent async? I think this code will ...
7 years, 11 months ago (2013-01-07 16:06:13 UTC) #3
sschmitz
Improved after talks with Oshimasan. Using XPutBackEvent to process the event again after context menu ...
7 years, 11 months ago (2013-01-08 19:49:27 UTC) #4
oshima
https://codereview.chromium.org/11761027/diff/31001/ui/base/events/event.cc File ui/base/events/event.cc (right): https://codereview.chromium.org/11761027/diff/31001/ui/base/events/event.cc#newcode328 ui/base/events/event.cc:328: int MouseEvent::GetRepeatCount(const MouseEvent& event) { It's better to check ...
7 years, 11 months ago (2013-01-08 20:01:51 UTC) #5
sadrul
On 2013/01/07 16:06:13, sky wrote: > https://codereview.chromium.org/11761027/diff/18001/ui/views/controls/menu/menu_controller.cc > File ui/views/controls/menu/menu_controller.cc (right): > > https://codereview.chromium.org/11761027/diff/18001/ui/views/controls/menu/menu_controller.cc#newcode849 > ...
7 years, 11 months ago (2013-01-08 20:03:32 UTC) #6
sschmitz
Sadrul, thanks for the quick reply. Your fix is very similar. I don't understand why ...
7 years, 11 months ago (2013-01-08 20:36:38 UTC) #7
sschmitz
Improved based on feedback. https://codereview.chromium.org/11761027/diff/18001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/11761027/diff/18001/ui/views/controls/menu/menu_controller.cc#newcode849 ui/views/controls/menu/menu_controller.cc:849: root_window->PostNativeEvent(&xevent); On 2013/01/07 16:06:13, sky ...
7 years, 11 months ago (2013-01-08 22:48:57 UTC) #8
oshima
https://codereview.chromium.org/11761027/diff/37004/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/11761027/diff/37004/ui/views/controls/menu/menu_controller.cc#newcode37 ui/views/controls/menu/menu_controller.cc:37: #if defined(OS_CHROMEOS) shouldn't we use USE_X11? https://codereview.chromium.org/11761027/diff/37004/ui/views/controls/menu/menu_controller.cc#newcode2024 ui/views/controls/menu/menu_controller.cc:2024: XPutBackEvent(xevent.xany.display, ...
7 years, 11 months ago (2013-01-08 23:26:10 UTC) #9
sschmitz
Good point. I showed this to Alex and discussed this with him. He likes it. ...
7 years, 11 months ago (2013-01-08 23:33:47 UTC) #10
sschmitz
Thanks for all discussions. I'm submitting this now for review. I'm splitting of the work ...
7 years, 11 months ago (2013-01-18 20:30:15 UTC) #11
oshima
lgtm
7 years, 11 months ago (2013-01-18 22:05:16 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/11761027/41001
7 years, 11 months ago (2013-01-18 22:08:34 UTC) #13
commit-bot: I haz the power
Presubmit check for 11761027-41001 failed and returned exit status 1. Running presubmit commit checks ...
7 years, 11 months ago (2013-01-18 22:08:38 UTC) #14
sky
This LGTM, but this is so subtle it's worth a test. Could you add a ...
7 years, 11 months ago (2013-01-22 22:35:11 UTC) #15
sschmitz
On 2013/01/22 22:35:11, sky wrote: > This LGTM, but this is so subtle it's worth ...
7 years, 11 months ago (2013-01-24 04:08:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/11761027/41001
7 years, 11 months ago (2013-01-24 04:09:09 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/11761027/41001
7 years, 11 months ago (2013-01-24 04:28:52 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sschmitz@chromium.org/11761027/41001
7 years, 11 months ago (2013-01-24 22:47:22 UTC) #19
commit-bot: I haz the power
7 years, 11 months ago (2013-01-25 01:22:56 UTC) #20
Message was sent while issue was closed.
Change committed as 178717

Powered by Google App Engine
This is Rietveld 408576698