Re: Mouse position
- From: John Cupitt <jcupitt gmail com>
- To: Robert Vickerstaff <robertvickerstaff yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Mouse position
- Date: Fri, 25 Mar 2005 06:23:58 +0000
On Thu, 24 Mar 2005 20:15:08 +0000 (GMT), Robert Vickerstaff
<robertvickerstaff yahoo com> wrote:
How do I control the location of the mouse pointer? I
need to prevent the mouse from exiting a square region
within a window, by resetting the location everytime
it tries to move outside of the square. (This isn't
related to wanting to grab the window border).
http://developer.gnome.org/doc/API/2.0/gdk/gdk-General.html#gdk-pointer-grab
If you pass a window in confine_to, the pointer will not be allowed
outside that window during the grab. Ungrab to release the pointer
again.
There's an XWarpPointer() call, but it's not wrapped by gdk, so you
have to 'go native' to use it.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]