summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xquartz/X11Application.m19
-rw-r--r--hw/xquartz/applewmExt.h6
-rw-r--r--hw/xquartz/xpr/xprAppleWM.c10
-rw-r--r--hw/xquartz/xpr/xprEvent.c21
4 files changed, 4 insertions, 52 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 77c919106..10afdf91a 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -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]) {
diff --git a/hw/xquartz/applewmExt.h b/hw/xquartz/applewmExt.h
index 14c77214a..9a8b8d639 100644
--- a/hw/xquartz/applewmExt.h
+++ b/hw/xquartz/applewmExt.h
@@ -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);
diff --git a/hw/xquartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c
index 8c4f5efb8..126661766 100644
--- a/hw/xquartz/xpr/xprAppleWM.c
+++ b/hw/xquartz/xpr/xprAppleWM.c
@@ -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
diff --git a/hw/xquartz/xpr/xprEvent.c b/hw/xquartz/xpr/xprEvent.c
index e193a2747..eb321a52f 100644
--- a/hw/xquartz/xpr/xprEvent.c
+++ b/hw/xquartz/xpr/xprEvent.c
@@ -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;