mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
fix: focus lone window with move focus shortcut
Before, when no window was focused, focusing a window with keyboard shortcuts would only work if there were two or more windows visible. It would also only consider tiled windows at all. Now, any window, floating or tiled, is considered when no window was focused previously.
This commit is contained in:
parent
3d9c874439
commit
4c3b17d492
@ -458,12 +458,12 @@ export class EngineImpl implements Engine {
|
||||
public focusDir(dir: Direction): void {
|
||||
const window = this.controller.currentWindow;
|
||||
|
||||
/* if no current window, select the first tile. */
|
||||
/* if no current window, select the first window. */
|
||||
if (window === null) {
|
||||
const tiles = this.windows.visibleTiledWindowsOn(
|
||||
const tiles = this.windows.visibleWindowsOn(
|
||||
this.controller.currentSurface
|
||||
);
|
||||
if (tiles.length > 1) {
|
||||
if (tiles.length > 0) {
|
||||
this.controller.currentWindow = tiles[0];
|
||||
}
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user