> Check the use where you click on the "move" icon to put it in "move"
> mode, then click on an element to start a move---that changes the move
> operation from a button-motion to a pointer-motion.
> 
> I got a bit concerned that the xlib_drag and xctk_drag functions were
> being somewhat randomly called with either ButtonMotionMask or
> PointerMotionMask.  Generally speaking, xcircuit treats buttons like
> keys and does not distinguish between pointer motion with or without
> buttons (the peculiarity of X11 in treating buttons as somehow
> fundamentally different from keyboard keys has always annoyed me.
> Why have "ButtonMotionMask" but not "KeyMotionMask"?).  Mainly, I was
> worried that an event handler registered with PointerMotionMask would
> be unregistered with ButtonMotionMask, causing the event to fail to
> be unregistered.  So I went through and changed all occurrances to
> "ButtonMotionMask | PointerMotionMask" to cover all bases (I'm not
> sure if ButtonMotionMask is a subset of PointerMotionMask, haven't
> tested that).

It is no problem for me to move items under Xt. However I did notice
that in case of selection under Xt the drag is not called.
(events.c:2203)

According to the X11 manual PointerMotionMask should be sufficient,
although both does not harm.
ButtonMotionMask: The client application receives MotionNotify events
only when at least one button is pressed.
PointerMotionMask: The client application receives MotionNotify events
independent of the state of the pointer buttons.

There is also an interesting note in the man-page, which should take
care of cleaning up handlers:
Note that  XtRemoveEventHandler() does not necessarily remove an event 
handler; rather, it modifies the conditions for which it is called.  To 
prevent  an  event handler from being called at all, call
XtRemoveEventHandler() with an event_mask  of  XtAllEvents  and  with 
nonmaskable  True.

Erik.


_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to