Am 12.06.2010 00:33, schrieb Max Schwarz: > Hi, > > results! > I'm finally content with how the code looks and feels :-) > > Comparison: > before: http://c-palb.de/~max/before.ogg > after: http://c-palb.de/~max/after.ogg > > The videos don't do the change justice, it feels _much_ more natural. > > I had to patch the respective input drivers, the server itself (to support > non-integrating axes) and Qt4. The patches can be found in my github > repository (http://github.com/x-quadraht/pscroll). They apply against the > stable Ubuntu Lucid versions of the packages. You'll have to rebase them against git master to get into mainline. Why didn't you use git master to start with?
> I've set up a small ppa with binary packages (https://launchpad.net/~max-x- > quadraht/+archive/pscroll) but it's not up to date yet (building Qt4 on the > launchpad build farm takes _ages_). > > The thing I would like to work on now is filtering of the valuator events. > As you may notice in the "after" video, the touchpad even picks up some small > wiggles of my finger when I try to hold the position. > I imagine the "acceleration contexts" Simon mentioned, with a non-linear > curve, will help to surpress these twitches. I want to avoid to set a hard > minimum amount of scrolling. > I will look into "wheel acceleration" next... Cool - but I'm not sue you'll get what you like. The acceleration is not overly noise-resistant, though that may be made better. The closes equivalent to your description would be an acceleration profile which simply is zero below some threshold. But for handling noise, you'll have to do some extra checks. >From your description, the following might work: You feed all wheel data into an accel context (i.e. call ProcessVelocityData2D), as well as keeping a sum yourself. If PVD2D returns true, reset your sum to 0 and don't emit anything. If PVD2D returns false AND abs(sum) > your_threshold (say 1 or 2), you start emitting scrolling events until PVD2D gives you true again. True means a lot of time has passed since the last call, by default 200 ms. > > As I have already mentioned, the change in GTK seems much more complicated > than in Qt4. Qt has a really nice cross-platform "QScrollEvent" which has a > delta field with defined units. All GTK (GDK really) has to offer is > "GdkScrollEvent" which is a counter of how many scroll button presses to > scroll :-( > > Max > _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
