xquartz: Don't process AppKit events if we haven't finished initializing

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 25035229b7)
This commit is contained in:
Jeremy Huddleston Sequoia 2021-02-19 23:16:56 -08:00
parent aa6f84021a
commit 8f8e9c53e7
1 changed files with 8 additions and 0 deletions

View File

@ -200,6 +200,14 @@ QuartzModeBundleInit(void);
- (void) sendEvent:(NSEvent *)e
{
/* Don't try sending to X if we haven't initialized. This can happen if AppKit takes over
* (eg: uncaught exception) early in launch.
*/
if (!eventTranslationQueue) {
[super sendEvent:e];
return;
}
OSX_BOOL for_appkit, for_x;
OSX_BOOL const x_active = self.x_active;