Re: Viewport diagonal scrolling redraw



Â


On February 16, 2011 at 12:45 PM jcupitt gmail com wrote:

On 16 February 2011 04:48, Rendaw <rendaw zarbosoft com> wrote:
As a side note, does gdk_window_process_updates() preserve mouse motion
events when the MOTION_HINT mask is set? ÂI also had motion event queuing
problems (I would stop moving the mouse but the screen would continually
redraw for a few seconds until it had caught up) before I moved the
gtk_adjustment_set_value()'s out of the motion handling code and into a
g_idle_add callback.

I don't know how to get silky diagonal scrolling easily, but I can
help here (I think). The solution I found was to calculate all mouse
movement relative to the root window, not the window being scrolled.

In the motion event, there are a couple of fields called x_root and
y_root. Record these on button down together with the scroll position
of the underlying window, then during motion, scroll the window to the
position found by subtracting the start x_root from the current x_root
plus the original x.

This makes these feedback effects (which can be bizarre and horrible)
impossible.

John
Ah thanks, I might try that, it might be a bit cleaner than what I have now.
ÂThat problem isn't actually feedback, I think -- but repeated expose events not
being dropped (despite the motion hint, because of gdk_window_process_updates).
ÂIt's more like watching a slo-mo video of your previous actions. ÂThe feedback
thing I have licked for now.


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