mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 19:10:36 +00:00
Get context popup menus work on Mac by checking if the CTRL key is down (just like how the Mac's Finder works).
This commit is contained in:
parent
ab56353b31
commit
9638765196
@ -168,10 +168,17 @@ XULPopupListenerImpl::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||
}
|
||||
break;
|
||||
case eXULPopupType_context:
|
||||
#ifdef XP_MAC
|
||||
// XXX: Handle Mac (currently checks if CTRL key is down)
|
||||
PRBool ctrlKey = PR_FALSE;
|
||||
uiEvent->GetCtrlKey(&ctrlKey);
|
||||
if (ctrlKey == PR_TRUE)
|
||||
#else
|
||||
// Check for right mouse button down
|
||||
uiEvent->GetButton(&button);
|
||||
// XXX: Handle Mac
|
||||
if (button == 3) {
|
||||
if (button == 3)
|
||||
#endif
|
||||
{
|
||||
// Time to launch a context menu.
|
||||
LaunchPopup(aMouseEvent);
|
||||
}
|
||||
|
@ -168,10 +168,17 @@ XULPopupListenerImpl::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||
}
|
||||
break;
|
||||
case eXULPopupType_context:
|
||||
#ifdef XP_MAC
|
||||
// XXX: Handle Mac (currently checks if CTRL key is down)
|
||||
PRBool ctrlKey = PR_FALSE;
|
||||
uiEvent->GetCtrlKey(&ctrlKey);
|
||||
if (ctrlKey == PR_TRUE)
|
||||
#else
|
||||
// Check for right mouse button down
|
||||
uiEvent->GetButton(&button);
|
||||
// XXX: Handle Mac
|
||||
if (button == 3) {
|
||||
if (button == 3)
|
||||
#endif
|
||||
{
|
||||
// Time to launch a context menu.
|
||||
LaunchPopup(aMouseEvent);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user