You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
MGTK supports using shortcuts (e.g. OA+O) while a menu is showing.
If the menu is invoked using the mouse, but then the shortcut is used, DeskTop gets confused about how to interpret the modifiers.
To Reproduce
Steps to reproduce the behavior:
Start DeskTop
Open a volume window
Select a folder
Using the mouse, click on the Apple Menu
Hold Open Apple and press O
Expected behavior
The folder window opens.
Actual behavior
The folder window opens, but then the volume window closes!
Root cause
DeskTop sets a flag (menu_kbd_flag) before invoking MGTK::MenuSelect (false) or MGTK::MenuKey (true) and then checks it in CmdOpen:
If menu_kbd_flag is false, then the menu was invoked with the mouse:
If no modifier is down, treat this as CmdOpen
If a modifier is down, treat this as CmdOpenThenCloseCurrent
If menu_kbd_flag is true, then the menu was invoked with the keyboard; the caller already distinguished between single modifier as CmdOpen and double-modifier as CmdOpenThenCloseCurrent
This falls apart if the menu is invoked with the mouse, then the shortcut is used. MGTK doesn't tell the caller how the menu item was invoked, just which item was invoked.
This dates back to at least 1.3 so it isn't a regression, and I can't think of a safe fix.
The text was updated successfully, but these errors were encountered:
Describe the bug
MGTK supports using shortcuts (e.g. OA+O) while a menu is showing.
If the menu is invoked using the mouse, but then the shortcut is used, DeskTop gets confused about how to interpret the modifiers.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The folder window opens.
Actual behavior
The folder window opens, but then the volume window closes!
Root cause
DeskTop sets a flag (
menu_kbd_flag
) before invoking MGTK::MenuSelect (false) or MGTK::MenuKey (true) and then checks it inCmdOpen
:menu_kbd_flag
is false, then the menu was invoked with the mouse:menu_kbd_flag
is true, then the menu was invoked with the keyboard; the caller already distinguished between single modifier as CmdOpen and double-modifier as CmdOpenThenCloseCurrentThis falls apart if the menu is invoked with the mouse, then the shortcut is used. MGTK doesn't tell the caller how the menu item was invoked, just which item was invoked.
This dates back to at least 1.3 so it isn't a regression, and I can't think of a safe fix.
The text was updated successfully, but these errors were encountered: