diff options
-rw-r--r-- | tile.cpp | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -711,6 +711,23 @@ TileScreen::horizontalTile (CompWindowExtents &border, XRectangle &workArea, int count) { + int winWidth = workArea.width; + int winHeight = workArea.height / count; + int x = workArea.x; + int i = 0; + + foreach (CompWindow *w, screen->windows ()) + { + TILE_WINDOW (w); + + if (!tw->tiler) + continue; + + tw->placeWin (x, workArea.y + (i * winHeight), + winWidth, winHeight); + + i++; + } } void @@ -718,6 +735,23 @@ TileScreen::verticalTile (CompWindowExtents &border, XRectangle &workArea, int count) { + int winWidth = workArea.width / count; + int winHeight = workArea.height; + int y = workArea.y; + int i = 0; + + foreach (CompWindow *w, screen->windows ()) + { + TILE_WINDOW (w); + + if (!tw->tiler) + continue; + + tw->placeWin (workArea.x + (winWidth * i), + y, winWidth, winHeight); + + i++; + } } /* Adapated from scale.c @@ -1047,8 +1081,8 @@ TileScreen::TileScreen (CompScreen *screen) : tileInitiate (RestoreKey, Restore); tileInitiate (SquareKey, Square); tileInitiate (EvenKey, Restore); - tileInitiate (HorizontalKey, Restore); - tileInitiate (VerticalKey, Restore); + tileInitiate (HorizontalKey, Horizontal); + tileInitiate (VerticalKey, Vertical); tileInitiate (ExpandKey, Restore); tileInitiate (OrganicKey, Restore); tileInitiate (CascadeKey, Restore); |