Ticket #389: xorg-server-middle_click.patch

File xorg-server-middle_click.patch, 1.2 KB (added by otte@…, 2 years ago)
  • hw/xquartz/X11Application.m

    diff -up hw/xquartz/X11Application.m.baddeltas hw/xquartz/X11Application.m
    old new  
    10151015            location.x += frame.origin.x; 
    10161016            location.y += frame.origin.y; 
    10171017            lastpt = location; 
    1018         } else if(isTabletEvent) { 
     1018        } else if(isTabletEvent || [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp) { 
    10191019            // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that 
    10201020            // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets 
    10211021            // are not normally used in cases where that bug would present itself, so this is a fair tradeoff 
    10221022            // <rdar://problem/7111003> deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype 
    10231023            // http://xquartz.macosforge.org/trac/ticket/288 
     1024            // The deltaXY for middle click events also appear erroneous during fast user switching 
    10241025            location = [e locationInWindow]; 
    10251026            lastpt = location; 
    10261027        } else {