Re: High-resolution scroll events



Hi!,

On Wed, 2010-11-17 at 13:29 +0100, Max Schwarz wrote:
> Hi,
> 
> I'm currently developing patches for the X11 ecosystem to provide higher-
> resolution scrolling for devices that support it (touchpads, trackpoints, 
> etc). My patches are kept in a github repo ([1]).

Was aware of your work, awesome stuff.

> 
> It looks like my patch will get merged into Xorg eventually (see my thread 
> over at xorg-devel [2]) and I wanted to have a first look at GTK/GDK and how to 
> implement support there.
> 
> It seems to me that the crux of the matter is the GdkEventScroll, which has no 
> way of specifying the precise amount to scroll. It's just emitted for each 
> old-style scroll tick.
> 
> Do you have an idea on how to implement this? I think Qt's model is quite 
> nice, they have a 'delta' field in their event [3] which gives more precise 
> information. Of course, If you want to retain API compability (which I think 
> you do) a new event would have to be introduced that is emitted in parallel.
> 
> Thoughts?

How do you think packing both old and new information in the same event
struct work? the current GdkScrollDirection could remain as a hint. I
don't know the rate difference in the emission of both events, so
perhaps apps relying on the old behavior could get far too fast (or
slow) scrolling.

As for how the information could be stored, I see you went for
implementing a single valuator with the delta value, IMHO it'd be great
have both delta and angle, so two finger scrolling in touchpads could
happen both horizontally and vertically within a single event whenever
there is support for that beneath GTK+.

Also, I think "delta" in QWheelEvent feels to tied to hardware details,
I think it'd be simpler to have the event's delta represent a real
distance in the screen, say in pixels.

Cheers,
  Carlos

> 
> Thanks,
>   Max
> 
> [1]: http://github.com/x-quadraht/pscroll .
> [2]: http://www.mail-archive.com/xorg-devel lists x org/msg14536.html
> [3]: http://doc.qt.nokia.com/4.7/qwheelevent.html#delta
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




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