Manager::startAllHiding: don't treat fading in notifications specially

Previously, `Window::Notifications::Default::Manager` would not start
hiding notifications that are fading in when other notifications should
hide. This would lead to some notifications never hiding, e.g., when the
cursor passes through the notification too quickly and there was not
enough time for the notification to fade in completely.

Also renamed `Widget::isShowing` -> `Widget::isFadingIn` for clarity.

Fixes #28811.
This commit is contained in:
Nikolai Nechaev 2025-01-02 17:49:58 +03:00 committed by John Preston
parent ef859d77e9
commit 7f6221b409
2 changed files with 3 additions and 9 deletions

View file

@ -188,16 +188,10 @@ void Manager::checkLastInput() {
void Manager::startAllHiding() {
if (!hasReplyingNotification()) {
int notHidingCount = 0;
for (const auto &notification : _notifications) {
if (notification->isShowing()) {
++notHidingCount;
} else {
notification->startHiding();
}
notification->startHiding();
}
notHidingCount += _queuedNotifications.size();
if (_hideAll && notHidingCount < 2) {
if (_hideAll && _queuedNotifications.size() < 2) {
_hideAll->startHiding();
}
}

View file

@ -143,7 +143,7 @@ public:
int shift,
Direction shiftDirection);
bool isShowing() const {
bool isFadingIn() const {
return _a_opacity.animating() && !_hiding;
}