Re: Partial width struts
- From: Rob Adams <robadams ucla edu>
- To: Mark McLoughlin <mark skynet ie>
- Cc: wm-spec-list gnome org
- Subject: Re: Partial width struts
- Date: 11 Jun 2003 14:20:44 -0700
> Actually, now that I think about it. That's going to be 9 zeros in any
> case I can think of, which is a bit of jump in wasted space. How about
> something like this:
>
> _NET_WM_STRUT, border, width, start, end, CARDINAL[4]/32
>
> #define _NET_WM_STRUT_BORDER_LEFT 0
> #define _NET_WM_STRUT_BORDER_RIGHT 1
> #define _NET_WM_STRUT_BORDER_TOP 2
> #define _NET_WM_STRUT_BORDER_BOTTOM 3
>
>
> So that the property only specifies a single strut. I think that makes
> sense - are there any use cases for more than one strut ?
>
Well I could imagine some weird shaped window in the corner maybe
setting multiple struts, but I agree that's pretty unlikely. The
existing proposal is ever-so-slightly more general, but what do people
think? Would you rather use the mostly-zero length 12 list or the magic
number length 4 list?
Using the length 12 list does have the advantage that it makes it very
easy for applications setting the partial-width strut to set the
full-width one as well, but that's a pretty minor point.
> "
> 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.
>
> 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.
> "
OK sure. Attached is another revision of the spec. If people indicate
they like the length 4 list I'll go ahead and update it; otherwise I
think I'll stick with the length 12 list.
-Rob
Index: wm-spec.sgml
===================================================================
RCS file: /freedesktop/web/content/standards/wm-spec/1.3/wm-spec.sgml,v
retrieving revision 1.2
diff -u -r1.2 wm-spec.sgml
--- wm-spec.sgml 3 Jan 2003 20:31:14 -0000 1.2
+++ wm-spec.sgml 11 Jun 2003 21:22:37 -0000
@@ -446,7 +446,11 @@
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>
@@ -1119,19 +1123,66 @@
_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
+coordinated for 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.
+The purpose of struts is to reserve space at the borders of the
+ </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.
@@ -1142,7 +1193,8 @@
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]