Partial width struts



I have completed a patch for metacity that implements the following
proposed specification for partial width panel struts (a patch against
the sgml file is attached).

Some comments:  the order of the list is different from the order
originally proposed.  This is so that the _NET_WM_STRUT property's list
would be the first four values of _NET_WM_STRUT_PARTIAL to make it
easier on clients that may want to set both.  The language below is
designed to ensure backwards compatibility with the old specification.

The metacity patch can be seen attached to this metacity bug:
http://bugzilla.gnome.org/show_bug.cgi?id=86682

_NET_WM_STRUT:

_NET_WM_STRUT, left, right, top, bottom, CARDINAL[4]/32

This property is deprecated, and may be removed from future versions
of this Specification.  It has been replaced with
_NET_WM_STRUT_PARTIAL. Clients MAY set this property 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.

_NET_WM_STRUT_PARTIAL:

_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

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.  

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 value for this property.  This will ensure that Clients
can safely set both properties without giving up the improved
semantics of the new property.

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 reserve the space. Also maximized windows should
not cover that reserved space.  The various start and end values tell
the window manager the extent of the strut so that struts can have a
width covering only part of the screen.

Rationale: A simple "do not cover" hint is not enough for dealing with
e.g. auto-hide panels. 

Notes: An auto-hide panel SHOULD set the strut to be its minimum, hidden
size. A "corner" panel that does not extend for the full length of a
screen border SHOULD only set one strut.

--- wm-spec.sgml	2003-06-07 14:41:03.000000000 -0700
+++ wm-spec.sgml.partial_width	2003-06-07 14:46:04.000000000 -0700
@@ -1119,6 +1119,22 @@ message may be sent).
 _NET_WM_STRUT, left, right, top, bottom, CARDINAL[4]/32
 ]]></programlisting>
 	<para>
+This property is deprecated, and may be removed from future versions
+of this Specification.  It has been replaced with
+_NET_WM_STRUT_PARTIAL. Clients MAY set this property 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>
+</sect2>
+<sect2><title>_NET_WM_STRUT_PARTIAL</title>
+	<programlisting id="NETWMSTRUT"><![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.  
@@ -1127,11 +1143,20 @@ The client MAY change this property at a
 watch out for property notify events.  
 	</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 value 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 know about this reserved space in order to be able to
-preserve the space. Also maximized windows should not cover that reserved
-space.
+reserve the space. Also maximized windows should not cover that reserved
+space.  The various start and end values tell the window manager the
+extent of the strut so that struts can have a width covering only part
+of the screen.
 	</para>
 	<para>
 Rationale: A simple "do not cover" hint is not enough for dealing with e.g.
@@ -1142,7 +1167,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>


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