[comp.windows.x] Bug in reported events from X11

jacobi.pa@XEROX.COM (10/27/88)

Bug in reported events from X11

I use three windows: "parent", "child", and, "other".  The "parent" 
really is "child"'s parent window.  "other" is a sibling of "parent"; "parent"  
and "other" are both children of the root window (of the first screen).  

I move the cursor, from background into "child", push a button, move 
the cursor into "other" and release the button.

This generates the following events in this order
   parent enterNotify 
   child enterNotify
   child buttonPress
   child leaveNotify
   child buttonRelease
   child leaveNotify
   parent leaveNotify
   other enterNotify

1) "child" has 2 leaveNotify events.  
2) "parent" did not get the leaveNotify before the button was released. 
3) "other" did not get the enterNotify before the button was released. 
4) "other" did not get a buttonRelease event at all. 

1 looks like a bug to me.
2-4 could be declared a feature.  However, I wouldn't like that.

What is the truth? Am I missing some point?

I'm using X11R2, (I'm told including patches 1..33) on a Sun 4 / 260 with 
SunOS 4.0

Christian


Christian Jacobi
Xerox PARC
Jacobi.pa@Xerox.com

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (10/29/88)

    Date: Wed, 26 Oct 88 18:05:06 PDT
    From: jacobi.pa@xerox.com

    I move the cursor, from background into "child", push a button, move 
    the cursor into "other" and release the button.

    1) "child" has 2 leaveNotify events.  

Correct.  But, you need to look at the "mode" component of the events.
One of them is Normal, one of them is Ungrab.  The client can
distinguish if it cares.

    2) "parent" did not get the leaveNotify before the button was released. 
    3) "other" did not get the enterNotify before the button was released. 
    4) "other" did not get a buttonRelease event at all. 

Correct, because the pointer has been grabbed by "child", and the grab
affects the event distribution.

    1 looks like a bug to me.

No.

    2-4 could be declared a feature.  However, I wouldn't like that.

It is considered a feature that an automatic grab occurs when the
pointer is pressed.