Re: Window History Placement

On Wed, 2003-01-29 at 16:09, Havoc Pennington wrote:
> _NET_WM_SAVE_ID lets apps:
>  - explicitly control placement history, which may be pretty different
>    than SM; for example a valid way to handle SM is to just close all
>    dialogs on session save, rather than setting the role on them
>  - lets them disable placement history
>  - lets them detect whether the WM supports placement history 
>    by checking for support of _NET_WM_SAVE_ID 

Nice summary. Why would a Client want to know about history placement
support though ?

Here is a new patch, incorporating some of the comments.


Index: wm-spec.sgml
RCS file: /home/freedesktop/wm-spec/wm-spec.sgml,v
retrieving revision 1.28
diff -u -b -B -p -r1.28 wm-spec.sgml
--- wm-spec.sgml	3 Jan 2003 20:29:28 -0000	1.28
+++ wm-spec.sgml	29 Jan 2003 21:54:59 -0000
@@ -234,6 +234,23 @@ layer.
+<title>Placement Policies</title>
+Placement of newly-mapped windows is an area where Window Managers
+have traditionally offered a wide range of policies. Simple policies
+like always using the provided geometry or interactive placement are
+already (partially) covered by the ICCCM. Beyond this most Window
+Managers offer automatic policies like tiling, stacking or various 
+best-fit algorithms. 
+<para id="HISTORY">
+More recently, "history placement", i.e. restoring the window to it's last
+known position has been introduced. Unlike most other placement policies, 
+history placement needs a bit of cooperation from the Client to identify 
+which windows are to be considered `the same'. 
 <title>Scope of this spec</title>
 <para>This spec tries to address the following issues:</para>
@@ -244,6 +261,7 @@ decorations and maintain the stacking or
 window manager about the type of their windows.</para></listitem>
 <listitem><para>Enable pagers and taskbars to be implemented as separate 
 clients and allow them to work with any compliant window manager.</para></listitem>
+<listitem><para>Support history placement.</para></listitem>
 <para>This spec doesn't cover any of the following:</para>
@@ -1205,6 +1223,20 @@ _NET_WM_HANDLED_ICONS
 	for iconified windows. 
+    <sect2><title>_NET_WM_SAVE_ID</title>
+	<programlisting><![CDATA[
+	<para>
+	If this property is set to a non-empty string, the Window Manager
+	will use it to identify this window for the purpose of 
+        <link linkend="HISTORY">history placement</link>. If it is not set,
+	the Window Manager may identify the window by other means (see 
+	<xref linkend="PLACEMENT">).
+	If it is set to the empty string, the Window Manager should not store
+	the location of this window for history placement.
+        </para>
+     </sect2>
 	<title>Window Manager Protocols</title>
@@ -1613,6 +1645,35 @@ int net_get_hostname (char *buf, size_t 
+	<sect2 id="PLACEMENT">
+      <title>Placement policies</title>
+      <para> 
+        Clients should specify USPosition in the WM_NORMAL_HINTS property to
+	indicate the initial geometry has been explicitly requested by the 
+	user (typically via a --geometry command line option).
+      </para>
+      <para>
+	Placement policies should not be applied if the geometry is restored 
+	from a saved session. Many Clients erroneously rely on their initial
+	geometry being granted if USPosition or PPosition is specified in the 
+        WM_NORMAL_HINTS property, thus Window Managers are well advised to
+	honour these flags at least optionally.
+      </para>
+      <para>
+	To identify a window without _NET_WM_SAVE_ID for the purpose of
+        history placement, the Window Manager may use a combination of 
+        additional tag to differentiate between windows which would otherwise
+	be considered identical. One possibility to generate the tag is to 
+	count the windows with the same combination.
+      </para>
+      <para>
+	Note that restoring a window's size (from history or a saved session)
+        requires to also restore its maximization and fullscreen state &mdash;
+	otherwise maximized windows will be restored to screen-size normal 
+	windows.   
+      </para> 
+      </sect2>
@@ -1715,6 +1776,10 @@ and renamed them to columns and row for 
 Change the description of _NET_WM_STATE_MODAL to no longer require apps to 
 break the ICCCM for group-modal windows, but still support the 
 WM_TRANSIENT_FOR=root dialect.
+ 			</para></listitem>
+ 			<listitem><para>
+Added _NET_WM_SAVE_ID to support history placement, together with an
+introductory section and implemenation notes on placement policies.

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