fix(ags): don't remove hovered notifications in popups
This commit is contained in:
parent
a3d93f5548
commit
882627cc5e
2 changed files with 15 additions and 0 deletions
|
@ -18,6 +18,7 @@ exec(`bash -c "$AGS_PATH/startup.sh"`);
|
|||
|
||||
export default {
|
||||
style: css,
|
||||
notificationPopupTimeout: 5000,
|
||||
windows: [
|
||||
Powermenu,
|
||||
Bar,
|
||||
|
|
|
@ -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}`,
|
||||
|
|
Loading…
Reference in a new issue