Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libwnck/ChangeLog,v
retrieving revision 1.132
diff -u -p -r1.132 ChangeLog
--- ChangeLog	1 Aug 2002 23:53:27 -0000	1.132
+++ ChangeLog	2 Aug 2002 05:56:00 -0000
@@ -1,3 +1,16 @@
+2002-08-02  Mark McLoughlin  <mark@skynet.ie>
+
+	* libwnck/pager.c:
+	(wnck_pager_realize): use wnck_pager_set_layout_hint.
+	(wnck_pager_set_layout_hint): impl, taking into
+	accout vertical layouts.
+	(wnck_pager_set_orientation), (wnck_pager_set_n_rows):
+	use wnck_pager_set_layout_hint.
+
+	* libwnck/xutils.c: (_wnck_set_desktop_layout): set
+	whether we're using a vertical or horizontal layout.
+	Fixes #89373.
+
 2002-08-01  Mark McLoughlin  <mark@skynet.ie>
 
 	* libwnck/window.c: (update_actions): implement
Index: libwnck/pager.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/pager.c,v
retrieving revision 1.24
diff -u -p -r1.24 pager.c
--- libwnck/pager.c	2 Jun 2002 23:58:06 -0000	1.24
+++ libwnck/pager.c	2 Aug 2002 05:56:02 -0000
@@ -98,6 +98,8 @@ static void wnck_pager_connect_window   
                                           WnckWindow *window);
 static void wnck_pager_disconnect_screen (WnckPager  *pager);
 
+static void wnck_pager_set_layout_hint   (WnckPager  *pager);
+
 static void wnck_pager_clear_drag (WnckPager *pager);
 
 static GdkPixbuf* wnck_pager_get_background (WnckPager *pager,
@@ -227,11 +229,7 @@ wnck_pager_realize (GtkWidget *widget)
   widget->style = gtk_style_attach (widget->style, widget->window);
   gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
 
-  pager->priv->layout_manager_token =
-    wnck_screen_try_set_workspace_layout (pager->priv->screen,
-                                          pager->priv->layout_manager_token,
-                                          pager->priv->n_rows,
-                                          0);
+  wnck_pager_set_layout_hint (pager);
 }
 
 static void
@@ -998,6 +996,30 @@ wnck_pager_new (WnckScreen *screen)
   return GTK_WIDGET (pager);
 }
 
+static void
+wnck_pager_set_layout_hint (WnckPager *pager)
+{
+  int layout_rows;
+  int layout_cols;
+
+  if (pager->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+    {
+      layout_rows = pager->priv->n_rows;
+      layout_cols = 0;
+    }
+  else
+    {
+      layout_rows = 0;
+      layout_cols = pager->priv->n_rows;
+    }
+
+  pager->priv->layout_manager_token =
+    wnck_screen_try_set_workspace_layout (pager->priv->screen,
+                                          pager->priv->layout_manager_token,
+                                          layout_rows,
+                                          layout_cols);
+}
+
 void
 wnck_pager_set_orientation (WnckPager     *pager,
                             GtkOrientation orientation)
@@ -1009,6 +1031,8 @@ wnck_pager_set_orientation (WnckPager   
 
   pager->priv->orientation = orientation;
   gtk_widget_queue_resize (GTK_WIDGET (pager));
+
+  wnck_pager_set_layout_hint (pager);
 }
 
 void
@@ -1022,12 +1046,8 @@ wnck_pager_set_n_rows (WnckPager *pager,
 
   pager->priv->n_rows = n_rows;
   gtk_widget_queue_resize (GTK_WIDGET (pager));
-  
-  pager->priv->layout_manager_token =
-    wnck_screen_try_set_workspace_layout (pager->priv->screen,
-                                          pager->priv->layout_manager_token,
-                                          pager->priv->n_rows,
-                                          0);
+
+  wnck_pager_set_layout_hint (pager);
 }
 
 void
Index: libwnck/xutils.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/xutils.c,v
retrieving revision 1.28
diff -u -p -r1.28 xutils.c
--- libwnck/xutils.c	2 Jun 2002 15:44:24 -0000	1.28
+++ libwnck/xutils.c	2 Aug 2002 05:56:10 -0000
@@ -2121,7 +2121,15 @@ _wnck_set_desktop_layout (Screen *xscree
 {
   gulong data[3];
 
-  data[0] = _NET_WM_ORIENTATION_HORZ;
+  /* FIXME: hack, hack, hack so as not
+   * to have to add a orientation param
+   * to wnck_screen_try_set_workspace_layout.
+   *
+   * Remove this crack asap.
+   */
+  g_assert ((rows == 0) || (columns == 0));
+
+  data[0] = (columns == 0) ? _NET_WM_ORIENTATION_HORZ : _NET_WM_ORIENTATION_VERT;
   data[1] = rows;
   data[2] = columns;
   
