Re: multiple strut at same edge?



On Monday 29 of June 2009, John Yates wrote:
> I am attempting to create a permanent Emacs minibuffer near the top of
> my screen.  In many distributions this is also the location of a top
> Gnome panel with a strut property. My understanding is that for my
> minibuffer never to be obscured it too needs to be a strut.
> Unfortunately I have not found any specification of how a window
> manager should behave when multiple struts are specified requesting
> the same edge.
>
> Empirically I have found that Metacity interprets all struts relative
> to the actual screen edge (so effectively overlapping) but then lays
> out the strut windows without overlap.

 Are you sure it is Metacity who places the windows? I think it's usually the 
panel apps themselves who do the placement.

> Without care the net effect is 
> a window in the desire position but without proper strut protection.
> Is this intended behavior or has my use case simply never been
> considered?
>
> This behavior requires an application to enumerate all struts along
> the desired edge and to sum their window geometries.  Unless all strut
> lifetimes are properly nested an application must also reevaluate this
> computation every time a potential strut window disappears or empty
> strut space may be left on  screen.  This seems complex, fragile and
> more properly to be the responsibility of the window manager.
>
> Thus it seems to me that struts should be specified to be additive.
> Any comments?

 The spec says "The property contains 4 cardinals specifying the width of the 
reserved area at each border of the screen". This does not explicitly say it, 
but I read "reserved area at border" as meaning the struct needs to be 
absolute. And that is also how the KDE3 panel used it and it worked. So 
changing this could mean breaking backwards compatibility.

 On the other hand I agree that this case isn't covered very well in the spec 
and perhaps could use at least a clarification.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l lunak suse cz , l lunak kde org
Lihovarska 1060/12   tel: +420 284 084 672
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz


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