- // Since the error shows the window, it can trigger another attempt
- // to re-open the HID manager, which will also probably fail and error,
- // so don't bother repeating ourselves.
- if (!simulatingEventsButton.window.attachedSheet) {
- [NSApplication.sharedApplication activateIgnoringOtherApps:YES];
- [simulatingEventsButton.window makeKeyAndOrderFront:nil];
- [simulatingEventsButton.window presentError:error
- modalForWindow:simulatingEventsButton.window
- delegate:nil
- didPresentSelector:nil
- contextInfo:nil];
- }