Re: [gtk-list] Re: wheel support, was: Re: Plans for 1.3/1.4



[...]
>It almost certainly has to be done in the X server. I have a trackman
>marble fx. It doesn't generate any particularly different messages
>when button 4 is pressed than when its not, so the server needs to
>keep the button state, and translate the ball motion events into
>something else when it knows that the button is pressed. This is not
>particularly hard, but is more appropriate for someone in the XFree86
>group to do, since it might have some subtle implications for other
>aspects of pointer handling.
[...]

The problem is, how is the X server supposed to know which window to scroll? 
It can't tell the difference between a widget window or a scrolled window or 
an application window or anything else. It doesn't know about windows which 
don't actually scroll, the contents are just redrawn at a different place 
according to where the scrollbar is. In Windows, the driver can tell all this; 
in X, it can't.

It would have to be implemented in the toolkit rather than the server; and it 
wouldn't be terribly hard. If a scrollable widget detects a 4-click, it grabs 
the mouse pointer, and turns all mouse motion events into window scroll 
events, warping the mouse pointer back to its original position after each 
event. When it receives another 4-click it releases the pointer and goes back 
to normal.

Talking of scrolling, has anybody used Risc OS on Acorn machines? They do 
something similar: if you drag ADJUST (button 3 on their mice, button 2 on X 
mice) on a scrollbar, you get panning in much the same way. It's extremely 
handy. They also support scrolling in reverse if you click ADJUST on the 
trough or arrow of a scrollbar. Useful when reading text and you want to back 
up.

-- 
+- David Given ---------------McQ-+ 
|  Work: dg@tao.co.uk             | Hail Eris! All hail Discordia!            
|  Play: dgiven@iname.com         | 
+- http://wired.st-and.ac.uk/~dg -+ 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]