re how to mask the left button one way to mask the left button check the contents of the xevent that the xaddeventhandler send to your event handling function in your case it is the show mouse position function if the xevent arrive in this function as xevent p event then the value of p event xbutton button is the button that was pressed so you just do a switch on that value in order to distinguish between them in case it was not clear p event xevent button is an int by the way you mentioned the button motionmask and if anyone can help me with these motionmasks i would be grateful i can not figure out how do distinguish between motions by which button is pressed as the motion is occurring in essence i would like an seperate event handler for motion with each button unfortunately the xevent sent by a motionmask does not seem to contain the value of the pressed button any ideas eps
