From fadf527d971f8d1bd2431fc6550b30ce597fb461 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 13 Sep 2023 19:04:23 -0400 Subject: [PATCH] fix(ags): don't close notification popups with closeAll --- config/ags/config.js | 3 +-- config/ags/js/bar/clock.js | 2 +- config/ags/js/bar/notif-button.js | 2 +- config/ags/js/bar/quick-settings.js | 2 +- config/ags/js/misc/close-all.js | 6 ------ config/ags/js/misc/closer.js | 8 +++++++- 6 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 config/ags/js/misc/close-all.js diff --git a/config/ags/config.js b/config/ags/config.js index 17de460e..6407d030 100644 --- a/config/ags/config.js +++ b/config/ags/config.js @@ -3,11 +3,10 @@ import { Powermenu } from './js/powermenu.js'; import { Bar } from './js/bar/main.js'; import { NotificationCenter } from './js/notifications/center.js'; import { NotificationsPopupList } from './js/notifications/popup.js' -import { Closer } from './js/misc/closer.js'; import { Calendar } from './js/date.js'; import { QuickSettings } from './js/quick-settings/main.js'; -import { closeAll } from './js/misc/close-all.js'; +import { Closer, closeAll } from './js/misc/closer.js'; ags.App.closeAll = () => closeAll(); const scss = ags.App.configDir + '/scss/main.scss'; diff --git a/config/ags/js/bar/clock.js b/config/ags/js/bar/clock.js index 40484f40..379bfdca 100644 --- a/config/ags/js/bar/clock.js +++ b/config/ags/js/bar/clock.js @@ -3,7 +3,7 @@ const { toggleWindow, openWindow } = ags.App; const { DateTime } = imports.gi.GLib; import { EventBox } from '../misc/cursorbox.js'; -import { closeAll } from '../misc/close-all.js'; +import { closeAll } from '../misc/closer.js'; const ClockModule = ({ interval = 1000, diff --git a/config/ags/js/bar/notif-button.js b/config/ags/js/bar/notif-button.js index 3c7a191e..de3c136e 100644 --- a/config/ags/js/bar/notif-button.js +++ b/config/ags/js/bar/notif-button.js @@ -4,7 +4,7 @@ const { Notifications } = ags.Service; import { Separator } from '../misc/separator.js'; import { EventBox } from '../misc/cursorbox.js'; -import { closeAll } from '../misc/close-all.js'; +import { closeAll } from '../misc/closer.js'; export const NotifButton = EventBox({ className: 'toggle-off', diff --git a/config/ags/js/bar/quick-settings.js b/config/ags/js/bar/quick-settings.js index 95aed085..7e6b3841 100644 --- a/config/ags/js/bar/quick-settings.js +++ b/config/ags/js/bar/quick-settings.js @@ -2,7 +2,7 @@ const { Box, Label } = ags.Widget; const { toggleWindow, openWindow } = ags.App; import { EventBox } from '../misc/cursorbox.js'; -import { closeAll } from '../misc/close-all.js'; +import { closeAll } from '../misc/closer.js'; export const QsToggle = EventBox({ className: 'toggle-off', diff --git a/config/ags/js/misc/close-all.js b/config/ags/js/misc/close-all.js deleted file mode 100644 index 67df828b..00000000 --- a/config/ags/js/misc/close-all.js +++ /dev/null @@ -1,6 +0,0 @@ -export const closeAll = () => { - ags.App.windows.forEach(w => { - if (w.name != 'bar') - ags.App.closeWindow(w.name) - }); -}; diff --git a/config/ags/js/misc/closer.js b/config/ags/js/misc/closer.js index 8301eabb..c15fdee4 100644 --- a/config/ags/js/misc/closer.js +++ b/config/ags/js/misc/closer.js @@ -1,7 +1,13 @@ const { Window, EventBox } = ags.Widget; const { closeWindow } = ags.App; -import { closeAll } from './close-all.js'; +export const closeAll = () => { + ags.App.windows.forEach(w => { + if (w.name != 'bar' && + w.name != 'notifications') + ags.App.closeWindow(w.name) + }); +}; export const Closer = Window({ name: 'closer',