mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-06 11:56:54 +00:00
x11: fix unreactive floats on empty workspaces
Make sure space.targetX is synced, if it isn't moveDone won't get the chance to remove the background tracker, which steals all mouse clicks.
This commit is contained in:
@@ -228,7 +228,6 @@ 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 => {
|
||||
@@ -437,12 +436,12 @@ class Space extends Array {
|
||||
if (width < workArea.width) {
|
||||
this.targetX = workArea.x - this.monitor.x + Math.round((workArea.width - width)/2);
|
||||
}
|
||||
Tweener.addTween(this.cloneContainer,
|
||||
{ x: this.targetX,
|
||||
time,
|
||||
onComplete: this.moveDone.bind(this)
|
||||
});
|
||||
if (animate) {
|
||||
Tweener.addTween(this.cloneContainer,
|
||||
{ x: this.targetX,
|
||||
time: prefs.animation_time,
|
||||
onComplete: this.moveDone.bind(this)
|
||||
});
|
||||
ensureViewport(this.selectedWindow, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user