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

Issue 17608: Context menu for title bar doesn't appear when a tab's context menu was open.... (Closed)

Created:
11 years, 11 months ago by DeArto20
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Context menu for title bar doesn't appear when a tab's context menu was open. --------------------------------------------------------------------------- * About the Bug --------------------------------------------------------------------------- - What steps will reproduce the problem? 1. Open the context menu for a tab of your choice. 2. Right-click on the title bar. - What is the expected result? The application context menu should show up. - What happens instead? Nothing (The tab's context menu is correctly closed, of course). - What is the reason? The context menu for an App is displayed when WM_NCRBUTTONDOWN event is processed on the Window::OnNCRButtonDown() handler. In normal case, when the right mouse button is clicked on the NC area, this event is generated. But in the case that the context menu for a tab is being displayed, WM_NCRBUTTONDOWN is not received. Instead, WM_NCLBUTTONDOWN is generated. (This is wrong because left mouse button is never pressed.) So the right handler (Window::OnNCRButtonDown()) cannot be called. --------------------------------------------------------------------------- * About the Fix --------------------------------------------------------------------------- What is modified? Modified MenuController::RepostEvent() method. This function is called when the mouse button is pressed while the context menu for a tab is being displayed. In this function, following two steps occur in order. 1st. Determine the event type. 2nd. Post this event using PostMessage(). On the 2nd step, In the case that the determined event on the 1st step is for the client area, there's no problem. But in the case of the non-client area, it doesn't use the right event type but use the fixed event type (WM_NCLBUTTONDOWN). This is the wrong implementation. So, I modified this part so that it use the right event type. Bug=5695 http://crbug.com/5695

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M chrome/views/chrome_menu.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
DeArto20
11 years, 11 months ago (2009-01-12 13:57:53 UTC) #1
Finnur
LGTM. I'm not familiar with this code, but I tested it on the tip of ...
11 years, 11 months ago (2009-01-12 19:25:00 UTC) #2
sky
LGTM
11 years, 11 months ago (2009-01-12 20:14:34 UTC) #3
DeArto20
It seems that one of the reviewer (Ben) looks very busy. So If there are ...
11 years, 10 months ago (2009-02-13 04:08:33 UTC) #4
sky
11 years, 10 months ago (2009-02-13 17:47:08 UTC) #5
OK

Powered by Google App Engine
This is Rietveld 408576698