diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2021-03-05 22:57:24 -0800 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2021-03-08 21:06:17 -0800 |
commit | ab8e47bbc9c8514299234af4d8dda14ee59519b2 (patch) | |
tree | 2225fdc403d27307032438f1383809908db299a9 | |
parent | a40acc7201b23ceb753baf7e783f59d99986a618 (diff) | |
download | xserver-ab8e47bbc9c8514299234af4d8dda14ee59519b2.tar.gz |
xquartz: Fix appFlags build failure with macOS 10.15+ SDKs
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit e59848548a462f1a0ac751bb8bb6afe56258cf4e)
-rw-r--r-- | hw/xquartz/X11Application.m | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 553adc9e7..c8ee9b7fe 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -79,6 +79,10 @@ static dispatch_queue_t eventTranslationQueue; #endif #endif +#ifndef APPKIT_APPFLAGS_HACK +#define APPKIT_APPFLAGS_HACK 1 +#endif + extern Bool noTestExtensions; extern Bool noRenderExtension; @@ -104,6 +108,50 @@ CFStringRef app_prefs_domain_cfstr = NULL; #define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | \ NSAlternateKeyMask | NSCommandKeyMask) +#if APPKIT_APPFLAGS_HACK && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 +// This was removed from the SDK in 10.15 +@interface NSApplication () { +@protected + /* All instance variables are private */ + short _running; + struct __appFlags { + unsigned int _hidden:1; + unsigned int _appleEventActivationInProgress:1; + unsigned int _active:1; + unsigned int _hasBeenRun:1; + unsigned int _doingUnhide:1; + unsigned int _delegateReturnsValidRequestor:1; + unsigned int _deactPending:1; + unsigned int _invalidState:1; + unsigned int _invalidEvent:1; + unsigned int _postedWindowsNeedUpdateNote:1; + unsigned int _wantsToActivate:1; + unsigned int _doingHide:1; + unsigned int _dontSendShouldTerminate:1; + unsigned int _ignoresFullScreen:1; + unsigned int _finishedLaunching:1; + unsigned int _hasEventDelegate:1; + unsigned int _appTerminating:1; + unsigned int _didNSOpenOrPrint:1; + unsigned int _inDealloc:1; + unsigned int _pendingDidFinish:1; + unsigned int _hasKeyFocus:1; + unsigned int _panelsNonactivating:1; + unsigned int _hiddenOnLaunch:1; + unsigned int _openStatus:2; + unsigned int _batchOrdering:1; + unsigned int _waitingForTerminationReply:1; + unsigned int _unused:1; + unsigned int _enumeratingMemoryPressureHandlers:1; + unsigned int _didTryRestoringPersistentState:1; + unsigned int _windowDragging:1; + unsigned int _mightBeSwitching:1; + } _appFlags; + id _mainMenu; +} +@end +#endif + @interface NSApplication (Internal) - (void)_setKeyWindow:(id)window; - (void)_setMainWindow:(id)window; @@ -420,10 +468,12 @@ message_kit_thread(SEL selector, NSObject *arg) BOOL order_all_windows = YES, workspaces, ok; for_appkit = NO; +#if APPKIT_APPFLAGS_HACK /* FIXME: This is a hack to avoid passing the event to AppKit which * would result in it raising one of its windows. */ _appFlags._active = YES; +#endif [self set_front_process:nil]; |