metacity r3693 - in trunk: . src/core



Author: tthurman
Date: Sun Apr 27 20:09:47 2008
New Revision: 3693
URL: http://svn.gnome.org/viewvc/metacity?rev=3693&view=rev

Log:
2008-04-27  Erwann Chenede  <erwann chenede sun com>

        * src/core/place.c (meta_window_place): re-enable cascade
          code which was wrongly removed a year ago.  Closes #529925.



Modified:
   trunk/ChangeLog
   trunk/src/core/place.c

Modified: trunk/src/core/place.c
==============================================================================
--- trunk/src/core/place.c	(original)
+++ trunk/src/core/place.c	Sun Apr 27 20:09:47 2008
@@ -41,7 +41,6 @@
   META_BOTTOM
 } MetaWindowDirection;
 
-#if 0 /* never used -- remove if nobody wants it */
 static gint
 northwestcmp (gconstpointer a, gconstpointer b)
 {
@@ -87,9 +86,7 @@
   else
     return 0;
 }
-#endif /* 0 -- never used */
 
-#if 0 /* never used -- remove if nobody wants it */
 static void
 find_next_cascade (MetaWindow *window,
                    MetaFrameGeometry *fgeom,
@@ -237,7 +234,6 @@
       *new_y = cascade_y + fgeom->top_height;
     }
 }
-#endif /* 0 -- never used */
 
 static void
 find_most_freespace (MetaWindow *window,
@@ -875,6 +871,12 @@
         }
     }
 
+  /* If no placement has been done, revert to cascade to avoid 
+   * fully overlapping window (e.g. starting multiple terminals)
+   * */
+  if (x == xi->rect.x && y == xi->rect.y)  
+    find_next_cascade (window, fgeom, windows, x, y, &x, &y);
+
  done_check_denied_focus:
   /* If the window is being denied focus and isn't a transient of the
    * focus window, we do NOT want it to overlap with the focus window



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