Block monitor window movement while changing monitors

Try to avoid any unintended window movement while transitioning between monitor
setups.
This commit is contained in:
Tor Hedin Brønner
2018-11-23 17:50:40 +01:00
parent f9e1c99368
commit 6bc1e2a490
+7 -1
View File
@@ -938,6 +938,8 @@ class Spaces extends Map {
left with heuristics.
*/
monitorsChanged() {
this._monitorsChanging = true;
if (this.monitors)
oldMonitors = this.monitors;
@@ -975,6 +977,9 @@ class Spaces extends Map {
}
});
this.spaceContainer.show();
imports.mainloop.timeout_add(
20, () => { this._monitorsChanging = false; });
};
if (this.overrideSettings.get_boolean('workspaces-only-on-primary')) {
@@ -1443,7 +1448,8 @@ class Spaces extends Map {
|| Scratch.isScratchWindow(metaWindow)
|| metaWindow.is_on_all_workspaces()
|| !metaWindow.clone
|| metaWindow.clone.visible)
|| metaWindow.clone.visible
|| this._monitorsChanging)
return;
let monitor = Main.layoutManager.monitors[index];