First of all, thank you very much to all the people who gave me so useful feedback after my previous post.
The idea for this week was to start integrating the HildonPanneableArea code into GtkScrolledWindow, however both Chris and Karl emailed me suggesting to use a time based approach rather than the one used by hildon. Chris pointed me to MxKineticScrollView, which is the evolution of HildonPanneableArea. The code is much easier and cleaner than the hildon one, so I decided to use it instead.
One of the things that caught my attention was that MxKineticScrollView doesn’t need to synthesize events. This is because clutter implements capture and bubble event handling. GTK+ does always bubble so that events are propagated from child to parent. Having support for capture event handling makes the kinetic scrolling implementation easier and simpler, so following the same approach than clutter, I wrote an initial patch to add GtkWidget::captured-event signal.
Using the new captured-event signal, integrate the MxKineticScrollView code into GtkScrolledWindow was a bit easier. I still had to use an input-only event window, and grab the device on button press to make sure that motion and button release events were received on the scrolled window. It’s still far from finished but I have already published a work in progress patch and a new test to try it out.
During the next week I plan to continue working on kinetic scrolling, fixing issues and completing the implementation with the missing features.