desktop layout patch



Hi,

As discussed earlier. Two changes:

 - it's set by the pager owning a manager selection.
 - the flag value for "compute from number of spaces" 
   is 0 instead of -1 since it eliminates signedness
   issues and confused me less when implementing the 
   code.

I've also implemented this with the GNOME workspace switcher and
Metacity and it seems to work fine and be easy to implement.

Havoc

Index: wm-spec.sgml
===================================================================
RCS file: /home/freedesktop/wm-spec/wm-spec.sgml,v
retrieving revision 1.18
diff -u -p -u -r1.18 wm-spec.sgml
--- wm-spec.sgml	9 Mar 2002 02:19:34 -0000	1.18
+++ wm-spec.sgml	17 May 2002 01:29:46 -0000
@@ -461,6 +461,69 @@ virtual roots and allows clients to figu
 windows.
 	</para>
 	</sect2>
+	<sect2>
+	<title>_NET_DESKTOP_LAYOUT</title>
+	<programlisting><![CDATA[
+_NET_DESKTOP_LAYOUT, CARDINAL[3]/32
+]]>
+ #define _NET_WM_ORIENTATION_HORZ 0
+ #define _NET_WM_ORIENTATION_VERT 1
+</programlisting>
+        <para>
+        <emphasis>This property is set by a workspace switcher or
+        pager application, not by the window manager.</emphasis>
+        When setting this property, the workspace switcher must 
+        own a manager selection (as defined in the ICCCM 2.8). 
+        The manager selection is called
+        <literal>_NET_DESKTOP_LAYOUT_Sn</literal> where
+        <literal>n</literal> is the screen number.
+        </para>
+	<para>
+  <literal>_NET_DESKTOP_LAYOUT</literal> describes the layout of
+  virtual desktops relative to each other. The property contains three
+  values: the pager orientation, the number of desktops in the X
+  direction, and the number in the Y direction.
+        </para> 
+        <para>
+  The virtual desktops are arranged in a rectangle
+  with X rows and Y columns.  If X times Y does not match the total number of
+  desktops as specified by
+  <literal>_NET_NUMBER_OF_DESKTOPS</literal>, the highest-numbered
+  workspaces are assumed to be nonexistent. Either X or Y (but not
+  both) may be specified as 0 in which case its actual value will be
+  derived from <literal>_NET_NUMBER_OF_DESKTOPS</literal>.
+        </para>
+        <para>
+  When the orientation is <literal>_NET_WM_ORIENTATION_HORZ</literal>
+ the layout for X=4 and Y=3 looks like this:
+<programlisting>
+ +--+--+--+--+
+ | 1| 2| 3| 4|
+ +--+--+--+--+
+ | 5| 6| 7| 8|
+ +--+--+--+--+
+ | 9|10|11|12|
+ +--+--+--+--+
+</programlisting>
+         </para>
+        <para>
+  When the orientation is <literal>_NET_WM_ORIENTATION_VERT</literal>
+  the layout for X=4 and Y=3 looks like:
+<programlisting>
+ +--+--+--+--+
+ | 1| 4| 7|10|
+ +--+--+--+--+
+ | 2| 5| 8|11|
+ +--+--+--+--+
+ | 3| 6| 9|12|
+ +--+--+--+--+
+</programlisting>
+	</para>
+        <para>
+         The numbers here are the workspace numbers, as for 
+         <literal>_NET_CURRENT_DESKTOP</literal>.
+        </para>
+	</sect2>
 	</sect1>
 	<sect1>
 	<title>Other Root Window Messages</title>



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