XWarpPointer - can you make it not generate motion events?

1 visning
Hoppa till det första olästa meddelandet

Carolyn Deloge

oläst,
24 jan. 1994 22:47:041994-01-24
till
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

oläst,
26 jan. 1994 12:36:101994-01-26
till
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

Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden