diff --git a/contents/code/tile.js b/contents/code/tile.js index f3e1fa21bad172858dcf88f17b65b7a4b85e6eb1..37b07c232f037679bf969c923155d7e0a19cb583 100644 --- a/contents/code/tile.js +++ b/contents/code/tile.js @@ -55,12 +55,6 @@ function Tile(firstClient, tileIndex) { * of something different to a user move or resize action. */ this.geometryChanged = new Signal(); - /** - * Signal which is triggered whenever the tile forced floating state - * changes. Two parameters are passed to the handlers, the old and the new - * forced floating state. - */ - this.forcedFloatingChanged = new Signal(); /** * Signal which is triggered whenever the tile is moved to a different * screen. Two parameters are passed to the handlers, the old and the new @@ -81,10 +75,6 @@ function Tile(firstClient, tileIndex) { * Index of this tile in the TileList to which the tile belongs. */ this.tileIndex = tileIndex; - /** - * True if this tile has to be floating because of client properties. - */ - this.forcedFloating = this._computeForcedFloating(); /** * True if this tile is currently moved by the user. */ @@ -170,39 +160,7 @@ Tile.prototype.syncCustomProperties = function() { this.clients[0].tiling_tileIndex = this.tileIndex; this.clients[0].syncTabGroupFor("tiling_tileIndex", true); this.clients[0].syncTabGroupFor("tiling_floating", true); -}; - -Tile.prototype._computeForcedFloating = function() { - var forcedFloating = false; - this.clients.forEach(function(client) { - if (client.shade || client.minimized || client.keepAbove - || client.fullScreen || !client.resizeable) { - forcedFloating = true; - } - }); - return forcedFloating; -}; - -Tile.prototype._recomputeForcedFloating = function(client) { - var forcedFloating = false; - if (client.shade || client.minimized || client.keepAbove - || client.fullScreen || !client.resizeable) { - forcedFloating = true; - } - return forcedFloating; -} - -Tile.prototype._updateForcedFloating = function() { - var forcedFloating = this._computeForcedFloating(); - if (forcedFloating == this.forcedFloating) { - return; - } - this.forcedFloating = forcedFloating; - this.forcedFloatingChanged.emit(!forcedFloating, forcedFloating); -}; - -Tile.prototype.onClientShadeChanged = function(client) { - this._recomputeForcedFloating(client); + this.clients[0].syncTabGroupFor("fullScreen", true); }; Tile.prototype.onClientGeometryChanged = function(client) { @@ -231,31 +189,6 @@ Tile.prototype.onClientGeometryChanged = function(client) { this.geometryChanged.emit(); }; -/* -Tile.prototype.onClientKeepAboveChanged = function(client) { - this._recomputeForcedFloating(client); -}; - -Tile.prototype.onClientKeepBelowChanged = function(client) { - // TODO: Only floating clients are not below all others -}; - -Tile.prototype.onClientFullScreenChanged = function(client) { - // Let fullscreen windows stay _above_ others - client.keepAbove = client.fullScreen; - client.keepBelow = !client.fullScreen; - this._recomputeForcedFloating(client); -}; -*/ - -Tile.prototype.onClientMinimizedChanged = function(client) { - this._recomputeForcedFloating(client); -}; - -Tile.prototype.onClientMaximizedStateChanged = function(client) { - // TODO: Make tiles floating as soon as the user maximizes them -}; - Tile.prototype.onClientDesktopChanged = function(client) { if (!client.isCurrentTab) { return; diff --git a/contents/code/tiling.js b/contents/code/tiling.js index b3faa1b932f2082e3b9feb16164f3a78fa582938..0558ed911856545f14ddd9bfede2a0094f5a0936 100644 --- a/contents/code/tiling.js +++ b/contents/code/tiling.js @@ -163,21 +163,16 @@ Tiling.prototype.getTiles = function() { } Tiling.prototype.getAdjacentTile = function(from, direction, directOnly) { - if (from.forcedFloating) { + var index = this.tiles.indexOf(from); + var geometry = this.layout.tiles[index]; + var nextIndex = geometry.neighbours[direction]; + if (!geometry.hasDirectNeighbour && !directOnly) { + // This is not a direct neighbour (wrap-around situation), so cycle + // through the floating windows first // TODO - print("TODO: getAdjacentTile() (floating tile)"); + print("TODO: getAdjacentTile(): Not a direct neighbour!"); } else { - var index = this.tiles.indexOf(from); - var geometry = this.layout.tiles[index]; - var nextIndex = geometry.neighbours[direction]; - if (!geometry.hasDirectNeighbour && !directOnly) { - // This is not a direct neighbour (wrap-around situation), so cycle - // through the floating windows first - // TODO - print("TODO: getAdjacentTile(): Not a direct neighbour!"); - } else { - return this.tiles[nextIndex]; - } + return this.tiles[nextIndex]; } } diff --git a/contents/code/tilingmanager.js b/contents/code/tilingmanager.js index 342667bec263eabbeb5f0b1ed4aeca91cf085694..69a395243b85b2a8ead50473bb9a804ef0da2d6a 100644 --- a/contents/code/tilingmanager.js +++ b/contents/code/tilingmanager.js @@ -491,8 +491,7 @@ TilingManager.prototype._moveTile = function(direction) { return; } var activeTile = this.tiles.getTile(client); - if (activeTile == null - || activeTile.forcedFloating) { + if (activeTile == null) { print("Tile is floating"); return; }