[Xquartz-changes] xserver: Branch 'master' - 2 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Sun May 16 10:15:55 PDT 2010
hw/xquartz/X11Application.m | 31 ++++++++++++++++++++-----------
hw/xquartz/mach-startup/bundle-main.c | 5 +++++
os/log.c | 7 +++++++
3 files changed, 32 insertions(+), 11 deletions(-)
New commits:
commit f1a8a46c3db46cf66e00e9aae847ad8e53093e63
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sun May 16 10:14:02 2010 -0700
XQuartz: Fix a build failure on Tiger
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 42aa757..63a185f 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -75,7 +75,12 @@ extern int noPanoramiXExtension;
static char __crashreporter_info_buff__[4096] = {0};
static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+// This is actually a toolchain requirement, but I'm not sure the correct check,
+// but it should be fine to just only include it for Leopard and later. This line
+// just tells the linker to never strip this symbol (such as for space optimization)
asm (".desc ___crashreporter_info__, 0x10");
+#endif
static const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
diff --git a/os/log.c b/os/log.c
index ce43319..ee4b45f 100644
--- a/os/log.c
+++ b/os/log.c
@@ -118,10 +118,17 @@ static int bufferSize = 0, bufferUnused = 0, bufferPos = 0;
static Bool needBuffer = TRUE;
#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+
static char __crashreporter_info_buff__[4096] = {0};
static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+// This is actually a toolchain requirement, but I'm not sure the correct check,
+// but it should be fine to just only include it for Leopard and later. This line
+// just tells the linker to never strip this symbol (such as for space optimization)
asm (".desc ___crashreporter_info__, 0x10");
#endif
+#endif
/* Prefix strings for log messages. */
#ifndef X_UNKNOWN_STRING
commit 2fecabfb38bb32c13b2b3b3f3398991e2c1989be
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sun May 16 10:03:13 2010 -0700
XQuartz: Don't use deltaXY for determining pointer location on scroll events
<rdar://problem/7989690>
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index ed9fb32..805ed99 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1030,23 +1030,32 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
if(isMouseOrTabletEvent) {
static NSPoint lastpt;
NSWindow *window = [e window];
- NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];;
-
+ NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame];
+ BOOL hasUntrustedPointerDelta;
+
+ // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that
+ // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets
+ // are not normally used in cases where that bug would present itself, so this is a fair tradeoff
+ // <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype
+ // http://xquartz.macosforge.org/trac/ticket/288
+ hasUntrustedPointerDelta = isTabletEvent;
+
+ // The deltaXY for middle click events also appear erroneous after fast user switching
+ // <rdar://problem/7979468> deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS
+ // http://xquartz.macosforge.org/trac/ticket/389
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp;
+
+ // The deltaXY for scroll events correspond to the scroll delta, not the pointer delta
+ // <rdar://problem/7989690> deltaXY for wheel events are being sent as mouse movement
+ hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSScrollWheel;
+
if (window != nil) {
NSRect frame = [window frame];
location = [e locationInWindow];
location.x += frame.origin.x;
location.y += frame.origin.y;
lastpt = location;
- } else if(isTabletEvent || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp) {
- // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that
- // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets
- // are not normally used in cases where that bug would present itself, so this is a fair tradeoff
- // <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype
- // http://xquartz.macosforge.org/trac/ticket/288
- // The deltaXY for middle click events also appear erroneous after fast user switching
- // <rdar://problem/7979468> deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS
- // http://xquartz.macosforge.org/trac/ticket/389
+ } else if(hasUntrustedPointerDelta) {
location = [e locationInWindow];
lastpt = location;
} else {
More information about the Xquartz-changes
mailing list