Re: RFC: frame size hints
- From: Lubos Lunak <l lunak suse cz>
- To: wm-spec-list gnome org
- Subject: Re: RFC: frame size hints
- Date: Thu, 4 Dec 2003 14:05:46 +0100
On Thursday 04 of December 2003 00:31, Thomas Fitzsimmons wrote:
> This is a proposal for a new application window property,
> _NET_FRAME_EXTENTS, and a new root window message,
> _NET_REQUEST_FRAME_EXTENTS. These additions allow a client to know the
> extents of its window frame.
> Havoc described the need for such extensions in this message:
> and proposed an implementation here:
> I've implemented this extension for Metacity and have used it to
> implement GNU Classpath's java.awt.Window API.
KDE actually has property announcing the frame widths, it's called
_KDE_NET_WM_FRAME_STRUT. Qt has some API that allows to position windows
using the frame geometry, rather than the window geometry itself, and it uses
this property (otherwise it tries to walk up the window hiearchy and guess).
I don't have a problem with this, it would mean just adding an alias for the
However, the message is something different :(. (Qt doesn't have API for
setting size using the frame geometry, it can only read it, and set position
using it.) The frame geometry potentionally depends on many things - window
type (utility windows get smaller decorations), its size and position (Fitts'
Law - maximized windows may be configured to have borders turned off if they
are at the screen edge), accessibility settings, and possibly more. Moreover,
in KWin's case, decorations are plugins, so KWin cannot really guarantee
anything. And the API is written in a way that doesn't allow any nice way how
to get the sizes from the plugin, before giving it the managed window.
That said, I'd probably just respond to the message with something like
'top=10,left=right=bottom=4' all the time - as KWin would often get it wrong
anyway, it wouldn't IMHO matter much how much wrong would it be. Which leads
me to question: Would (and if yes, how much) the apps break if they simply
did this guess themselves?
> _NET_FRAME_EXTENTS, left, right, top, bottom, CARDINAL/32
> The window manager should set _NET_FRAME_EXTENTS to the extents of the
> window's frame. A window's frame extents are defined as follows:
> left = x coordinate of window's left edge, relative to its frame's left
> right = frame_width - window_width - left
> top = y coordinate of window's top edge, relative to its frame's top
> bottom = frame_height - window_height - top
I think it would be much simpler to say just 'left,right,top,bottom are
widths of the respective borders added by the window manager'.
SuSE CR, s.r.o. e-mail: l lunak suse cz , l lunak kde org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
] [Thread Prev