fix(ags): fix latest breaking changes
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
31ef9691da
commit
5ceef68fe1
5 changed files with 21 additions and 23 deletions
|
@ -10,9 +10,6 @@ const closeWinDelay = 800;
|
|||
|
||||
// TODO: add OSD, workspace indicator / overview and current window indicator
|
||||
export default {
|
||||
notificationPopupTimeout: 5000,
|
||||
cacheNotificationActions: true,
|
||||
|
||||
onConfigParsed: () => {
|
||||
globalThis.Pointers = Pointers;
|
||||
},
|
||||
|
|
|
@ -111,14 +111,15 @@ class Pointers extends Service {
|
|||
#initAppConnection() {
|
||||
App.connect('window-toggled', () => {
|
||||
const anyVisibleAndClosable =
|
||||
(Array.from(App.windows) as Array<[string, PopupWindow]>)
|
||||
.some((w) => {
|
||||
const closable = w[1].close_on_unfocus &&
|
||||
!(w[1].close_on_unfocus === 'none' ||
|
||||
w[1].close_on_unfocus === 'stay');
|
||||
(App.windows as Array<PopupWindow>).some((w) => {
|
||||
const closable = w.close_on_unfocus &&
|
||||
!(
|
||||
w.close_on_unfocus === 'none' ||
|
||||
w.close_on_unfocus === 'stay'
|
||||
);
|
||||
|
||||
return w[1].visible && closable;
|
||||
});
|
||||
return w.visible && closable;
|
||||
});
|
||||
|
||||
if (anyVisibleAndClosable) {
|
||||
this.startProc();
|
||||
|
@ -131,15 +132,13 @@ class Pointers extends Service {
|
|||
}
|
||||
|
||||
static detectClickedOutside(clickStage: string) {
|
||||
const toClose = (
|
||||
Array.from(App.windows) as Array<[string, PopupWindow]>
|
||||
).some((w) => {
|
||||
const toClose = ((App.windows as Array<PopupWindow>)).some((w) => {
|
||||
const closable = (
|
||||
w[1].close_on_unfocus &&
|
||||
w[1].close_on_unfocus === clickStage
|
||||
w.close_on_unfocus &&
|
||||
w.close_on_unfocus === clickStage
|
||||
);
|
||||
|
||||
return w[1].visible && closable;
|
||||
return w.visible && closable;
|
||||
});
|
||||
|
||||
if (!toClose) {
|
||||
|
|
|
@ -3,11 +3,11 @@ import { PopupWindow } from 'global-types';
|
|||
|
||||
|
||||
export default () => {
|
||||
(Array.from(App.windows) as Array<[string, PopupWindow]>)
|
||||
.filter((w) =>
|
||||
w[1].attribute.close_on_unfocus &&
|
||||
w[1].attribute.close_on_unfocus !== 'stay')
|
||||
(App.windows as Array<PopupWindow>)
|
||||
.filter((w) => w &&
|
||||
w.close_on_unfocus &&
|
||||
w.close_on_unfocus !== 'stay')
|
||||
.forEach((w) => {
|
||||
App.closeWindow(w[0]);
|
||||
App.closeWindow(w.name);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -25,6 +25,10 @@ import {
|
|||
} from 'global-types';
|
||||
|
||||
|
||||
// Set Notifications settings
|
||||
Notifications.popupTimeout = 5000;
|
||||
Notifications.cacheActions = true;
|
||||
|
||||
const setTime = (time: number) => {
|
||||
return GLib.DateTime
|
||||
.new_from_unix_local(time)
|
||||
|
|
|
@ -17,8 +17,6 @@ const closeWinDelay = 800;
|
|||
|
||||
|
||||
export default {
|
||||
notificationPopupTimeout: 5000,
|
||||
cacheNotificationActions: true,
|
||||
closeWindowDelay: {
|
||||
'applauncher': closeWinDelay,
|
||||
'calendar': closeWinDelay,
|
||||
|
|
Loading…
Reference in a new issue