summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2009-02-22 18:09:09 +0900
committerSam Spilsbury <smspillaz@gmail.com>2009-02-22 18:09:09 +0900
commitfa148a307c307650ce5626d602db3c54daf7fcea (patch)
treee07760069fd568b767d42c89d7430b1f8821002f
parent6417e068279c42bd61d9427da54dd83e7049e592 (diff)
downloadtile-fa148a307c307650ce5626d602db3c54daf7fcea.tar.gz
tile-fa148a307c307650ce5626d602db3c54daf7fcea.tar.bz2
Remove some dead code
-rw-r--r--tile.cpp181
1 files changed, 0 insertions, 181 deletions
diff --git a/tile.cpp b/tile.cpp
index bd0b18c..40dabd2 100644
--- a/tile.cpp
+++ b/tile.cpp
@@ -968,187 +968,6 @@ TileScreen::applyTiling (CompAction *action,
return chooseTileModeAndTile ();
}
-#if 0
-/* Applies tiling/restoring */
-static bool
-applyTiling (CompScreen *s)
-{
- CompWindow *w;
- int count = 0;
-
- TILE_SCREEN (s);
-
- if (ts->grabIndex)
- return false;
-
- for (w = s->windows; w; w = w->next)
- {
- if (isTileWindow (w))
- count++;
- }
-
- ts->oneDuration = tileGetAnimationDuration (s->display) / MAX (count, 1);
-
- if (count > 1)
- {
- memset (&border, 0, sizeof (CompWindowExtents));
- /* first get the largest border of the windows on this
- screen - some of the windows in our list might be
- maximized now and not be maximized later, so
- their border information may be inaccurate */
- for (w = s->windows; w; w = w->next)
- {
- if (w->input.left > border.left)
- border.left = w->input.left;
- if (w->input.right > border.right)
- border.right = w->input.right;
- if (w->input.top > border.top)
- border.top = w->input.top;
- if (w->input.bottom > border.bottom)
- border.bottom = w->input.bottom;
- }
-
- workArea = s->workArea;
-
- switch (ts->tileType)
- {
- case TileToggleTypeTile:
-
- break;
- case TileToggleTypeLeft:
- height = workArea.height / (count - 1);
- occupancy = tileGetTileLeftOccupancy (s->display);
- break;
- case TileToggleTypeTileVertically:
- winWidth = workArea.width / count;
- winHeight = workArea.height;
- y = workArea.y;
- break;
- case TileToggleTypeTileHorizontally:
- winWidth = workArea.width;
- winHeight = workArea.height / count;
- x = workArea.x;
- break;
- case TileToggleTypeCascade:
- delta = tileGetTileDelta (s->display);
- currentX = workArea.x;
- currentY = workArea.y;
- winHeight = workArea.height - delta * (count - 1);
- winWidth = workArea.width - delta * (count - 1);
- break;
- default:
- break;
- }
-
- for (w = s->windows; w; w = w->next)
- {
- if (!isTileWindow (w))
- continue;
-
- TILE_WINDOW (w);
-
- if (!tw->savedValid)
- saveCoords (w);
-
- switch (ts->tileType)
- {
- case TileToggleTypeTile:
- placeWin(w,
- currentX + border.left, currentY + border.top,
- winWidth - (border.left + border.right),
- winHeight - (border.top + border.bottom));
- tw->isTiled = true;
- break;
- case TileToggleTypeLeft:
- if (first)
- {
- x = workArea.x;
- y = workArea.y;
- winWidth = workArea.width * occupancy / 100;
- winHeight = workArea.height;
- first = false;
- }
- else
- {
- x = workArea.x + (workArea.width * occupancy / 100);
- y = workArea.y + (i * height);
- winWidth = (workArea.width * (100 - occupancy) / 100);
- winHeight = height;
- }
-
- placeWin(w,
- x + border.left, y + border.top,
- winWidth - (border.left + border.right),
- winHeight - (border.top + border.bottom));
- tw->isTiled = true;
- break;
- case TileToggleTypeTileVertically:
- x = workArea.x + (winWidth * i);
- placeWin(w,
- x + border.left, y + border.top,
- winWidth - (border.left + border.right),
- winHeight - (border.top + border.bottom));
- tw->isTiled = true;
- break;
- case TileToggleTypeTileHorizontally:
- y = workArea.y + (winHeight * i);
- placeWin (w, x + border.left, y + border.top,
- winWidth - (border.left + border.right),
- winHeight - (border.top + border.bottom));
- tw->isTiled = true;
- break;
- case TileToggleTypeCascade:
- placeWin (w,
- currentX + border.left, currentY + border.top,
- winWidth - (border.left + border.right),
- winHeight - (border.top + border.bottom));
- tw->isTiled = true;
- break;
- case -1:
- if (tw->isTiled)
- {
- placeWin (w,
- tw->savedCoords.x, tw->savedCoords.y,
- tw->savedCoords.width, tw->savedCoords.height);
- tw->savedValid = false;
- tw->isTiled = false;; }
- break;
- default:
- break;
- }
-
- i++;
- tw->animationNum = i;
-
- switch (ts->tileType)
- {
- case TileToggleTypeTile:
- if (!(i % countX))
- {
- currentX = workArea.x;
- currentY += winHeight;
- }
- else
- currentX += winWidth;
- break;
- case TileToggleTypeCascade:
- currentX += delta;
- currentY += delta;
- default:
- break;
- }
- }
-
- if (!ts->grabIndex)
- ts->grabIndex = pushScreenGrab (s, s->invisibleCursor, "tile");
-
- ts->msResizing = 0;
- }
-
- return true;
-}
-#endif
-
TileScreen::TileScreen (CompScreen *screen) :
PrivateHandler <TileScreen, CompScreen> (screen),
TileOptions (tileVTable->getMetadata ()),