Alan W. Irwin wrote:
> On 2010-03-22 10:58-0400 Hazen Babcock wrote:
> 
>> On my linux box the xcairo device does not respond to mouse clicks, only
>> key presses.
>>
>> I thought I would look up how the devices are supposed to respond, but
>> it looks like plGetCursor() is undocumented. I'd be happy to fill in the
>> documentation and implement for the Qt devices, but, any thoughts on
>> what the "correct" behavior should be? I think we have the following
>> possibilities for when this function should return:
>>
>> (1) After any key press or mouse event including movement.
>> (2) Key press and mouse button events (release events only?).
>> (3) Mouse button event only.
>> (4) Key press only.
>> (5) Other permutations of the above.
> 
> This is an important topic which I am glad you have brought up again.
> 
> As far as getting proper documentation started, there is a whole lot
> of commentary in the xwin.c code concerning cursor(s), crosshairs, etc.,
> which should give a good start to that effort.

Ok. I will take care of adding the documentation for plGetCursor().

> To summarize all these key/mouse button identification issues, we probably
> want to deliver the exact same keysym symbolic (i.e., not hexadecimal)
> identification information as xev currently does for its key release events.
> That should be straightforward to implement since the xev source code is
> available under the permissive MIT license.

As of v10880, xcairo event handling should match that of xev. It detects 
button press and release events as well as key press and release events. 
I think we need to return press and release events in both cases for 
different reasons. For the mouse, as you mentioned, this allows the 
possibility of drag events, though it is going to be a bit sub-optimal 
without also returning motion events. For the keyboard, this is one way 
to handle modifiers like Alt and Shift.

I took advantage of the string element of PLGraphicsIn to return the key 
characters and button events as you requested. Hopefully this did not 
have some other purpose. Example 1 has been extended to print this 
element of the structure.

-Hazen


------------------------------------------------------------------------------
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