Re: Partial width struts



All right here's what I believe to be the final consensus on this new
property.

Please give any final comments.

Thanks,
Rob
Index: wm-spec.sgml
===================================================================
RCS file: /freedesktop/web/content/standards/wm-spec/1.3/wm-spec.sgml,v
retrieving revision 1.4
diff -p -u -r1.4 wm-spec.sgml
--- wm-spec.sgml	10 Jun 2003 12:03:53 -0000	1.4
+++ wm-spec.sgml	13 Jun 2003 06:00:25 -0000
@@ -451,7 +451,11 @@ completely contained within the viewport
  Work area SHOULD be used by desktop applications to place desktop icons appropriately.
 	</para>
 	<para>
-	The Window Manager SHOULD calculate this space by taking the current page minus space occupied by dock and panel windows, as indicated by the <link linkend="NETWMSTRUT">_NET_WM_STRUT</link> property set on client windows.
+The Window Manager SHOULD calculate this space by taking the current
+page minus space occupied by dock and panel windows, as indicated by
+the <link linkend="NETWMSTRUT">_NET_WM_STRUT</link> or <link
+linkend="NETWMSTRUTPARTIAL">_NET_WM_STRUT_PARTIAL</link> property set on
+client windows.
 	</para>
 	</sect2>
 	<sect2>
@@ -1128,19 +1132,65 @@ message may be sent).
 _NET_WM_STRUT, left, right, top, bottom, CARDINAL[4]/32
 ]]></programlisting>
 	<para>
-This property MUST be set by the Client if the window is to reserve space at
-the edge of the screen.  The property contains 4 cardinals specifying the
-width of the reserved area at each border of the screen.  
-The order of the borders is left, right, top, bottom.
-The client MAY change this property at any time, therefore the Window Manager MUST
-watch out for property notify events.  
+This property is a shortcut for the use case for _NET_WM_STRUT_PARTIAL
+where all start values are 0 and all end values are height or width of
+the logical screen.  Clients MAY set this property in addition to
+_NET_WM_STRUT_PARTIAL using just the first four values of the
+_NET_WM_STRUT_PARTIAL property to ensure backward compatibility with
+Window Managers supporting older versions of the Specification.
 	</para>
-	<para>
-The purpose of struts is to reserve space at the borders of the desktop.  This
-is very useful for a docking area, a taskbar or a panel, for instance. The  
-Window Manager should know about this reserved space in order to be able to
-preserve the space. Also maximized windows should not cover that reserved
-space.
+</sect2>
+<sect2><title>_NET_WM_STRUT_PARTIAL</title>
+	<programlisting id="NETWMSTRUTPARTIAL"><![CDATA[
+_NET_WM_STRUT_PARTIAL, left, right, top, bottom, left_start_y, left_end_y,
+right_start_y, right_end_y, top_start_x, top_end_x, bottom_start_x,
+bottom_end_x,CARDINAL[12]/32
+]]></programlisting>
+	<para>
+This property MUST be set by the Client if the window is to reserve
+space at the edge of the screen.  The property contains 4 cardinals
+specifying the width of the reserved area at each border of the
+screen, and an additional 8 cardinals specifying the beginning and end
+corresponding to each of the four struts.  The order of the values is
+left, right, top, bottom, left_start_y, left_end_y, right_start_y,
+right_end_y, top_start_x, top_end_x, bottom_start_x, bottom_end_x The
+client MAY change this property at any time, therefore the Window
+Manager MUST watch out for property notify events if the Window
+Manager uses this property to assign special semantics to the window.
+	</para>
+	<para>
+If both this property and the _NET_WM_STRUT property are set, the
+Window Manager MUST ignore the _NET_WM_STRUT property values and use
+instead the values for this property.  This will ensure that Clients
+can safely set both properties without giving up the improved
+semantics of the new property.
+	</para>
+	<para>
+The purpose of struts is to reserve space at the borders of the
+desktop.  This is very useful for a docking area, a taskbar or a panel,
+for instance. The Window Manager should take this reserved area into
+account when constraining window positions - maximized windows, for
+example, should not cover that area.
+	</para>
+	<para> 
+The start and end values associated with each strut allow areas to be
+reserved which do not span the entire width or height of the screen.
+Struts MUST be specified relative to the edges of the logical screen,
+and not to the edges of any view port or Xinerama monitor.
+	</para>
+	<para>
+For example, for a panel-style Client appearing at the bottom of the
+screen, 50 pixels tall, and occupying the space from 200-600 pixels
+from the left of the screen edge would set a bottom strut of 50, and
+set bottom_start_x to 200 and bottom_end_x to 600.  Another example is
+a panel on a screen using the Xinerama extension.  Assume that the set
+up uses two monitors, one running at 1280x1024 and the other to the
+right running at 1024x768, with the top edge of the two physical
+displays aligned.  If the panel wants to fill the entire bottom edge
+of the smaller display with a panel 50 pixels tall, it should set a
+bottom strut of 306, with bottom_start_x of 1280, and bottom_end_x of
+2303.  Note that the strut is relative to the screen edge, and not the
+edge of the xinerama.
 	</para>
 	<para>
 Rationale: A simple "do not cover" hint is not enough for dealing with e.g.
@@ -1151,7 +1201,8 @@ Notes: An auto-hide panel SHOULD set the
 A "corner" panel that does not extend for the full length of a screen border
 SHOULD only set one strut.
 	</para>
-	</sect2><sect2><title>_NET_WM_ICON_GEOMETRY</title>
+</sect2>
+<sect2><title>_NET_WM_ICON_GEOMETRY</title>
 <programlisting><![CDATA[
 _NET_WM_ICON_GEOMETRY, x, y, width, height, CARDINAL[4]/32
 ]]></programlisting>
@@ -1654,7 +1705,7 @@ int net_get_hostname (char *buf, size_t 
   <Sect1>
     <title>Copyright</title>
     <para>
-Copyright (C) 2000, 2001, 2002 See Contributors List
+Copyright (C) 2000-2003 See Contributors List
     </para>
     <para> 
 Permission  is hereby granted, free of charge, to any person
@@ -1707,12 +1758,16 @@ OR OTHER DEALINGS IN THE SOFTWARE.  
 		<para>Matthias Clasen</para>
 		<para>David Rosenthal</para>
                 <para>Lubos Lunak</para>
+                <para>Rob Adams</para>
 	</sect1>
   <Sect1>
     <title>Change history</title>
  	    <sect2>
  		<title>Changes since 1.2</title>
  		<itemizedlist>
+ 			<listitem><para>
+Added new property _NET_WM_STRUT_PARTIAL to allow partial-width struts.
+ 			</para></listitem>
  			<listitem><para>
 Rewrote the implementation notes on "Window Movement", retitled it 
 to "Window Geometry".


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