bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menus in lower left corner WAS: Re: [PATCH] NSMenu patch version 2.


From: Willem Rein Oudshoorn
Subject: Re: Menus in lower left corner WAS: Re: [PATCH] NSMenu patch version 2.
Date: 09 Mar 2003 14:47:34 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Pete French <pete@twisted.org.uk> writes:

> > Sequence that will lead to NOT unmapping window (theory)
> > --------------------------------------------------------
> >
> > A - XMapWindow (..., WINDOW)
> > B - WINDOW is toplevel window, now this request is redirected
> >     to the window manager.   
> > C - XUnmapWIndow (..., WINDOW)
> > D - X server notice that the window is not yet mapped, the request
> >     for mapping is somewhere in the window manager and not honored 
> >     yet.  Not that the X server cares, it sees an unmap request
> >     on an unmapped window so it will DROP the unmap request.
> > E - The window manager finally gets around considering the request
> >     and it will map the window.
> 
> So this isnt just a GNUstep problem surely ? Cannot the above sequence of
> events hapen to any X app ?

Yes, it could happen to any X app.  But it is very very unlikely.
How many applications do map/unmap windows in quick succession?
Of course other programs also have menus which are mapped/unmapped 
quickly,  but I suspect that they will set the override_redirect flag to TRUE.
Setting the override_redirect to TRUE will make sure that redirection
does not happen.  
 
> Also, if the MapWindow event is being redirected to the window manager to
> handle, why is it that the Unmap request is not similarly redirected ?

I do not know.  I am just reading the documentation.

> If the window manager dealt with both then the problem goes away too
> doesnt it ?

I suspect so, but the documentation for the XUnmapWindow states that:
        
        If /w/ is already unmapped, XUnmapWindow () has no effect.

And the unmap events are not redirected, so the point is moot.

> Why is a matched pair of events being dealt with by two
> different pieces of code anyway ?

The philosophy of the redirection is that when an application 
maps a window on the screen it is the windowmanager that 
decides the placement policy.  For this the windowmanager
needs to intercept the request.  Removing does not really 
need redirection, so I guess they did put unmap redirection
in the standard.  

Wim Oudshoorn.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]