mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-04 19:46:53 +00:00
Don't check for pointer warping if we haven't changed monitors
This seems to make `switchWorkspace` animation a bit smoother.
This commit is contained in:
+2
-1
@@ -341,7 +341,8 @@ var PreviewedWindowNavigator = new Lang.Class({
|
||||
this.space.selectedWindow = from[this._startIndex];
|
||||
}
|
||||
|
||||
this.space.setMonitor(this.monitor, true);
|
||||
if (this.monitor !== this.space.monitor)
|
||||
this.space.setMonitor(this.monitor, true);
|
||||
|
||||
if (this.space === from && force) {
|
||||
// We can't activate an already active workspace
|
||||
|
||||
@@ -584,10 +584,15 @@ function enable() {
|
||||
(screen, fromIndex, toIndex) => {
|
||||
let to = screen.get_workspace_by_index(toIndex);
|
||||
let from = screen.get_workspace_by_index(fromIndex);
|
||||
Navigator.switchWorkspace(to, from);
|
||||
let toSpace = spaces.spaceOf(to);
|
||||
spaces.monitors.set(toSpace.monitor, toSpace);
|
||||
|
||||
Navigator.switchWorkspace(to, from);
|
||||
|
||||
let fromSpace = spaces.spaceOf(from);
|
||||
if (toSpace.monitor === fromSpace.monitor)
|
||||
return;
|
||||
|
||||
toSpace.monitor.clickOverlay.deactivate();
|
||||
|
||||
let display = Gdk.Display.get_default();
|
||||
|
||||
Reference in New Issue
Block a user