Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crossing a notification with a cursor too fast makes it freeze #28811

Open
kolayne opened this issue Dec 30, 2024 · 9 comments · May be fixed by #28815
Open

Crossing a notification with a cursor too fast makes it freeze #28811

kolayne opened this issue Dec 30, 2024 · 9 comments · May be fixed by #28815
Labels

Comments

@kolayne
Copy link

kolayne commented Dec 30, 2024

Steps to reproduce

  1. Wait for a notification
  2. Pass it quickly with the cursor (i.e., enter and exit the box)

Expected behaviour

After a timeout, the notification fades out

Actual behaviour

The notification hangs there, until cleared with another action (e.g., mouse click)

Demo:

notification_paralyzed_demo.mp4

Operating system

Arch Linux, i3 version 4.24

Version of Telegram Desktop

5.9.2

Installation source

Other (unofficial) source

Crash ID

No response

Logs

No response

@kolayne kolayne added the bug label Dec 30, 2024
@ilya-fedin
Copy link
Contributor

This looks like a bug in your WM - it doesn't seem to send focus leave event

@kolayne
Copy link
Author

kolayne commented Dec 31, 2024

This looks like a bug in your WM - it doesn't seem to send focus leave event

I'm pretty sure that's not the case, based on the output of additional debug output that I added to Telegram. You could also try reproducing it on your WM, it should work.

Anyway, I'm working on a patch for this, should be ready soon!

@kolayne
Copy link
Author

kolayne commented Dec 31, 2024

@ilya-fedin, just reproduced it on Telegram Desktop 5.9 on Windows 11

@ilya-fedin
Copy link
Contributor

hm, I asked @Aokromes to reproduce on Windows yesterday and he closed the report

@Aokromes
Copy link
Collaborator

Aokromes commented Dec 31, 2024

no i closed it before you told me to reproduce lol i never have seen myself this on windows 10.

@ilya-fedin
Copy link
Contributor

No, I sent you the link and asked "can you reproduce?"

@Aokromes Aokromes reopened this Dec 31, 2024
kolayne added a commit to kolayne/lib_ui that referenced this issue Dec 31, 2024
`Ui::Animations::Simple`'s api is incomplete. It provides the
`.animating()` method for users to tell if the animation is active, but
it is not sufficient to tell the state when the same animation is used
for both fading in and fading out.

The `.fadingOut()` method is intended to tell these transitions apart.

Intended for telegramdesktop/tdesktop#28811
kolayne added a commit to kolayne/tdesktop that referenced this issue Dec 31, 2024
Previously, `Window::Notifications::Default::internal::Widget` was using
`Ui::Animations::Basic`'s `.animating()` method to tell if a
notification was in the showing state. That is incorrect: a notification
may be in the animating state whether it is fading out (i.e., not
showing) or fading in (i.e., to be shown).

This commit fixes it by using the `Ui::Animations::Basic::fadingOut`
method for telling the notification state instead.

Fixes telegramdesktop#28811.
kolayne added a commit to kolayne/lib_ui that referenced this issue Jan 1, 2025
`Ui::Animations::Simple`'s api is incomplete. It provides the
`.animating()` method for users to tell if the animation is active, but
it is not sufficient to tell the state when the same animation is used
for both fading in and fading out.

The `.fadingOut()` method is intended to tell these transitions apart.

Intended for telegramdesktop/tdesktop#28811
kolayne added a commit to kolayne/tdesktop that referenced this issue Jan 1, 2025
Previously, `Window::Notifications::Default::internal::Widget` was using
`Ui::Animations::Basic`'s `.animating()` method to tell if a
notification was in the showing state. That is incorrect: a notification
may be in the animating state whether it is fading out (i.e., not
showing) or fading in (i.e., to be shown).

This commit fixes it by using the `Ui::Animations::Basic::fadingOut`
method for telling the notification state instead.

Fixes telegramdesktop#28811.
@kolayne
Copy link
Author

kolayne commented Jan 1, 2025

Just in case, here is a video from Windows 11, using Telegram 5.9, downloaded and installed from the official website:

2025-01-01.19-11-03.mp4

@ilya-fedin
Copy link
Contributor

Is it an x86 Windows machine? The ARM binary uses a different Qt version so it could have bugs the x86 version doesn't have and I believe @Aokromes has only x86 machine.

@kolayne
Copy link
Author

kolayne commented Jan 1, 2025

Yes, it is an x86_64 machine

kolayne added a commit to kolayne/tdesktop that referenced this issue Jan 2, 2025
…ently

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.

Fixes telegramdesktop#28811.
kolayne added a commit to kolayne/tdesktop that referenced this issue Jan 2, 2025
…ently

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 telegramdesktop#28811.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants