workspace: Reset source IDs to zero after removing them

There were some source IDs that were not being reset to zero when
removing the associated sources, resulting on some critical errors
being dumped when _realRecalculateWindowPositions() got called
after that point, via _delayedWindowRepositioning().
This commit is contained in:
Mario Sanchez Prada 2017-06-27 10:09:16 +01:00
parent 293d1697fe
commit 5221744d1d

View File

@ -1793,14 +1793,20 @@ const Workspace = new Lang.Class({
global.screen.disconnect(this._windowEnteredMonitorId);
global.screen.disconnect(this._windowLeftMonitorId);
if (this._repositionWindowsId > 0)
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
if (this._positionWindowsId > 0)
if (this._positionWindowsId > 0) {
Meta.later_remove(this._positionWindowsId);
this._positionWindowsId = 0;
}
if (this._actualGeometryLater > 0)
if (this._actualGeometryLater > 0) {
Meta.later_remove(this._actualGeometryLater);
this._actualGeometryLater = 0;
}
this._windows = [];
},