Re: frame size hints



On Fri, 2002-11-29 at 22:17, Havoc Pennington wrote:
> On Fri, Nov 29, 2002 at 09:49:37PM +0100, Matthias Clasen wrote: 
> > a) these toolkits won't use it anyway
> 
> The motive for this post is that Sun asked for advice on how to make
> AWT work with Metacity. Honestly, what answer can you give them? They
> have to make AWT API keep working, now that it's been shipped for
> years, even if they do deprecate the broken API and replace it, the
> deprecated API has to keep working. As far as I know, historically
> they rely on mwm-specific hacks and I'm even told some JDKs have
> contained enlightenment-specific hacks.

Just look through the fvwm-workers archives for the endless fun of
working around the brokenness of various jdks. But if they ask, that is
at least a promising sign.
 
> The "walk up the window tree and find the frame" hack doesn't quite
> work with Metacity, so they have to do something else. 

Why is that ? Doesn't metacity have a toplevel frame window ?

> I'd rather they
> do something I have in my upstream version that works on Linux as well
> as Solaris and won't break every time I touch the code, so I'm
> inclined to give them some "supported" mechanism.

I guess the two primary options are 

a) put the id of the frame window in a property on the client toplevel
b) put the frame extents in a property on the client toplevel

Advantages of a) 
Easy for the wm, just set the property once and forget it. 
No need to update it when the frame extents change.
 
Disadvantages of a)
Client still has to query the server for the frame geometry 
Client must select for StructureNotify on the frame to keep track of
frame extents changes.

Advantages of b)
Client doesn't have to query the server for the frame geometry

Disadvantages of b)
Doesn't really handle shaped decorations.
wm must update the property when the frame extents change.
  
Take your pick, or perhaps combine them. 

> I can give them _METACITY_FRAME_EXTENTS of course (which makes Sun
> happy as they don't ship anything else), but that just means the JDK
> will break on every other window manager.
> 
> I'll do metacity-specific if I have to, but I think it would be better
> if any WM could choose to support this.

We should at least discuss possible mechanisms.

Matthias




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