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

Connect the two signals that affect the tiling/floating decision anyway

parent 1845d37e
No related branches found
No related tags found
No related merge requests found
...@@ -51,32 +51,36 @@ function TileList() { ...@@ -51,32 +51,36 @@ function TileList() {
} }
TileList.prototype.connectSignals = function(client) { TileList.prototype.connectSignals = function(client) {
if (client.tiling_connected == true) {
return;
}
var self = this; var self = this;
// First handle fullscreen and shade as they can change and affect the tiling or floating decision if (client.tiling_connected1 != true) {
client.fullScreenChanged.connect(function() { // First handle fullscreen and shade as they can change and affect the tiling or floating decision
if (client.fullScreen == true) { client.fullScreenChanged.connect(function() {
client.tiling_floating = true; if (client.fullScreen == true) {
client.keepAbove = true; client.tiling_floating = true;
self._onClientRemoved(client); client.keepAbove = true;
} else { self._onClientRemoved(client);
client.keepAbove = false; } else {
self._onClientAdded(client); client.keepAbove = false;
} self._onClientAdded(client);
}); }
client.shadeChanged.connect(function() { });
if (client.shade == true) { client.shadeChanged.connect(function() {
client.tiling_floating = true; if (client.shade == true) {
self._onClientRemoved(client); client.tiling_floating = true;
} else { self._onClientRemoved(client);
self.addClient(client); } else {
} self.addClient(client);
}); }
});
client.tiling_connected1 = true;
}
if (TileList._isIgnored(client)) {
return;
}
if (client.tiling_connected2 == true) {
return;
}
client.tabGroupChanged.connect(function() { client.tabGroupChanged.connect(function() {
self._onClientTabGroupChanged(client); self._onClientTabGroupChanged(client);
}); });
...@@ -125,10 +129,6 @@ TileList.prototype.connectSignals = function(client) { ...@@ -125,10 +129,6 @@ TileList.prototype.connectSignals = function(client) {
client.clientMinimized.connect(function(client) { client.clientMinimized.connect(function(client) {
try { try {
self._onClientRemoved(client); self._onClientRemoved(client);
var tile = getTile(client);
if (tile != null) {
tile.onClientMinimizedChanged(client);
}
} catch(err) { } catch(err) {
print(err, "in mimimized"); print(err, "in mimimized");
} }
...@@ -136,15 +136,11 @@ TileList.prototype.connectSignals = function(client) { ...@@ -136,15 +136,11 @@ TileList.prototype.connectSignals = function(client) {
client.clientUnminimized.connect(function(client) { client.clientUnminimized.connect(function(client) {
try { try {
self._onClientAdded(client); self._onClientAdded(client);
var tile = getTile(client);
if (tile != null) {
tile.onClientMinimizedChanged(client);
}
} catch(err) { } catch(err) {
print(err, "in Unminimized"); print(err, "in Unminimized");
} }
}); });
client.tiling_connected = true; client.tiling_connected2 = true;
}; };
/** /**
......
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