Re: [gtk-list] Re: Relative mouse motion?




On Sun, 21 Mar 1999, Havoc Pennington wrote:

> 
> On Sun, 21 Mar 1999, Janne Lof wrote:
> > 
> > Is it possible to get relative mouse postions in GTK? I need to know how
> > much mouse has moved since last motion event, not it's absolute position.
> > 
> 
> Save a couple of variables with the position of the last event, then
> compute the delta yourself when you get the next event. The GnomeCanvas
> test in test-gnome works like this...
> 


I have used this method before, but it's not good enough.
Unfortunately it doesnt work when the cursor hits border of
the window (or display) when mouse is moved 'too far' into one
direction.

-- 
Janne Löf




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