summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/place.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-12-22 12:17:35 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-12-22 12:17:35 +0000
commit8c7aa3a211a8ddaf9824566a4251bca630f0aa8f (patch)
treecff6e75e013ea25b04f4dc25850c18ef71decc70 /beryl-plugins/src/place.c
parent76975cfa288b576fe3dcff9153d1853f024cc9ad (diff)
downloadmarex-dev-8c7aa3a211a8ddaf9824566a4251bca630f0aa8f.tar.gz
marex-dev-8c7aa3a211a8ddaf9824566a4251bca630f0aa8f.tar.bz2
Comments
git-svn-id: file:///beryl/trunk@1997 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/place.c')
-rw-r--r--beryl-plugins/src/place.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/beryl-plugins/src/place.c b/beryl-plugins/src/place.c
index 9e674d1..0d4c178 100644
--- a/beryl-plugins/src/place.c
+++ b/beryl-plugins/src/place.c
@@ -578,7 +578,6 @@ placeIntelligent (CompWindow * w, int *x, int *y, GList * windows)
int wIter = wRect.width / 10;
int hIter = wRect.height / 10;
CompScreen *screen = w->screen;
-
get_workarea_of_current_output_device (screen, &sRect);
placeCentered (w, x, y);
@@ -588,7 +587,7 @@ placeIntelligent (CompWindow * w, int *x, int *y, GList * windows)
int xi;
int yi;
-
+ /* Recursing would be ineffecient, a goto really is the best solution */
thisisdisgusting:
for (xi = 0; xi < (sRect.width - sRect.x); xi += 10)
@@ -608,7 +607,7 @@ placeIntelligent (CompWindow * w, int *x, int *y, GList * windows)
*x = xi;
*y = yi;
return;
-
+
}
}
}
@@ -618,7 +617,7 @@ placeIntelligent (CompWindow * w, int *x, int *y, GList * windows)
placeCentered (w, x, y);
return;
}
- /* Would the window fit if it was smaller ? */
+ /* Would the window fit if it was smaller ? Reduce width of the window rectangle and go through the check loop again*/
if (tries < 10 && wRect.width > 0 && wRect.height > 0)
{
tries++;
@@ -626,6 +625,7 @@ placeIntelligent (CompWindow * w, int *x, int *y, GList * windows)
wRect.height -= hIter;
goto thisisdisgusting;
}
+ /* Fallback, we shouldn't get here? */
placeCentered (w, x, y);
}