Hi,
I am using the function setEventCallback(...) of SoXtRenderArea because i want
to find the mouse position relative to the root window(XAnyEvent).
Now i have two problems:
firstly, I can not catch ButtonRelease event, i can only catch ButtonPress
event.
It seems button release dose not generate any event.
secondly, I can not remove the event callback after i find the mouse position.
If the event callback is there i can not spin the image. While i realy want to
spin the image.
here is part of my code:
SoXtRenderArea *area = (SoXtRenderArea *)renderArea;
area->setEventCallback(mouseMoved, this);
SbBool ThreeDCanvas::mouseMoved(void *userData, XAnyEvent *anyEvent)
{
if(anyEvent->type==ButtonRelease)
{
printf("Button Released");
}
}
It never prints anything. While it i change ButtonRelease to ButtonPress, it
works.
Can you please help me(email me even if you can only solve one problem).
Regards
Alison
|