XWarpPointer - can you make it not generate motion events?

1 view
Skip to first unread message

Carolyn Deloge

unread,
Jan 24, 1994, 10:47:04 PM1/24/94
to
Hi,

Is there a way to supress the MotionNotify events generated by
XWarpPointer? If not, is there an alternative to avoid the
MotionNotify events generated from this particular function?

The reason I ask is because I am writing an application that lets the
user drag a circle back and forth along an existing line. If the user
moves the mouse too quickly, the pointer ends up at one of the far
edges of the screen. Therefore, the user has to pick up the mouse
and move it back to the circle to continue dragging it along the line.

As I move the pointer, I want it to stay positioned in the circle.
I think XWarpPointer will solve this problem, but the extra MotionNotify
events from this function are causing problems with drawing/redrawing
the circle.

Any suggestions would be appreciated.

Thank you.


Carolyn Deloge
cde...@cs.uml.edu

David Dolson

unread,
Jan 26, 1994, 12:36:10 PM1/26/94
to
Carolyn Deloge (cde...@cs.uml.edu) wrote:
: Hi,

If you use XWarpPointer, you _will_ get MotionNotify events as long as
they are in your event mask. You could remove MotionNotify from your
event mask during the time you do the warp, then put it back, but that
may have performance implications.

But If I understand correctly: You are dragging a circle, but the user
accidentally leaves the window of your application, perhaps causing you
to lose focus?

Are you grabbing the pointer while the drag is in progress? Generally you
will grab the pointer from the time the button is pressed until it is
released. That way you continue to get MotionNotify events even when the
cursor is outside your window.

e.g. see XGrabPointer()

Not an official HP statement.
David Dolson

Reply all
Reply to author
Forward
0 new messages