Index: metacity/ChangeLog
===================================================================
RCS file: /export/cvs/head/metacity/ChangeLog,v
retrieving revision 1.981
diff -p -u -5 -r1.981 ChangeLog
--- metacity/ChangeLog  9 Feb 2005 03:18:45 -0000       1.981
+++ metacity/ChangeLog  9 Feb 2005 11:39:36 -0000
@@ -1,5 +1,11 @@
+2005-02-09  Leena Gunda  <leena.gunda@wipro.com>
+
+       * src/constraints.c: (get_outermost_onscreen_positions),
+       (constraint_onscreen_move_func): When a11y is ON, constrain
+       any window within the strut area. Fixes bug #156699.
+
 2005-02-08  Elijah Newren  <newren@gmail.com>
 
        Avoid using CurrentTime when focusing, handle it better in case we
        miss any cases.  Fixes #166732.
 
Index: metacity/src/constraints.c
===================================================================
RCS file: /export/cvs/head/metacity/src/constraints.c,v
retrieving revision 1.21
diff -p -u -5 -r1.21 constraints.c
--- metacity/src/constraints.c	23 Feb 2004 01:48:29 -0000	1.21
+++ metacity/src/constraints.c	9 Feb 2005 11:32:21 -0000
@@ -23,10 +23,11 @@
 #include <config.h>
 #include "constraints.h"
 #include "window.h"
 #include "workspace.h"
 #include "place.h"
+#include "prefs.h"
 
 /* The way this code works was suggested by Owen Taylor.
  *
  * For any move_resize, we determine which variables are "free
  * variables" and apply constraints in terms of those. During the move
@@ -400,13 +401,16 @@ get_outermost_onscreen_positions (MetaWi
               stmp = stmp->next;
             }
           
           tmp = tmp->next;
         }
-      
-      *leftmost_x_p = *leftmost_x_p - current.width + 
-        MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
+
+      if (!meta_prefs_get_gnome_accessibility ())
+        {
+          *leftmost_x_p = *leftmost_x_p - current.width + 
+            MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
+        }
     }
   
   tmp = workspaces;
   if (rightmost_x_p)
     {
@@ -431,13 +435,16 @@ get_outermost_onscreen_positions (MetaWi
               stmp = stmp->next;
             }
           
           tmp = tmp->next;
         }
-      
-      *rightmost_x_p = *rightmost_x_p - 
-        MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
+     
+      if (!meta_prefs_get_gnome_accessibility ())
+        {
+          *rightmost_x_p = *rightmost_x_p - 
+            MIN (TITLEBAR_LENGTH_ONSCREEN, current.width);
+        }
     }
 
   tmp = workspaces;
   if (topmost_y_p)
     {
@@ -630,11 +637,15 @@ constraint_onscreen_move_func    (MetaWi
   get_outermost_onscreen_positions (window, info, orig, *x_delta, *y_delta,
                                     &leftmost_x, &rightmost_x,
                                     &topmost_y, &bottommost_y);
 
   min_delta = topmost_y - orig->y;
-  max_delta = bottommost_y - orig->y;
+
+  if (!meta_prefs_get_gnome_accessibility ())
+    max_delta = bottommost_y - orig->y;
+  else
+    max_delta = bottommost_y - orig->y - orig->height;
 
   /* Note that min delta (top left) has priority over
    * max delta (bottom right) to facilitate keeping
    * titlebar on the screen
    */
@@ -642,11 +653,15 @@ constraint_onscreen_move_func    (MetaWi
     *y_delta = max_delta;
   if (*y_delta < min_delta)
     *y_delta = min_delta;
 
   min_delta = leftmost_x - orig->x;
-  max_delta = rightmost_x - orig->x;
+
+  if (!meta_prefs_get_gnome_accessibility ())
+    max_delta = rightmost_x - orig->x;
+  else
+    max_delta = rightmost_x - orig->x - orig->width;
 
   if (*x_delta > max_delta)
     *x_delta = max_delta;
   if (*x_delta < min_delta)
     *x_delta = min_delta;
