Merge remote-tracking branch 'jeremyhu/master'
This commit is contained in:
commit
ba883a0f34
|
@ -1329,6 +1329,11 @@ untrusted_str(NSEvent *e)
|
|||
}
|
||||
#endif
|
||||
|
||||
extern void
|
||||
darwinEvents_lock(void);
|
||||
extern void
|
||||
darwinEvents_unlock(void);
|
||||
|
||||
- (void) sendX11NSEvent:(NSEvent *)e
|
||||
{
|
||||
NSPoint location = NSZeroPoint;
|
||||
|
@ -1341,18 +1346,15 @@ untrusted_str(NSEvent *e)
|
|||
int modifierFlags;
|
||||
BOOL isMouseOrTabletEvent, isTabletEvent;
|
||||
|
||||
#ifdef HAVE_LIBDISPATCH
|
||||
static dispatch_once_t once_pred;
|
||||
dispatch_once(&once_pred, ^{
|
||||
tilt = NSZeroPoint;
|
||||
darwinTabletCurrent = darwinTabletStylus;
|
||||
});
|
||||
#else
|
||||
if (!darwinTabletCurrent) {
|
||||
/* Ensure that the event system is initialized */
|
||||
darwinEvents_lock();
|
||||
darwinEvents_unlock();
|
||||
assert(darwinTabletStylus);
|
||||
|
||||
tilt = NSZeroPoint;
|
||||
darwinTabletCurrent = darwinTabletStylus;
|
||||
}
|
||||
#endif
|
||||
|
||||
isMouseOrTabletEvent = [e type] == NSLeftMouseDown ||
|
||||
[e type] == NSOtherMouseDown ||
|
||||
|
@ -1641,6 +1643,11 @@ handle_mouse:
|
|||
|
||||
case NSScrollWheel:
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
|
||||
float deltaX = [e deltaX];
|
||||
float deltaY = [e deltaY];
|
||||
BOOL isContinuous = NO;
|
||||
#else
|
||||
CGFloat deltaX = [e deltaX];
|
||||
CGFloat deltaY = [e deltaY];
|
||||
CGEventRef cge = [e CGEvent];
|
||||
|
@ -1662,6 +1669,7 @@ handle_mouse:
|
|||
deltaY *= lineHeight / 5.0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION == 0
|
||||
/* If we're in the background, we need to send a MotionNotify event
|
||||
|
|
|
@ -310,6 +310,20 @@ xq_asl_init(void)
|
|||
atexit(redirect_atexit);
|
||||
}
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||
#define fls(v) xq_fls(v)
|
||||
|
||||
static inline int fls(int value) {
|
||||
unsigned int b, v;
|
||||
|
||||
v = *((unsigned int *)&value);
|
||||
|
||||
for(b=0 ; v ; v >>= 1 , b++);
|
||||
|
||||
return b;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
xq_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd)
|
||||
{
|
||||
|
|
|
@ -69,6 +69,12 @@
|
|||
#include <rootlessCommon.h>
|
||||
#include <Xplugin.h>
|
||||
|
||||
/* Work around a bug on Leopard's headers */
|
||||
#if defined (__LP64__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
|
||||
extern OSErr UpdateSystemActivity(UInt8 activity);
|
||||
#define OverallAct 0
|
||||
#endif
|
||||
|
||||
DevPrivateKeyRec quartzScreenKeyRec;
|
||||
int aquaMenuBarHeight = 0;
|
||||
QuartzModeProcsPtr quartzProcs = NULL;
|
||||
|
|
|
@ -104,6 +104,10 @@ extern _X_EXPORT Bool noXFixesExtension;
|
|||
extern _X_EXPORT Bool noPanoramiXExtension;
|
||||
#endif
|
||||
|
||||
#ifdef INXQUARTZ
|
||||
extern _X_EXPORT Bool noPseudoramiXExtension;
|
||||
#endif
|
||||
|
||||
#ifdef XSELINUX
|
||||
extern _X_EXPORT Bool noSELinuxExtension;
|
||||
|
||||
|
|
Loading…
Reference in New Issue