fix(ags notif): fix hover and dismiss
This commit is contained in:
parent
4da8a529e0
commit
f8b0d3232e
2 changed files with 18 additions and 10 deletions
|
@ -46,15 +46,19 @@ export default ({
|
||||||
const widget = EventBox({
|
const widget = EventBox({
|
||||||
...props,
|
...props,
|
||||||
cursor: 'grab',
|
cursor: 'grab',
|
||||||
on_hover: (self) => {
|
|
||||||
if (!self.attribute.hovered) {
|
setup: (self) => {
|
||||||
self.attribute.hovered = true;
|
self
|
||||||
}
|
.on('leave-notify-event', () => {
|
||||||
},
|
if (self.attribute.hovered) {
|
||||||
on_hover_lost: (self) => {
|
self.attribute.hovered = false;
|
||||||
if (self.attribute.hovered) {
|
}
|
||||||
self.attribute.hovered = false;
|
})
|
||||||
}
|
.on('enter-notify-event', () => {
|
||||||
|
if (!self.attribute.hovered) {
|
||||||
|
self.attribute.hovered = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
attribute: {
|
attribute: {
|
||||||
|
|
|
@ -25,7 +25,11 @@ export default () => Box({
|
||||||
if (notif) {
|
if (notif) {
|
||||||
const NewNotif = Notification({
|
const NewNotif = Notification({
|
||||||
notif,
|
notif,
|
||||||
command: () => notif.dismiss(),
|
command: () => {
|
||||||
|
if (notif.popup) {
|
||||||
|
notif.dismiss();
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (NewNotif) {
|
if (NewNotif) {
|
||||||
|
|
Loading…
Reference in a new issue