diff options
author | Steve Northover <steve> | 2004-03-18 21:46:52 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2004-03-18 21:46:52 +0000 |
commit | e90bc5262d443e00de3b324cf645f0e267335c4f (patch) | |
tree | b5ee7ac70cc0a4ce622b17a844ad061877e11de9 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java | |
parent | 318be4a7481743c137a17b902e1295bc5251d7f2 (diff) | |
download | eclipse.platform.swt-e90bc5262d443e00de3b324cf645f0e267335c4f.tar.gz eclipse.platform.swt-e90bc5262d443e00de3b324cf645f0e267335c4f.tar.xz eclipse.platform.swt-e90bc5262d443e00de3b324cf645f0e267335c4f.zip |
54878
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java index 38c3785d4b..b4155f742d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java @@ -193,7 +193,8 @@ void _setVisible (boolean visible) { OS.SendMessage (hwndParent, OS.WM_CANCELMODE, 0, 0); return; } - int flags = OS.TPM_LEFTBUTTON | OS.TPM_RIGHTBUTTON; + int flags = OS.TPM_LEFTBUTTON; + if (OS.GetKeyState (OS.VK_LBUTTON) >= 0) flags |= OS.TPM_RIGHTBUTTON; if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.TPM_RIGHTALIGN; if ((parent.style & SWT.MIRRORED) != 0) { flags &= ~OS.TPM_RIGHTALIGN; @@ -1236,7 +1237,7 @@ public void setVisible (boolean visible) { display.addPopup (this); } else { display.removePopup (this); - _setVisible (false); + _setVisible (visible); } } |