After I login using fast user switching, the deltaX and deltaY values for middle clicks are erroneous. As a temporary fix, I noticed that in the block of code just above this, you added an exception for tablets where the reported deltas are bad; so I just added middle clicks to the exceptions:
diff -up hw/xquartz/X11Application.m.baddeltas hw/xquartz/X11Application.m
--- hw/xquartz/X11Application.m.baddeltas 2009-12-30 15:05:54.000000000 -0500
+++ hw/xquartz/X11Application.m 2009-12-30 15:08:38.000000000 -0500
@@ -1015,12 +1015,13 @@ static inline int ensure_flag(int flags,
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
+ // The deltaXY for middle click events also appear erroneous during fast user switching
location = [e locationInWindow];
lastpt = location;
} else {
I'll assume that there shouldn't be a problem with the warp-pointer bug for just mouse click events.
Please see if you can reproduce this bug and if this patch may be worthwhile for fixing it.
Martin