Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.3008
diff -u -r1.3008 ChangeLog
--- ChangeLog	2002/02/14 00:06:05	1.3008
+++ ChangeLog	2002/02/14 02:07:25
@@ -1,3 +1,10 @@
+2002-02-14  Anders Carlsson  <andersca@gnu.org>
+
+	* gdk/x11/gdkwindow-x11.c (update_pos): Implement handling all
+	window edge types.
+	(emulate_resize_drag): Call gdk_window_get_root_origin.
+	(emulate_move_drag): Likewise.
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
 	* gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
@@ -59,6 +66,7 @@
 	* tests/testtreeview.c (typesystem_recurse): Cast GType
 	to long and use %ld to fix warning. (#71318, Morten Welinder)
 
+>>>>>>> 1.3008
 Wed Feb 13 13:26:39 2002  Tim Janik  <timj@gtk.org>
 
 	* gtk/gtkmenu.c: fix figuring accel path and changing behaviour.
Index: gdk/x11/gdkwindow-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkwindow-x11.c,v
retrieving revision 1.139
diff -u -r1.139 gdkwindow-x11.c
--- gdk/x11/gdkwindow-x11.c	2001/12/15 17:17:56	1.139
+++ gdk/x11/gdkwindow-x11.c	2002/02/14 02:07:25
@@ -4210,18 +4210,65 @@
   if (is_resize)
     {
       gint w, h;
+      gint x, y;
 
+      x = moveresize_orig_x;
+      y = moveresize_orig_y;
+      
       w = moveresize_orig_width;
       h = moveresize_orig_height;
-      
+
       switch (resize_edge)
         {
+	case GDK_WINDOW_EDGE_NORTH_WEST:
+	  x += dx;
+	  y += dy;
+	  w -= dx;
+	  h -= dy;
+	  if (h < moveresize_orig_height ||
+	      w < moveresize_orig_width)
+	    return;
+	  break;
+	case GDK_WINDOW_EDGE_NORTH:
+	  y += dy;
+	  h -= dy;
+	  if (h < moveresize_orig_height)
+	    return;
+	  break;
+	case GDK_WINDOW_EDGE_NORTH_EAST:
+	  y += dy;
+	  h -= dy;
+	  w += dx;
+	  if (h < moveresize_orig_height)
+	    return;
+	  break;
+	case GDK_WINDOW_EDGE_SOUTH_WEST:
+	  h += dy;
+	  x += dx;
+	  w -= dx;
+	  if (w < moveresize_orig_width)
+	    return;
+	  break;
         case GDK_WINDOW_EDGE_SOUTH_EAST:
           w += dx;
           h += dy;
           break;
+	case GDK_WINDOW_EDGE_SOUTH:
+	  h += dy;
+	  break;
+	case GDK_WINDOW_EDGE_EAST:
+	  w += dx;
+	  break;
+	case GDK_WINDOW_EDGE_WEST:
+	  x += dx;
+	  w -= dx;
+	  if (w < moveresize_orig_width)
+	    return;
+	  break;
         }
 
+      x = MAX (x, 1);
+      y = MAX (y, 1);
       w = MAX (w, 1);
       h = MAX (h, 1);
       
@@ -4232,8 +4279,8 @@
                                      w, h,
                                      &w, &h);
         }
-      
-      gdk_window_resize (_gdk_moveresize_window, w, h);
+
+      gdk_window_move_resize (_gdk_moveresize_window, x, y, w, h);
     }
   else
     {
@@ -4429,6 +4476,9 @@
   _gdk_moveresize_window = GDK_WINDOW (g_object_ref (G_OBJECT (window)));
 
   gdk_window_get_size (window, &moveresize_orig_width, &moveresize_orig_height);
+  gdk_window_get_root_origin (_gdk_moveresize_window,
+			      &moveresize_orig_x,
+			      &moveresize_orig_y);
   
   moveresize_geom_mask = 0;
   gdk_window_get_geometry_hints (window,
@@ -4451,9 +4501,9 @@
   moveresize_y = root_y;
   _gdk_moveresize_window = GDK_WINDOW (g_object_ref (G_OBJECT (window)));
 
-  gdk_window_get_deskrelative_origin (_gdk_moveresize_window,
-                                      &moveresize_orig_x,
-                                      &moveresize_orig_y);
+  gdk_window_get_root_origin (_gdk_moveresize_window,
+			      &moveresize_orig_x,
+			      &moveresize_orig_y);
   
   create_moveresize_window (timestamp);
 }
