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

Unified Diff: chrome/views/view.cc

Issue 43009: Context menus only opens if the mouse are released in the same view as it was... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/view.cc
===================================================================
--- chrome/views/view.cc (revision 11536)
+++ chrome/views/view.cc (working copy)
@@ -499,9 +499,11 @@
// Assume that if there is a context menu controller we won't be deleted
// from mouse released.
gfx::Point location(e.location());
- ConvertPointToScreen(this, &location);
OnMouseReleased(e, canceled);
- ShowContextMenu(location.x(), location.y(), true);
+ if (HitTest(location)) {
+ ConvertPointToScreen(this, &location);
+ ShowContextMenu(location.x(), location.y(), true);
+ }
} else {
OnMouseReleased(e, canceled);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698