mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-04 19:46:53 +00:00
Bugfix: Space.targetX was sometimes set to null
space.targetX = Math.round(clone.targetX) + ... resulted in null when clone.targetX was undefined. This could happend on extension startup and caused the space to be unusable. Initialize clone.targetX and remove duplicated space.targetX initialization.
This commit is contained in:
@@ -205,8 +205,6 @@ class Space extends Array {
|
||||
this.targetX = 0;
|
||||
if (oldSpace) {
|
||||
monitor = Main.layoutManager.monitors[oldSpace.monitor.index];
|
||||
this.targetX = oldSpace.targetX;
|
||||
cloneContainer.x = this.targetX;
|
||||
}
|
||||
this.setMonitor(monitor, false);
|
||||
|
||||
@@ -234,6 +232,7 @@ class Space extends Array {
|
||||
// Though, targetX shouldn't ideally be able to get into this state.
|
||||
if (oldSpace && Number.isFinite(oldSpace.targetX)) {
|
||||
this.targetX = oldSpace.targetX;
|
||||
this.cloneContainer.x = this.targetX;
|
||||
}
|
||||
this.cloneContainer.x = this.targetX;
|
||||
this.getWindows().forEach(w => {
|
||||
@@ -1469,6 +1468,7 @@ function registerWindow(metaWindow) {
|
||||
layout_manager: new WindowCloneLayout()
|
||||
});
|
||||
container.add_actor(clone);
|
||||
container.targetX = 0;
|
||||
clone.meta_window = metaWindow;
|
||||
|
||||
metaWindow.clone = container;
|
||||
|
||||
Reference in New Issue
Block a user