Re: RFC: frame size hints
- From: Thomas Fitzsimmons <fitzsim redhat com>
- To: Lubos Lunak <l lunak suse cz>
- Cc: wm-spec-list gnome org
- Subject: Re: RFC: frame size hints
- Date: Tue, 16 Dec 2003 13:04:34 -0500
On Wed, 2003-12-10 at 07:03, Lubos Lunak wrote:
> On Wednesday 10 of December 2003 01:10, Rob Adams wrote:
> > Definitely should be "calculate". Window managers implementing
> > approximations should document this is their respective COMPLIANCE
> > documents.
>
> I object. I hope the previous messages in the thread have shown that it can
> be a major pain to always get it right, if it's actually possible at all.
> KWin simply cannot calculate it, it can only estimate. Even Havoc said in one
> message that the Metacity patch (which is the reference implementation for
> this) is not guaranteed to get it right. And I said already, I'd actually
> prefer if the wording stressed more the fact that it can be just a guess.
OK, I've rewritten the _NET_REQUEST_FRAME_EXTENTS section to emphasize
that its result is only an estimate and to incorporate Dominik's
suggestions.
Comments?
Tom
Index: wm-spec.xml
===================================================================
RCS file: /cvs/icccm-extensions/wm-spec/wm-spec.xml,v
retrieving revision 1.6
diff -u -r1.6 wm-spec.xml
--- wm-spec.xml 29 Jul 2003 18:08:38 -0000 1.6
+++ wm-spec.xml 16 Dec 2003 17:56:43 -0000
@@ -744,7 +744,35 @@
terminate the operation, e.g. by pressing the ESC key.
</para>
</sect2>
- </sect1>
+ <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 whose window has not yet been mapped can request of the
+Window Manager an estimate of the frame extents it will be given upon
+mapping. To retrieve such an estimate, the Client should send a
+_NET_REQUEST_FRAME_EXTENTS message to the root window. The Window
+Manager should respond by estimating the prospective frame extents and
+setting the window's _NET_FRAME_EXTENTS property accordingly. The
+Client should handle the resulting _NET_FRAME_EXTENTS PropertyNotify
+event. So that the Window Manager has a good basis for estimation,
+the Client should set any window properties it intends to set
+<i>before</i> sending this message.
+ </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 of the extents
+is a workable solution. The extents estimation 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>
+</sect1>
<sect1>
<title>Application Window Properties</title>
<sect2><title>_NET_WM_NAME</title>
@@ -1298,6 +1326,16 @@
event.
</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. left, right, top and bottom are widths of the
+respective borders added by the Window Manager.
+ </para>
+ </sect2>
</sect1>
<sect1>
<title>Window Manager Protocols</title>
@@ -1792,6 +1830,7 @@
<para>David Rosenthal</para>
<para>Lubos Lunak</para>
<para>Rob Adams</para>
+ <para>Thomas Fitzsimmons</para>
</sect1>
<sect1>
<title>Change history</title>
@@ -1799,6 +1838,10 @@
<title>Changes since 1.2</title>
<itemizedlist>
<listitem><para>
+Added _NET_REQUEST_FRAME_EXTENTS and _NET_FRAME_EXTENTS to allow a
+client to retrieve its window's frame extents.
+ </para></listitem>
+ <listitem><para>
Added new property _NET_WM_STRUT_PARTIAL to allow partial-width struts.
</para></listitem>
<listitem><para>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]