Re: Pending 1.2 stuff



On Fri, 2002-08-16 at 06:17, Michael Toomim wrote: 

 The catch is that the numerical workspace ordering determines the 
> correspondence between a horizontally-oriented pager and a 
> vertically-oriented pager.  We'd like (I think) the spatial 
> relationships between workspaces to be preserved as much as possible 
> between the two pager orientations.  This is important if a user uses a 
> vertical and horizontal simultaneously, or alternates between the two.
> 
> According to this reasoning, there are precisely two criteria/objectives 
> in designing a workspace numbering scheme: A) that the numbers increase 
> from 1 to N on 1D virtual desktops (easy); and B) that the horizontal 
> and vertical orientations are spatially close to each other.
> 
Ah, I didn't get it that the point is changing the orientation of the
pager. After playing a bit with my gnome panel, I think that no fixed 
vertical layout will be perfect here. Since dragging the panel from the
bottom edge to the left/right side feels like a rotation, the desktop
layout should be rotated in the same way: 

+-----------------+ 
|                 | 
4                 1 
3  <---      ---> 2 
2      \   /      3 
1       | |       4 
|       | |       | 
+-----1 2 3 4-----+ 

(though I guess that the pager doesn't get enough information to decide 
about cw vs. ccw rotation - and in fact, the order of the applets
indicates that the panel itself does a cw rotation in both cases.)

In order to allow the pager to implement rotation, we probably have to
allow all of the eight possible "linear" arrangements:

12  24  43  31  
34  13  21  42  

21  42  34  13
34  31  21  24

These can all be specified by the current horizontal/vertical
destinction plus the starting corner. So, e.g 

12
34  is horizontal, starting in NW, and

24  
13  is vertical, starting in SW.

So, the _NET_DESKTOP_LAYOUT specification would change to 

        <sect2>
        <title>_NET_DESKTOP_LAYOUT</title>
        <programlisting><![CDATA[
_NET_DESKTOP_LAYOUT, CARDINAL[4]/32,
]]>
  #define _NET_WM_ORIENTATION_HORZ 0
  #define _NET_WM_ORIENTATION_VERT 1
  
  #define _NET_WM_TOPLEFT     0
  #define _NET_WM_TOPRIGHT    1
  #define _NET_WM_BOTTOMRIGHT 2
  #define _NET_WM_BOTTOMLEFT  3
</programlisting>
        <para>
        <emphasis>This property is set by a Pager, not by the Window 
	  Manager.</emphasis>
        When setting this property, the Pager 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. The purpose of 
        this property is to allow the Window Manager to know the desktop
        layout displayed by the Pager.
        </para>
        <para>

  <literal>_NET_DESKTOP_LAYOUT</literal> describes the layout of virtual
  desktops relative to each other. More specifically, it describes the
layout
  used by the owner of the manager selection. The Window Manager may use
  this layout information or may choose to ignore it.
  The property contains four values: the layout orientation, the  
  starting corner, 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>
(integer
 value 0) the desktops are layed out in rows, with the first desktop
 in the specified corner. So for the <literal>_NET_WM_TOPLEFT</literal>
 corner and X=4 and Y=3 the layout looks like this:
<programlisting>
 +--+--+--+--+
 | 0| 1| 2| 3|
 +--+--+--+--+
 | 4| 5| 6| 7|
 +--+--+--+--+
 | 8| 9|10|11|
 +--+--+--+--+
</programlisting>
and for the <literal>_NET_WM_BOTTOMRIGHT</literal> corner, it looks like
this:
<programlisting>
 +--+--+--+--+
 |11|10| 9| 8|
 +--+--+--+--+
 | 7| 6| 5| 4|
 +--+--+--+--+
 | 3| 2| 1| 0|
 +--+--+--+--+
</programlisting>

         </para>
        <para>

  When the orientation is <literal>_NET_WM_ORIENTATION_VERT</literal>
  (integer value 1) the layout for <literal>_NET_WM_TOPLEFT</literal>
and X=4 and Y=3 looks like:

<programlisting>
 +--+--+--+--+
 | 0| 3| 6| 9|
 +--+--+--+--+
 | 1| 4| 7|10|
 +--+--+--+--+
 | 2| 5| 8|11|
 +--+--+--+--+
</programlisting>

and for <literal>_NET_WM_TOPRIGHT</literal>, it looks like:

<programlisting>
 +--+--+--+--+
 | 9| 6| 3| 0|
 +--+--+--+--+
 |10| 7| 4| 1|
 +--+--+--+--+
 |11| 8| 5| 2|
 +--+--+--+--+
</programlisting>
       </para>
        <para>
         The numbers here are the desktop numbers, as for 
         <literal>_NET_CURRENT_DESKTOP</literal>.
        </para>
       </sect2>

 

Matthias





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