mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
fix: prevent crash with Monocle and monocleMinimizeRest when closing transient dialogs; ref #110
This commit is contained in:
parent
935a33820b
commit
49ac131044
@ -243,6 +243,7 @@ export class TilingController implements Controller {
|
|||||||
this.engine.arrange();
|
this.engine.arrange();
|
||||||
|
|
||||||
// Switch to next window if monocle with config.monocleMinimizeRest
|
// Switch to next window if monocle with config.monocleMinimizeRest
|
||||||
|
try {
|
||||||
if (!this.currentWindow && this.engine.isLayoutMonocleAndMinimizeRest()) {
|
if (!this.currentWindow && this.engine.isLayoutMonocleAndMinimizeRest()) {
|
||||||
this.engine.focusOrder(1, true);
|
this.engine.focusOrder(1, true);
|
||||||
/* HACK: force window to maximize if it isn't already
|
/* HACK: force window to maximize if it isn't already
|
||||||
@ -251,6 +252,11 @@ export class TilingController implements Controller {
|
|||||||
this.engine.focusOrder(1, true);
|
this.engine.focusOrder(1, true);
|
||||||
this.engine.focusOrder(-1, true);
|
this.engine.focusOrder(-1, true);
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
/* HACK for the HACK: transient modals cause an error with the above workaround,
|
||||||
|
* so if we catch it here and ignore it, all is well */
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public onWindowMoveStart(_window: Window): void {
|
public onWindowMoveStart(_window: Window): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user