xquartz: Remove support for older versions of libXplugin

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2021-01-27 13:46:02 -08:00
parent 5e7c0762e6
commit 7d0bb7ed06
4 changed files with 4 additions and 52 deletions

View File

@ -345,14 +345,11 @@ message_kit_thread(SEL selector, NSObject *arg)
swallow_keycode = [e keyCode];
do_swallow = YES;
for_x = NO;
#if XPLUGIN_VERSION >= 1
}
else if (XQuartzEnableKeyEquivalents &&
} else if (XQuartzEnableKeyEquivalents &&
xp_is_symbolic_hotkey_event([e eventRef])) {
swallow_keycode = [e keyCode];
do_swallow = YES;
for_x = NO;
#endif
}
else if (XQuartzEnableKeyEquivalents &&
[[self mainMenu] performKeyEquivalent:e]) {
@ -1558,8 +1555,6 @@ handle_mouse:
}
if (!XQuartzServerVisible && noTestExtensions) {
#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION > 0
/* Older libXplugin (Tiger/"Stock" Leopard) aren't thread safe, so we can't call xp_find_window from the Appkit thread */
xp_window_id wid = 0;
xp_error err;
@ -1572,7 +1567,6 @@ handle_mouse:
err = xp_find_window(location.x, location.y, 0, &wid);
if (err != XP_Success || (err == XP_Success && wid == 0))
#endif
{
bgMouseLocation = location;
bgMouseLocationUpdated = TRUE;
@ -1650,17 +1644,6 @@ handle_mouse:
}
#endif
#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION == 0
/* If we're in the background, we need to send a MotionNotify event
* first, since we aren't getting them on background mouse motion
*/
if (!XQuartzServerVisible && noTestExtensions) {
bgMouseLocationUpdated = FALSE;
DarwinSendPointerEvents(darwinPointer, MotionNotify, 0,
location.x, location.y,
0.0, 0.0);
}
#endif
if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_7 &&
XQuartzScrollInDeviceDirection &&
[e isDirectionInvertedFromDevice]) {

View File

@ -35,12 +35,6 @@
#include "window.h"
#include <Xplugin.h>
#if XPLUGIN_VERSION < 4
typedef int xp_frame_attr;
typedef int xp_frame_class;
typedef int xp_frame_rect;
#endif
typedef int (*DisableUpdateProc)(void);
typedef int (*EnableUpdateProc)(void);
typedef int (*SetWindowLevelProc)(WindowPtr pWin, int level);

View File

@ -82,7 +82,6 @@ xprSetWindowLevel(WindowPtr pWin, int level)
return Success;
}
#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
static int
xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent)
{
@ -114,7 +113,6 @@ xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent)
return Success;
}
#endif
static int
xprFrameDraw(WindowPtr pWin,
@ -146,16 +144,8 @@ static AppleWMProcsRec xprAppleWMProcs = {
xp_frame_get_rect,
xp_frame_hit_test,
xprFrameDraw,
#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 3
xp_set_dock_proxy,
xprAttachTransient
#elif defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 2
xp_set_dock_proxy,
NULL
#else
NULL,
NULL
#endif
};
void

View File

@ -74,24 +74,9 @@ QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
case kXquartzBringAllToFront:
DEBUG_LOG("kXquartzBringAllToFront\n");
/* There's no need to do xp_window_bring_all_to_front on Leopard,
* and we don't care about the result, so just do it async.
*/
#if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 6
# if defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED < 6
if (&xp_window_bring_all_to_front) {
# endif
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
xp_window_bring_all_to_front();
});
# if defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED < 6
} else {
RootlessOrderAllWindows(e->data[0]);
}
# endif
#else
RootlessOrderAllWindows(e->data[0]);
#endif
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
xp_window_bring_all_to_front();
});
return TRUE;