mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 14:50:05 +01:00
xquartz: Fix appFlags build failure with macOS 10.15+ SDKs
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit e59848548a)
This commit is contained in:
parent
15b99dc4a1
commit
243c2d76fb
1 changed files with 50 additions and 0 deletions
|
|
@ -82,6 +82,10 @@ static dispatch_queue_t eventTranslationQueue;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef APPKIT_APPFLAGS_HACK
|
||||
#define APPKIT_APPFLAGS_HACK 1
|
||||
#endif
|
||||
|
||||
extern Bool noTestExtensions;
|
||||
extern Bool noRenderExtension;
|
||||
|
||||
|
|
@ -111,6 +115,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;
|
||||
|
|
@ -430,10 +478,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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue