2023-10-31 08:32:40 -04:00
|
|
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
2023-10-16 17:06:19 -04:00
|
|
|
|
2023-09-25 12:43:36 -04:00
|
|
|
|
2023-10-24 17:26:38 -04:00
|
|
|
export default () => {
|
2023-10-28 21:43:40 -04:00
|
|
|
Array.from(App.windows)
|
2023-12-18 23:20:32 -05:00
|
|
|
// @ts-expect-error
|
|
|
|
.filter((w) => w[1].attribute?.close_on_unfocus &&
|
|
|
|
// @ts-expect-error
|
|
|
|
w[1].attribute?.close_on_unfocus !== 'stay')
|
2023-11-21 01:29:46 -05:00
|
|
|
.forEach((w) => {
|
2023-10-28 21:43:40 -04:00
|
|
|
App.closeWindow(w[0]);
|
|
|
|
});
|
2023-09-13 19:04:23 -04:00
|
|
|
};
|