_NET_WM_STRUT_PARTIAL committed



Hi,

I put Rob's partial strut patch in CVS. Final patch appended.

I'm not quite sure anymore how to update the web site with the new
version...

Havoc

Index: wm-spec.sgml
===================================================================
RCS file: /home/freedesktop/wm-spec/wm-spec.sgml,v
retrieving revision 1.28
diff -u -p -u -r1.28 wm-spec.sgml
--- wm-spec.sgml	3 Jan 2003 20:29:28 -0000	1.28
+++ wm-spec.sgml	29 Jun 2003 22:17:43 -0000
@@ -1,6 +1,6 @@
 <!doctype article PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
 <!entity version "Draft version 1.3">
-<!entity date "January 3, 2003">
+<!entity date "June 29, 2003">
 ]>
 <article id="index">
 <articleinfo>
@@ -446,7 +446,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> properties set on
+client windows.
 	</para>
 	</sect2>
 	<sect2>
@@ -1119,19 +1123,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 equivalent to a _NET_WM_STRUT_PARTIAL property where all start
+values are 0 and all end values are the height or width of the logical screen.
+_NET_WM_STRUT_PARTIAL was introduced later than _NET_WM_STRUT, however, so
+clients MAY set this property in addition to _NET_WM_STRUT_PARTIAL 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. All coordinates are root window coordinates. The client MAY change
+this property at any time, therefore the Window Manager MUST watch 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
+_NET_WM_STRUT_PARTIAL.  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 in root window coordinates, that is, they are
+<emphasis>not</emphasis> relative 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 monitor.
 	</para>
 	<para>
 Rationale: A simple "do not cover" hint is not enough for dealing with e.g.
@@ -1142,7 +1192,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>
@@ -1640,7 +1691,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
@@ -1693,12 +1744,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]