warp-pointer & query-pointer (while we have pointer grab)
- From: mmc maruska dyndns org (Michal Maruška)
- To: sawfish-list gnome org
- Subject: warp-pointer & query-pointer (while we have pointer grab)
- Date: Fri, 18 Jul 2003 11:59:07 +0200
This code illustrates the problem:
"H-7" (lambda () (warp-cursor 100 100) (display-message (format #f "%s" (query-pointer 't)))))
The position reported is not (100 . 100), b/c processing of the pointer events
is frozen. So the warp-cursor will take place only when we call allow-events (or
ungrab). Note, that the code must be bound to a key. You cannot simply execute
the lambda (from sawfish-client).
I think, that a proper solution, given that we have the grab, is to keep the
position in a variable (i.e. warp-cursor updates and query-pointer reads the
variable when we have a grab).
(btw. why -cursor and -pointer ?)
] [Thread Prev