OsX[AppleEvents]: try to avoid some crash by delaying the function which is called

by such events...

Fixes #292
This commit is contained in:
ALONSO Laurent
2022-07-14 12:56:10 +02:00
committed by Celtic Minstrel
parent eea6166b11
commit e2a4fcc788
8 changed files with 79 additions and 6 deletions

View File

@@ -12,6 +12,8 @@
#include "tools/winutil.hpp"
#include "tools/undo.hpp"
extern short menuChoiceId;
using MenuHandle = NSMenu*;
MenuHandle menu_bar_handle;
MenuHandle file_menu, edit_menu, app_menu, scen_menu, town_menu, out_menu, help_menu;
@@ -166,6 +168,7 @@ void update_edit_menu() {
@implementation MenuHandler
-(void) menuChoice:(id) sender {
handle_menu_choice(eMenu([[sender representedObject] intValue]));
menuChoiceId=short([[sender representedObject] intValue]);
//handle_menu_choice(eMenu([[sender representedObject] intValue]));
}
@end