fix(ags): don't remove hovered notifications in popups

This commit is contained in:
matt1432 2023-09-14 13:26:42 -04:00
parent a3d93f5548
commit 882627cc5e
2 changed files with 15 additions and 0 deletions

View file

@ -18,6 +18,7 @@ exec(`bash -c "$AGS_PATH/startup.sh"`);
export default {
style: css,
notificationPopupTimeout: 5000,
windows: [
Powermenu,
Bar,

View file

@ -54,6 +54,20 @@ const NotificationIcon = ({ appEntry, appIcon, image }) => {
export default ({ id, summary, body, actions, urgency, time, ...icon }) => Draggable({
maxOffset: 200,
command: () => Notifications.close(id),
properties: [['hovered', false]],
onHover: w => {
if (w._hovered)
return;
timeout(300, () => w._hovered = true);
},
onHoverLost: w => {
if (!w._hovered)
return;
w._hovered = false;
Notifications.dismiss(id);
},
child: Box({
className: `notification ${urgency}`,