Re: frame size hints



Dominik Vogt wrote:
On Mon, Dec 02, 2002 at 09:56:45AM -0600, Sasha Vasko wrote:


Say, when cliends needs that - it sends a message to WM requesting this information, and the WM upon receiving such message - calculates withdrawn position of the window, and sets a property on this window with :

X, Y, WIDTH, HEIGHT, BORDER_WIDTH and GRAVITY,

of such withdrawn position.


Problem:  when the client receives the information, it may already
have changed.  I see no easy way around this race condition.

For the purpose of serialization - this is not relevant.



Also whenever WM receives UnmapNotify signaling that client withdraws its window - it should set such property on client window anyway. Surely cliend could of queried its withdrawn position by using XGetGeometry, but there is one essential piece of info that could not be obtained that way - gravity value that has been used by WM to position the window.


Well, but the client should know which gravity it requested
initially.  No need to ask the window manager.

Window manager may disregard requested gravity and use something else instead - based on its own config, or some some heuristics like: "If client is XV then screw its hints and always use static gravity instead" :)

Having above all this information about its withdrawn position, any clien could safely restore its position in future to the closest possible approximation, without concerning itself about WM frames, frame size, and any other external information, by simply setting its position prior to being mapped and using appropriate gravity in hints.


Yes, that should work.

Bye

Dominik ^_^  ^_^

Sasha




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