Skip to content

Commit 432e236

Browse files
LinuxHekijacobgkau
authored andcommitted
fixed window opening on dual monitors
Undo fix(tiling) pop-os#1171 fix(tiling): Windows launching onto window that isn't focused Corrected random spaces in code
1 parent e7f3024 commit 432e236

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/auto_tiler.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,9 @@ export class AutoTiler {
685685
return Err('focused window is not attached');
686686
}
687687

688-
return onto.workspace_id() == win.workspace_id()
688+
return onto.meta.get_monitor() == win.meta.get_monitor() && onto.workspace_id() == win.workspace_id()
689689
? Ok(onto)
690-
: Err('window is not on the same workspace');
690+
: Err('window is not on the same monitor or workspace');
691691
}
692692

693693
private toggle_orientation_(ext: Ext, focused: ShellWindow): Result<void, string> {

src/extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2057,7 +2057,7 @@ export class Ext extends Ecs.System<ExtEvent> {
20572057
let actor = window.meta.get_compositor_private();
20582058
if (actor) {
20592059
if (!window.meta.minimized) {
2060-
tiler.auto_tile(this, window, true);
2060+
tiler.auto_tile(this, window, false);
20612061
}
20622062
}
20632063
}

0 commit comments

Comments
 (0)