xserver: Branch 'server-1.20-branch' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 14 22:33:15 UTC 2021


 hw/xquartz/X11Application.m |   50 ++++++++++++++++++++++++++++++++++++++++++++
 hw/xquartz/xpr/xprCursor.c  |    4 ++-
 2 files changed, 53 insertions(+), 1 deletion(-)

New commits:
commit 7bf4777116b9b6d416914561015662f494bb4184
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Mon Mar 8 21:02:40 2021 -0800

    xquartz: Ensure the mouse pointer is shown when switching to a native macOS alert or window
    
    Fixes: https://github.com/XQuartz/XQuartz/issues/100
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 4ae36f418ed683532b0b6991e4a1e7d56740b845)

diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index 5e89348c0..ff6cf4dd0 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -380,7 +380,9 @@ QuartzInitCursor(ScreenPtr pScreen)
  */
 void
 QuartzSuspendXCursor(ScreenPtr pScreen)
-{}
+{
+    xp_show_cursor();
+}
 
 /*
  * QuartzResumeXCursor
commit 3ef6e7b766a9f20b208b50203ad6b45f65fbc29e
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Fri Mar 5 22:57:24 2021 -0800

    xquartz: Fix appFlags build failure with macOS 10.15+ SDKs
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit e59848548a462f1a0ac751bb8bb6afe56258cf4e)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 877981800..fcdac240c 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -77,6 +77,10 @@ static dispatch_queue_t eventTranslationQueue;
 #endif
 #endif
 
+#ifndef APPKIT_APPFLAGS_HACK
+#define APPKIT_APPFLAGS_HACK 1
+#endif
+
 extern Bool noTestExtensions;
 extern Bool noRenderExtension;
 
@@ -102,6 +106,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
+ at interface NSApplication () {
+ at 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;
+}
+ at end
+#endif
+
 @interface NSApplication (Internal)
 - (void)_setKeyWindow:(id)window;
 - (void)_setMainWindow:(id)window;
@@ -375,10 +423,12 @@ QuartzModeBundleInit(void);
                 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];
 


More information about the xorg-commit mailing list