From f13a8e6ab910e5788368b1d805f2b3690ecc93a3 Mon Sep 17 00:00:00 2001 From: Erwann Chenede Date: Sun, 27 Apr 2008 20:09:47 +0000 Subject: [PATCH] re-enable cascade code which was wrongly removed a year ago. Closes 2008-04-27 Erwann Chenede * src/core/place.c (meta_window_place): re-enable cascade code which was wrongly removed a year ago. Closes #529925. svn path=/trunk/; revision=3693 --- ChangeLog | 5 +++++ src/core/place.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0748c913..99c4b2910 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-27 Erwann Chenede + + * src/core/place.c (meta_window_place): re-enable cascade + code which was wrongly removed a year ago. Closes #529925. + 2008-04-22 Carlos Garnacho * src/core/compositor.c (process_property_notify, diff --git a/src/core/place.c b/src/core/place.c index c92edd166..1e5e6c150 100644 --- a/src/core/place.c +++ b/src/core/place.c @@ -41,7 +41,6 @@ typedef enum META_BOTTOM } MetaWindowDirection; -#if 0 /* never used -- remove if nobody wants it */ static gint northwestcmp (gconstpointer a, gconstpointer b) { @@ -87,9 +86,7 @@ northwestcmp (gconstpointer a, gconstpointer b) 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 @@ find_next_cascade (MetaWindow *window, *new_y = cascade_y + fgeom->top_height; } } -#endif /* 0 -- never used */ static void find_most_freespace (MetaWindow *window, @@ -875,6 +871,12 @@ meta_window_place (MetaWindow *window, } } + /* 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