Index: libwnck/libwnck-2.14.1/libwnck/window.c
===================================================================
--- libwnck.orig/libwnck-2.14.1/libwnck/window.c	2006-05-25 22:57:44.000000000 +0100
+++ libwnck/libwnck-2.14.1/libwnck/window.c	2006-05-26 08:31:57.000000000 +0100
@@ -27,6 +27,7 @@
 #include <string.h>
 #include "window.h"
 #include "class-group.h"
+#include "util.h"
 #include "xutils.h"
 #include "private.h"
 #include "wnck-enum-types.h"
@@ -1521,6 +1522,43 @@
 }
 
 /**
+ * wnck_window_set_geometry:
+ * @window: a #WnckWindow
+ * @gravity: one of #WnckWindowGravity
+ * @geometry_mask: a mask of #WnckWindowMoveResizeMask
+ * @x: new X coordinate of window
+ * @y: new Y coordinate of window
+ * @width: new width of window
+ * @height: new height of window
+ *
+ * Sets the size and position of the window.
+ *
+ **/
+void
+wnck_window_set_geometry (WnckWindow               *window,
+                          WnckWindowGravity         gravity,
+                          WnckWindowMoveResizeMask  geometry_mask,
+                          int                       x,
+                          int                       y,
+                          int                       width,
+                          int                       height)
+{
+  int gravity_and_flags;
+  int source;
+
+  g_return_if_fail (WNCK_IS_WINDOW (window));
+
+  source = _wnck_get_client_type();
+  gravity_and_flags = gravity;
+  gravity_and_flags |= geometry_mask << 8;
+  gravity_and_flags |= source << 12;
+
+  _wnck_set_window_geometry (WNCK_SCREEN_XSCREEN (window->priv->screen),
+                             window->priv->xwindow,
+                             gravity_and_flags, x, y, width, height);
+}
+
+/**
  * wnck_window_is_visible_on_workspace:
  * @window: a #WnckWindow
  * @workspace: a #WnckWorkspace
Index: libwnck/libwnck-2.14.1/libwnck/window.h
===================================================================
--- libwnck.orig/libwnck-2.14.1/libwnck/window.h	2006-05-25 22:57:44.000000000 +0100
+++ libwnck/libwnck-2.14.1/libwnck/window.h	2006-05-26 08:17:45.000000000 +0100
@@ -83,6 +83,28 @@
   WNCK_WINDOW_SPLASHSCREEN  /* splash screen */
 } WnckWindowType;
 
+typedef enum
+{
+  WNCK_WINDOW_GRAVITY_EXISTING  = 0,
+  WNCK_WINDOW_GRAVITY_NORTHWEST = 1,
+  WNCK_WINDOW_GRAVITY_NORTH     = 2,
+  WNCK_WINDOW_GRAVITY_NORTHEAST = 3,
+  WNCK_WINDOW_GRAVITY_WEST      = 4,
+  WNCK_WINDOW_GRAVITY_CENTER    = 5,
+  WNCK_WINDOW_GRAVITY_EAST      = 6,
+  WNCK_WINDOW_GRAVITY_SOUTHWEST = 7,
+  WNCK_WINDOW_GRAVITY_SOUTH     = 8,
+  WNCK_WINDOW_GRAVITY_SOUTHEAST = 9
+} WnckWindowGravity;
+
+typedef enum
+{
+  WNCK_WINDOW_CHANGE_X      = 1 << 0,
+  WNCK_WINDOW_CHANGE_Y      = 1 << 1,
+  WNCK_WINDOW_CHANGE_WIDTH  = 1 << 2,
+  WNCK_WINDOW_CHANGE_HEIGHT = 1 << 3,
+} WnckWindowMoveResizeMask;
+
 #define WNCK_TYPE_WINDOW              (wnck_window_get_type ())
 #define WNCK_WINDOW(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), WNCK_TYPE_WINDOW, WnckWindow))
 #define WNCK_WINDOW_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), WNCK_TYPE_WINDOW, WnckWindowClass))
@@ -230,6 +252,13 @@
                                int        *yp,
                                int        *widthp,
                                int        *heightp);
+void wnck_window_set_geometry (WnckWindow               *window,
+                               WnckWindowGravity         gravity,
+                               WnckWindowMoveResizeMask  geometry_mask,
+                               int                       x,
+                               int                       y,
+                               int                       width,
+                               int                       height);
 
 gboolean wnck_window_is_visible_on_workspace (WnckWindow    *window,
                                               WnckWorkspace *workspace);
Index: libwnck/libwnck-2.14.1/libwnck/xutils.c
===================================================================
--- libwnck.orig/libwnck-2.14.1/libwnck/xutils.c	2006-05-25 22:57:54.000000000 +0100
+++ libwnck/libwnck-2.14.1/libwnck/xutils.c	2006-05-26 08:12:15.000000000 +0100
@@ -2232,6 +2232,36 @@
     *heightp = height;
 }
 
+void _wnck_set_window_geometry (Screen *screen,
+                                Window  xwindow,
+                                int     gravity_and_flags,
+                                int     x,
+                                int     y,
+                                int     width,
+                                int     height)
+{
+  XEvent xev;
+
+  xev.xclient.type = ClientMessage;
+  xev.xclient.serial = 0;
+  xev.xclient.send_event = True;
+  xev.xclient.display = gdk_display;
+  xev.xclient.window = xwindow;
+  xev.xclient.message_type = _wnck_atom_get ("_NET_MOVERESIZE_WINDOW");
+  xev.xclient.format = 32;
+  xev.xclient.data.l[0] = gravity_and_flags;
+  xev.xclient.data.l[1] = x;
+  xev.xclient.data.l[2] = y;
+  xev.xclient.data.l[3] = width;
+  xev.xclient.data.l[4] = height;
+
+  XSendEvent (gdk_display,
+              RootWindowOfScreen (screen),
+              False,
+              SubstructureRedirectMask | SubstructureNotifyMask,
+              &xev);
+}
+
 void
 _wnck_get_window_position (Screen *screen,
 			   Window  xwindow,
Index: libwnck/libwnck-2.14.1/libwnck/xutils.h
===================================================================
--- libwnck.orig/libwnck-2.14.1/libwnck/xutils.h	2006-05-25 22:57:54.000000000 +0100
+++ libwnck/libwnck-2.14.1/libwnck/xutils.h	2006-05-26 08:16:07.000000000 +0100
@@ -163,6 +163,13 @@
                                 int    *yp,
                                 int    *widthp,
                                 int    *heightp);
+void _wnck_set_window_geometry (Screen *screen,
+                                Window  xwindow,
+                                int     gravity_and_flags,
+                                int     x,
+                                int     y,
+                                int     width,
+                                int     height);
 
 void _wnck_get_window_position (Screen *screen,
 				Window  xwindow,
