summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2009-02-21 14:05:15 +0900
committerSam Spilsbury <smspillaz@gmail.com>2009-02-21 14:05:15 +0900
commit4e34417aa3b42bb6fb43df051f83427f7053cef1 (patch)
tree119b138f5e277d8fa745c50886400f37bd4b1f7d
parentdc0c5ea5afc541645b6ef78718f7f92053250128 (diff)
downloadtile-4e34417aa3b42bb6fb43df051f83427f7053cef1.tar.gz
tile-4e34417aa3b42bb6fb43df051f83427f7053cef1.tar.bz2
The square tiler sort of works now
-rw-r--r--tile.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/tile.cpp b/tile.cpp
index a5835e8..ddd180e 100644
--- a/tile.cpp
+++ b/tile.cpp
@@ -508,10 +508,10 @@ TileWindow::placeWin (int x,
int i_height;
/* this checks if the window isnt smaller
than minimum size it has defined */
- constrainMinMax (i_width, i_height, i_width, i_height);
+ /*constrainMinMax (i_width, i_height, i_width, i_height);
width = i_width;
- height = i_height;
+ height = i_height;*/
/* does the window need to be moved? */
if (x == window->x () && y == window->y () &&
@@ -522,11 +522,11 @@ TileWindow::placeWin (int x,
return false;
/* set previous coordinates for animation */
- tiler->previous.setGeometry (window->x (), window->y (),
- window->width (), window->height ());
+ tiler->previous.setGeometry (window->x (), window->x () + window->width (),
+ window->y (), window->y () + window->height ());
/* set future coordinates for animation */
- tiler->current.setGeometry (x, y, width, height);
+ tiler->current.setGeometry (x, x + width, y, y + height);
alreadyResized = false; /* window is not resized now */
needConfigure = true;
@@ -674,10 +674,13 @@ TileScreen::squareTile (CompWindowExtents &border,
foreach (CompWindow *w, screen->windows ())
{
TILE_WINDOW (w);
+
+ if (!tw->tiler)
+ continue;
/* Put the window at the current slot */
- tw->placeWin (currentX + border.left, currentY + border.top,
- winWidth - (border.left + border.right),
- winHeight - (border.top + border.bottom));
+ tw->placeWin (currentX, currentY,
+ winWidth,
+ winHeight);
/* If we have reached countX ... */
if (!(i % countX))
@@ -691,6 +694,8 @@ TileScreen::squareTile (CompWindowExtents &border,
/* Otherwise, add winWidth to currentX */
else
currentX += winWidth;
+
+ i++;
}
}
@@ -814,6 +819,15 @@ TileScreen::applyTiling (CompAction *action,
break;
}
+ foreach (CompWindow *w, screen->windows ())
+ {
+ TILE_WINDOW (w);
+ if (tw->tiler)
+ {
+ tw->tiler->configure (w, type);
+ }
+ }
+
return true;
}