Skip to content

Commit

Permalink
fixed window opening on dual monitors
Browse files Browse the repository at this point in the history
Undo fix(tiling) pop-os#1171

fix(tiling): Windows launching onto window that isn't focused

Corrected random spaces in code
  • Loading branch information
LinuxHeki authored and jacobgkau committed Oct 14, 2021
1 parent e7f3024 commit 432e236
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/auto_tiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@ export class AutoTiler {
return Err('focused window is not attached');
}

return onto.workspace_id() == win.workspace_id()
return onto.meta.get_monitor() == win.meta.get_monitor() && onto.workspace_id() == win.workspace_id()
? Ok(onto)
: Err('window is not on the same workspace');
: Err('window is not on the same monitor or workspace');
}

private toggle_orientation_(ext: Ext, focused: ShellWindow): Result<void, string> {
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ export class Ext extends Ecs.System<ExtEvent> {
let actor = window.meta.get_compositor_private();
if (actor) {
if (!window.meta.minimized) {
tiler.auto_tile(this, window, true);
tiler.auto_tile(this, window, false);
}
}
}
Expand Down

0 comments on commit 432e236

Please sign in to comment.