hw/xfree86/common/xf86DGA.c | 4 +++- hw/xfree86/modes/xf86Cursors.c | 2 +- hw/xquartz/X11Application.m | 28 ++++++++++++++++++++-------- hw/xquartz/bundle/Makefile.am | 4 ++++ include/eventstr.h | 4 ++-- 5 files changed, 30 insertions(+), 12 deletions(-)
New commits: commit f44ebbd3d52fa0dfdc51f6635721592b70affb6e Author: Cyril Brulebois <[email protected]> Date: Mon Mar 1 02:11:36 2010 +0100 Fix null pointer dereference in xf86_reload_cursors(). Upon resume, X may try to dereference a null pointer, which has been reported in Debian bug #507916 (http://bugs.debian.org/507916). Jim Paris came up with a patch which solves the problem for him. Here's a (hopefully) fixed version of his patch (without the typo). Cc: Jim Paris <[email protected]> Signed-off-by: Cyril Brulebois <[email protected]> Reviewed-By: Matthias Hopf <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit fa6c7012572093a82c9389682977efff85590719) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index 385848b..d6e747f 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -611,7 +611,7 @@ xf86_reload_cursors (ScreenPtr screen) cursor_screen_priv = dixLookupPrivate(&screen->devPrivates, xf86CursorScreenKey); /* return if HW cursor is inactive, to avoid displaying two cursors */ - if (!cursor_screen_priv->isUp) + if (!cursor_screen_priv || !cursor_screen_priv->isUp) return; scrn = xf86Screens[screen->myNum]; commit d2f29b85d14fa56f22302854b585d04124b0db92 Author: Peter Hutterer <[email protected]> Date: Fri Apr 16 16:35:22 2010 +1000 xfree86: dga needs to use the master keyboard state (#27573) GetPairedDevice() may not always return the keyboard, resulting in a null-pointer dereference when accessing the XKB state. For floating devices, the GetMaster() returns the device itself. X.Org Bug 27573 <http://bugs.freedesktop.org/show_bug.cgi?id=27573> Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Tested-by: Ben Hutchings <[email protected]> (cherry picked from commit 10de9e8ee37265a35ceeceb2007d711da70d4f2d) diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 804fd37..5d8addb 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -1088,13 +1088,15 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse) ButtonClassPtr butc = mouse->button; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); DeviceEvent ev; + DeviceIntPtr master = GetMaster(mouse, MASTER_KEYBOARD); memset(&ev, 0, sizeof(ev)); ev.header = ET_Internal; ev.length = sizeof(ev); ev.type = event->subtype; ev.corestate = butc->state; - ev.corestate |= XkbStateFieldFromRec(&GetPairedDevice(mouse)->key->xkbInfo->state); + if (master && master->key) + ev.corestate |= XkbStateFieldFromRec(&master->key->xkbInfo->state); UpdateDeviceState(mouse, &ev); commit 89a2b2771f799f371c25945df18440dc4695909a Author: Jeremy Huddleston <[email protected]> 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 <[email protected]> Reviewed-by: Edward Moy <[email protected]> (cherry picked from commit ecfeabec8d0dcfe286fb893047f1fe1a7ea9f8f5) 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 { commit 754b995a3f08d72a6a91d72e891fa65548046379 Author: Jeremy Huddleston <[email protected]> Date: Sat May 15 10:53:09 2010 -0700 XQuartz: Don't trust deltaXY for middle mouse clicks. The middle mouse clicks return erroneous values after returning from Fast User Switching. <rdar://problem/7979468> http://xquartz.macosforge.org/trac/ticket/389 Signed-off-by: Martin Otte <[email protected]> Reviewed-by: Jeremy Huddleston <[email protected]> Reviewed-by: Edward Moy <[email protected]> Signed-off-by: Jeremy Huddleston <[email protected]> (cherry picked from commit a911292c85f7069d2caabcb677ed716a04227526) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index c9a0d66..ed9fb32 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -1038,12 +1038,15 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe location.x += frame.origin.x; location.y += frame.origin.y; lastpt = location; - } else if(isTabletEvent) { + } 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 location = [e locationInWindow]; lastpt = location; } else { commit 1e7a9b15de57e06bbcd33e2c43480ea4e4e7542a Author: Julien Cristau <[email protected]> Date: Tue May 4 15:15:02 2010 +0200 XQuartz: add new localization files to EXTRA_DIST commit 206531f75cd41c034e89fdfbc75ab0910682eef8 added localization files for ar, add them to the Makefile. Signed-off-by: Julien Cristau <[email protected]> Reviewed-by: Jeremy Huddleston <[email protected]> (cherry picked from commit 72758287f79a4f1aa8fa388f20947042e3e14693) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index f8b96d8..c4d77c0 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -28,6 +28,10 @@ EXTRA_DIST = \ Info.plist.cpp \ PkgInfo \ $(resource_DATA) \ + Resources/ar.lproj/InfoPlist.strings \ + Resources/ar.lproj/Localizable.strings \ + Resources/ar.lproj/main.nib/designable.nib \ + Resources/ar.lproj/main.nib/keyedobjects.nib \ Resources/da.lproj/InfoPlist.strings \ Resources/da.lproj/Localizable.strings \ Resources/da.lproj/main.nib/keyedobjects.nib \ commit c247f81ca188407ac2ddd31adcae00074b2cda0b Author: Chris Humbert <[email protected]> Date: Fri May 7 17:02:43 2010 +1000 dix: make DeviceEvent coordinates signed for Xinerama. #24986 With Xinerama enabled, event coordinates are relative to Screen 0, so they can be negative. The new DeviceEvent's coordinates are of type uint16_t, making screens above and to the left of Screen 0 unusable. X.Org Bug 24986 <https://bugs.freedesktop.org/show_bug.cgi?id=24986> Signed-off-by: Chris Humbert <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit 21ed660f30a3f96c787ab00a16499e0fb034b2ad) diff --git a/include/eventstr.h b/include/eventstr.h index 79685c1..433227e 100644 --- a/include/eventstr.h +++ b/include/eventstr.h @@ -91,9 +91,9 @@ struct _DeviceEvent uint32_t button; /**< Button number */ uint32_t key; /**< Key code */ } detail; - uint16_t root_x; /**< Pos relative to root window in integral data */ + int16_t root_x; /**< Pos relative to root window in integral data */ float root_x_frac; /**< Pos relative to root window in frac part */ - uint16_t root_y; /**< Pos relative to root window in integral part */ + int16_t root_y; /**< Pos relative to root window in integral part */ float root_y_frac; /**< Pos relative to root window in frac part */ uint8_t buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */ struct { -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

