mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix handling of notification disappearing under cursor
Previously, notifications disappearing under cursor (e.g., because closed manually or open from another device) did not notify the manager properly, as the leaveEventHook was not triggered. This could lead to notifications staying around when not supposed to (see #28813). This commit fixes that by explicitly notifying manager when the notification widget disappears under the cursor. Fixes #28813.
This commit is contained in:
parent
12f8686326
commit
7fcd84d08e
1 changed files with 7 additions and 1 deletions
|
@ -500,7 +500,13 @@ void Widget::opacityAnimationCallback() {
|
|||
updateOpacity();
|
||||
update();
|
||||
if (!_a_opacity.animating() && _hiding) {
|
||||
manager()->removeWidget(this);
|
||||
if (underMouse()) {
|
||||
// The notification is leaving from under the cursor, but in such case leave hook is not
|
||||
// triggered automatically. But we still want the manager to start hiding notifications
|
||||
// (see #28813).
|
||||
manager()->startAllHiding();
|
||||
}
|
||||
manager()->removeWidget(this); // Deletes `this`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue