mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Issue #1751 -- Remove XP_MACOSX conditionals from /layout
This commit is contained in:
parent
df94ccb22c
commit
02c59100a8
19 changed files with 11 additions and 371 deletions
|
|
@ -404,26 +404,12 @@ nsMenuFrame::HandleEvent(nsPresContext* aPresContext,
|
|||
if (aEvent->mMessage == eKeyPress && !IsDisabled()) {
|
||||
WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
|
||||
uint32_t keyCode = keyEvent->mKeyCode;
|
||||
#ifdef XP_MACOSX
|
||||
// On mac, open menulist on either up/down arrow or space (w/o Cmd pressed)
|
||||
if (!IsOpen() && ((keyEvent->mCharCode == ' ' && !keyEvent->IsMeta()) ||
|
||||
(keyCode == NS_VK_UP || keyCode == NS_VK_DOWN))) {
|
||||
|
||||
// When pressing space, don't open the menu if performing an incremental search.
|
||||
if (keyEvent->mCharCode != ' ' ||
|
||||
!nsMenuPopupFrame::IsWithinIncrementalTime(keyEvent->mTime)) {
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
OpenMenu(false);
|
||||
}
|
||||
}
|
||||
#else
|
||||
// On other platforms, toggle menulist on unmodified F4 or Alt arrow
|
||||
// Toggle menulist on unmodified F4 or Alt arrow
|
||||
if ((keyCode == NS_VK_F4 && !keyEvent->IsAlt()) ||
|
||||
((keyCode == NS_VK_UP || keyCode == NS_VK_DOWN) && keyEvent->IsAlt())) {
|
||||
*aEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
ToggleMenuState();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (aEvent->mMessage == eMouseDown &&
|
||||
aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue