RFC: frame size hints
- From: Thomas Fitzsimmons <fitzsim redhat com>
- To: wm-spec-list gnome org
- Subject: RFC: frame size hints
- Date: Wed, 03 Dec 2003 18:31:29 -0500
Hello,
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:
http://mail.gnome.org/archives/wm-spec-list/2002-November/msg00051.html
and proposed an implementation here:
http://mail.gnome.org/archives/wm-spec-list/2003-January/msg00048.html
I've implemented this extension for Metacity and have used it to
implement GNU Classpath's java.awt.Window API.
Comments?
Tom
<sect2><title>_NET_REQUEST_FRAME_EXTENTS</title>
<programlisting><![CDATA[
_NET_REQUEST_FRAME_EXTENTS
window = window for which to set _NET_FRAME_EXTENTS
message_type = _NET_REQUEST_FRAME_EXTENTS
]]></programlisting>
<para>
A client that wishes to know the extents of its window's frame should
send this message to the root window. The window manager should
respond by setting the window's _NET_FRAME_EXTENTS property.
</para>
</para>
If the window manager receives a _NET_REQUEST_FRAME_EXTENTS message
before the window is mapped, it should estimate the frame extents that
the window would be given upon mapping, then set _NET_FRAME_EXTENTS
accordingly.
</para>
<para>
Rationale: A client cannot calculate the dimensions of its window's
frame before the window is mapped, but some toolkits need this
information. Asking the window manager for an estimate is a workable
solution. Extents estimates may depend on the current theme, font
sizes or other window properties. The client can track changes to the
frame's dimensions by listening for _NET_FRAME_EXTENTS PropertyNotify
events.
</para>
</sect2>
<sect2><title>_NET_FRAME_EXTENTS</title>
<programlisting><![CDATA[
_NET_FRAME_EXTENTS, left, right, top, bottom, CARDINAL[4]/32
]]></programlisting>
<para>
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:
</para>
<para>
left = x coordinate of window's left edge, relative to its frame's left
edge
right = frame_width - window_width - left
top = y coordinate of window's top edge, relative to its frame's top
edge
bottom = frame_height - window_height - top
</para>
</sect2>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]