I've been working on "porting" example 20 to Ruby.  I notice when I'm  
dragging the crosshairs around to select a rectangle that sometimes  
the button field of the plGraphicsIn structure will get set to a  
large value (e.g. 0x7b8000).  Although I haven't seen this behavior  
with x20c, I think that maybe there is a problem in drivers/xwin.c.

In MasterEH(), the event is dispatched according to its type.  The  
dispatch for the MotionNotify is...

     case MotionNotify:
         if ( event->xmotion.state )
             ButtonEH( pls, event ); /* drag */
         MotionEH( pls, event );

The (postulated) problem is that this can call ButtonEH, which calls  
LookupXButtonEvent, which treats the XEvent as an XButtonEvent when  
in fact it is an XMotionEvent.  LookupXButtonEvent assigns the  
plGraphicIn's button field from the "button" field of the mis-cast  
XEvent structure.  In the case of an XMotionEvent, I think this ends  
up treating the "is_hint" char field and subsequent "mystery bytes"  
as an unsigned int, leading to the bogus values I am seeing.   
Presumably. the memory usage of x20c is such that these extra  
"mystery bytes" are always zero so this problem never really  
manifests itself.

More info about these XEvents can be seen here...

http://www.xfree86.org/current/XButtonEvent.3.html

I'm not sure whether this is a real problem nor how to deal with it  
if it is.  For now I am ignoring it and moving on, but I thought I'd  
mention it in case anyone else has any thoughts or ideas about it.

Thanks,
Dave


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to