On Mon, 10 Nov 2003 23:24:52 -0800 (PST), "Kumar P."
<[EMAIL PROTECTED]> wrote:

>      I created a window using XCreateWindow and set
>attributes.event_mask to ButtonReleaseMask alone. But
>the window is not receiving the ButtonRelease events.

As far as I understood it, when a window receives a ButtonPressEvent then X
automatically grabs the pointer for that window until the corresponding
ButtonReleaseEvent has been sent. I may be wrong, but I think to remeber
reading this somewhere when I did my research on pointergrabbing.

>It is receiving the ButtonRelease event, if
>ButtonPressMask is also selected (or) its parent

That would be expected and consistent with what I remember.

>Widget's window has OwnerGrabButtonMask. Is there any
>other way to receive ButtonRelease event alone? 

I think it would be a problem if a window receives only a press but no
release. Depending on what is going on in the desktop the behaviour could be
pretty fucked up. If you receive the release then you would need some way to
pass this on to the proper window. I tried to achieve this, but I had no luck.
So if you find some way how to do it and is portable across windowmanagers I
would gladly hear about it. :)

>Is it neccessary to select ButtonPressMask also, in
>order to receive ButtonRelease events. Thanks in
>advance.

Yes.

-- 
Gerhard Gruber
Maintainer of
SoftICE for Linux - http://sourceforge.net/projects/pice
Fast application launcher - http://sourceforge.net/projects/launchmenu

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to