Composite and MapNotifies

Matthias Clasen mclasen at redhat.com
Thu Oct 20 13:22:56 PDT 2005


On Thu, 2005-10-20 at 22:14 +0200, Soeren Sandmann wrote:
> When a compositing manager is running, there is currently a bug where
> metacity stops paying attention to the GNOME panel. What's going on
> is:
> 
> - RedirectSubwindows causes all windows to get unmapped, then mapped
>   again. Composite makes sure the MapWindow requests don't get turned
>   into MapRequests by temporarily turning on overrideRedirect for the
>   window.
> 
> - So the window manager gets an UnmapNotify for all its windows, then
>   a sequence of MapNotifies.
> 
> To a window manager UnmapNotify means "stop paying attention to this
> window until I try and map it again". The problem is then that
> metacity does not interprete MapNotifies as "you should start paying
> attention again", because metacity expects to get MapRequests, not
> MapNotifies. So as far as it knows, the windows are still
> withdrawn. For windows with a frame, metacity does manage to cope,
> because the windows in questions are frame windows. But for frameless,
> but managed, windows such as the GNOME panel and nautilus, metacity
> still thinks they are withdrawn.
> 
> Now, metacity can certainly be changed to work around this, but I'd
> expect many other window managers to have similar problems. And the
> assumption:
> 
>         If I have SubstructureRedirect selected on the root window,
>         then non-override-redirect toplevels do not get mapped without
>         me being involved
> 
> is pretty fundamental to being a window manager.
> 
> So I propose the attached patch which turn off generation of the
> Map/UnmapNotifies for the windows during the redirection process. The
> window manager will then not even know that anything happened.

Sounds like the right thing to do. the unmap/map should probably be
treated as an implementation detail of composite and not leak out to
confuse window managers. Maybe composite should have a dedicated 
WindowGotRedirected event, or does it already ?

Matthias




More information about the xorg mailing list