summaryrefslogtreecommitdiffstats
path: root/views/window/window_win.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 17:21:35 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 17:21:35 +0000
commit68e12c0dbf815fabf489875c7c20be5971f02593 (patch)
treee6f45d5d55a2e547196470cc0ba63c1d3d43e70e /views/window/window_win.h
parentb4fb20b99a2e2081dc9cffd6370079d57592dab2 (diff)
downloadchromium_src-68e12c0dbf815fabf489875c7c20be5971f02593.zip
chromium_src-68e12c0dbf815fabf489875c7c20be5971f02593.tar.gz
chromium_src-68e12c0dbf815fabf489875c7c20be5971f02593.tar.bz2
Show caption area context menu on mouseup, not mousedown. Original patch by Yong Shin (see http://codereview.chromium.org/18095 ), r=me, modified by me.
BUG=5695 TEST=Right-click the titlebar area; the menu should not appear until mouse up. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window/window_win.h')
-rw-r--r--views/window/window_win.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/window/window_win.h b/views/window/window_win.h
index f799ae7..b6b9122 100644
--- a/views/window/window_win.h
+++ b/views/window/window_win.h
@@ -124,6 +124,8 @@ class WindowWin : public WidgetWin,
virtual void OnNCPaint(HRGN rgn);
virtual void OnNCLButtonDown(UINT ht_component, const CPoint& point);
virtual void OnNCRButtonDown(UINT ht_component, const CPoint& point);
+ virtual void OnNCRButtonUp(UINT ht_component, const CPoint& point);
+ virtual void OnRButtonUp(UINT ht_component, const CPoint& point);
virtual LRESULT OnNCUAHDrawCaption(UINT msg, WPARAM w_param, LPARAM l_param);
virtual LRESULT OnNCUAHDrawFrame(UINT msg, WPARAM w_param, LPARAM l_param);
virtual LRESULT OnSetCursor(HWND window, UINT hittest_code, UINT message);
@@ -276,6 +278,10 @@ class WindowWin : public WidgetWin,
// when all we want to do is restore it.
int force_hidden_count_;
+ // Set to true when the user presses the right mouse button on the caption
+ // area. We need this so we can correctly show the context menu on mouse-up.
+ bool is_right_mouse_pressed_on_caption_;
+
// The last-seen monitor containing us, and its rect and work area. These are
// used to catch updates to the rect and work area and react accordingly.
HMONITOR last_monitor_;