Re: Horizontal Wheel Emulation
Re: Horizontal Wheel Emulation
- Subject: Re: Horizontal Wheel Emulation
- From: "Torrey T. Lyons" <email@hidden>
- Date: Wed, 12 May 2004 15:10:10 -0700
Sorry I've been slow to get back to this. Your patch worked correctly
as apparently Mac OS X is sending Shift-Scroll as a horizontal
scroll. In any case the XFree86 CHANGELOG now includes:
XFree86 4.4.99.6 (xx May 2004)
107. Let XDarwin interpret scroll wheel mouse events correctly when shift is
held down (Benjamin Burke).
--Torrey
At 2:31 AM -0400 4/13/04, Benjamin Burke wrote:
Hi,
I'm using an M$ intellimouse explorer USB on a PB G4 (OS X 10.3.3 /
X11.app 1.0). I'd like to use the wheel mouse functionality in Gimp,
but the darn thing won't zoom in when it's supposed to. According to
xev, no X event is being generated for wheel motion when the
shift-key is down. I'm guessing that OS X is catching these events
and using the shift key to emulate a horizontal scroll wheel. Is
there a way to turn off this horizontal-wheel emulation? Is there a
way for X11.app to generate X events with the information it's
getting from OS X when I shift-scroll?
I've been looking at the Apple X11 source to try to see what's going
on, but I'm not sure I'm looking at the right code. And even if I
am, I'm not yet familiar enough with C++/Objective-C/X11-internals
to do much about it. But here goes...
xc/programs/Xserver/hw/darwin/quartz/XServer.m - line 306
(part of the translateEvent instance method, switching on the value
returned from the translated event's type method)
case NSScrollWheel:
[self getMousePosition:&xe fromEvent:anEvent];
xe.u.u.type = kXDarwinScrollWheel;
xe.u.clientMessage.u.s.shorts0 = [anEvent deltaY];
break;
If I wanted to have x11 treat all scrolling as if it were on the
y-axis, would this work instead of line 4 above?
xe.u.clientMessage.u.s.shorts0 = [anEvent deltaY] + [anEvent deltaX];
Is there a better way? If there was somehow movement reported from
both deltaX and deltaY, could this overflow? Any clue anyone can
provide would be most appreciated.
Thanks in advance,
Ben Burke
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.