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

Connect to client.windowClosed instead of workspace.clientRemoved

This is called earlier, so we resize before FFM picks a new client.
parent 24cb528d
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,10 @@ function TileList() {
this.tileRemoved = new Signal();
// We connect to the global workspace callbacks which are triggered when
// clients are added/removed in order to be able to keep track of the
// new/deleted tiles
// clients are added in order to be able to keep track of the
// new tiles
// Do not connect to clientRemoved as that is called after FFM selects a new active client
// Instead, connect to client.windowClosed
var self = this;
workspace.clientAdded.connect(function(client) {
// Don't connect signal if the client is ignored
......@@ -57,9 +59,6 @@ function TileList() {
self._onClientAdded(client);
});
});
workspace.clientRemoved.connect(function(client) {
self._onClientRemoved(client);
});
}
TileList.prototype.connectSignals = function(client) {
......@@ -110,6 +109,9 @@ TileList.prototype.connectSignals = function(client) {
tile.onClientGeometryChanged(client);
}
});
client.windowClosed.connect(function(cl, deleted) {
self._onClientRemoved(client);
});
client.clientStartUserMovedResized.connect(function() {
var tile = getTile(client);
if (tile != null) {
......
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