Skip to content
Snippets Groups Projects
Commit 88e54293 authored by Fabian Homborg's avatar Fabian Homborg
Browse files

Kill forcedFloating with fire.

This is completely unnecessary.
parent c8295301
No related branches found
No related tags found
No related merge requests found
...@@ -55,12 +55,6 @@ function Tile(firstClient, tileIndex) { ...@@ -55,12 +55,6 @@ function Tile(firstClient, tileIndex) {
* of something different to a user move or resize action. * of something different to a user move or resize action.
*/ */
this.geometryChanged = new Signal(); 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 * 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 * screen. Two parameters are passed to the handlers, the old and the new
...@@ -81,10 +75,6 @@ function Tile(firstClient, tileIndex) { ...@@ -81,10 +75,6 @@ function Tile(firstClient, tileIndex) {
* Index of this tile in the TileList to which the tile belongs. * Index of this tile in the TileList to which the tile belongs.
*/ */
this.tileIndex = tileIndex; 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. * True if this tile is currently moved by the user.
*/ */
...@@ -170,39 +160,7 @@ Tile.prototype.syncCustomProperties = function() { ...@@ -170,39 +160,7 @@ Tile.prototype.syncCustomProperties = function() {
this.clients[0].tiling_tileIndex = this.tileIndex; this.clients[0].tiling_tileIndex = this.tileIndex;
this.clients[0].syncTabGroupFor("tiling_tileIndex", true); this.clients[0].syncTabGroupFor("tiling_tileIndex", true);
this.clients[0].syncTabGroupFor("tiling_floating", true); this.clients[0].syncTabGroupFor("tiling_floating", true);
}; this.clients[0].syncTabGroupFor("fullScreen", 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);
}; };
Tile.prototype.onClientGeometryChanged = function(client) { Tile.prototype.onClientGeometryChanged = function(client) {
...@@ -231,31 +189,6 @@ Tile.prototype.onClientGeometryChanged = function(client) { ...@@ -231,31 +189,6 @@ Tile.prototype.onClientGeometryChanged = function(client) {
this.geometryChanged.emit(); 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) { Tile.prototype.onClientDesktopChanged = function(client) {
if (!client.isCurrentTab) { if (!client.isCurrentTab) {
return; return;
......
...@@ -163,21 +163,16 @@ Tiling.prototype.getTiles = function() { ...@@ -163,21 +163,16 @@ Tiling.prototype.getTiles = function() {
} }
Tiling.prototype.getAdjacentTile = function(from, direction, directOnly) { 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 // TODO
print("TODO: getAdjacentTile() (floating tile)"); print("TODO: getAdjacentTile(): Not a direct neighbour!");
} else { } else {
var index = this.tiles.indexOf(from); return this.tiles[nextIndex];
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];
}
} }
} }
......
...@@ -491,8 +491,7 @@ TilingManager.prototype._moveTile = function(direction) { ...@@ -491,8 +491,7 @@ TilingManager.prototype._moveTile = function(direction) {
return; return;
} }
var activeTile = this.tiles.getTile(client); var activeTile = this.tiles.getTile(client);
if (activeTile == null if (activeTile == null) {
|| activeTile.forcedFloating) {
print("Tile is floating"); print("Tile is floating");
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment