Re: frame size hints



On Sat, Nov 30, 2002 at 01:50:49AM +0100, dominik vogt gmx de wrote: 
> I have thought about this topic a lot and come to the conclusion
> that it is very wrong to export information about the wm frame
> layout to the application.  It simply does not work unless the
> application is willing to listen for ConfigureNotify events on the
> frame window.

Or PropertyNotify on the property that's exported to the app.

> For example, in fvwm I can dynamically change the side at which
> the title is displayed (top/bottom, left/right) without the
> client window moving.  Such applications would never even notice
> that this has happened.  And I shudder at the thought of
> applications examining the geometry of a *shaded* frame window.

That's in fact what metacity was breaking in the AWT - AWT is confused
by shaded windows. So the property giving the frame edge sizes, if we
had one, would track whatever frame size the WM was going to use for
configure requests on the shaded window.

IIRC metacity honors configure requests as if the window were not
shaded, so it would provide the unshaded size even while shaded.
 
> *If* this can not be avoided, the frame geometry should be
> readable cia a client message ("Give me the frame geometry") and
> the WM replies with another client message that contains the
> (unshaded) frame geometry.  At no cost should the window id of the
> frame window be exported to the client.

Isn't a property on the app window equivalent to the client message?
The property gives us change notification for free.

> Of course, that information is already obsolete when it is
> delivered to the client.

Yes, of course. There's no way to avoid races here, that I see, if the
client is going to compute the relative positions of two windows. AWT
will just have to be broken that way.
 
> Just out of curiosity:  What is so special about metacity that AWT
> can not find the frame window?  Does that mean that xwininfo and
> xkillclient do not find it either?

It's just the shaded frames that were breaking.

AFAIK xwininfo and xkillclient look for the client window (the one
with WM_STATE) rather than the frame, don't they?

Havoc



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