fix(ags): don't try to close non-window layers
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
8d1adf5ac9
commit
66a6a7a417
1 changed files with 9 additions and 4 deletions
|
@ -188,8 +188,13 @@ class Pointers extends Service {
|
||||||
getNoCloseWidgets(noCloseWidgetsNames);
|
getNoCloseWidgets(noCloseWidgetsNames);
|
||||||
|
|
||||||
const widgets = overlayLayer.filter((n) => {
|
const widgets = overlayLayer.filter((n) => {
|
||||||
const window =
|
let window = null as null | PopupWindow;
|
||||||
(App.getWindow(n.namespace) as PopupWindow);
|
|
||||||
|
if (App.windows.some((win) =>
|
||||||
|
win.name === n.namespace)) {
|
||||||
|
window = (App
|
||||||
|
.getWindow(n.namespace) as PopupWindow);
|
||||||
|
}
|
||||||
|
|
||||||
return window &&
|
return window &&
|
||||||
window.close_on_unfocus &&
|
window.close_on_unfocus &&
|
||||||
|
@ -201,7 +206,7 @@ class Pointers extends Service {
|
||||||
// Don't handle clicks when on certain widgets
|
// Don't handle clicks when on certain widgets
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
widgets?.forEach(
|
widgets.forEach(
|
||||||
(w) => {
|
(w) => {
|
||||||
if (!(pos.x > w.x && pos.x < w.x + w.w &&
|
if (!(pos.x > w.x && pos.x < w.x + w.w &&
|
||||||
pos.y > w.y && pos.y < w.y + w.h)) {
|
pos.y > w.y && pos.y < w.y + w.h)) {
|
||||||
|
|
Loading…
Reference in a new issue