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

Telegram showing notifications and opens media on wrong monitor after display turned on #28836

Open
mtsbh opened this issue Jan 8, 2025 · 13 comments
Labels

Comments

@mtsbh
Copy link

mtsbh commented Jan 8, 2025

Steps to reproduce

  1. Having a multiple monitor setup
  2. PC is set not to sleep, but turn the displays off after 1 hour of idle time
  3. Wake up monitors and the issue is there

Expected behaviour

I'm having 3 monitor setup on W11 and my Telegram is running only on my main middle monitor and thats where I expect the notifications and the media viewer to open. Its so annoying to look on the bottom right corner on my right monitor to see the notification pop-up

Actual behaviour

Every time after monitors wake up the notification pop-ups and media viewers are opened on the most right of my monitors, which I barely use and the Telegram app is never moved or opened there.

Operating system

Win11

Version of Telegram Desktop

v5.10.1

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

@mtsbh mtsbh added the bug label Jan 8, 2025
@ilya-fedin
Copy link
Contributor

What's the first version it started to happen with?

@mtsbh
Copy link
Author

mtsbh commented Jan 8, 2025

Idk. Since my Win11 install maybe one year ago. I can't remember if I had those problems in Linux or even before with Win10

@ilya-fedin
Copy link
Contributor

does the problem stop happening if you move the window a little bit?

@mtsbh
Copy link
Author

mtsbh commented Jan 8, 2025

Nope, the problem still persists. It stop only if I restart the Telegram app or the PC.

@ilya-fedin
Copy link
Contributor

Does moving the window to other monitor and back help?

@mtsbh
Copy link
Author

mtsbh commented Jan 8, 2025

You mean when the monitor is wake up not to restart Telegram but move it to the right monitor and then the middle again and see if the notification pop up if fixed to the main monitor again? I will try that now.

@ilya-fedin
Copy link
Contributor

You mean when the monitor is wake up not to restart Telegram but move it to the right monitor and then the middle again and see if the notification pop up if fixed to the main monitor again?

Yeah

@mtsbh
Copy link
Author

mtsbh commented Jan 8, 2025

It seems that this method fix it. Couple of times moving Telegram back and forth between monitors make the notification back where it belongs. Strange turnaround but works!

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Jan 8, 2025

Strange turnaround but works!

Nothing strange, if notifications and media appear on wrong monitor, it means Qt thinks the main window on that monitor. Moving between screens forces Qt to update the state. Why it thinks so and what to do with it is a good question though... I don't see a way to fix it from tdesktop code, at least.

Are your monitors having different scaling? If you set the same scaling, does issue go away?

@mtsbh
Copy link
Author

mtsbh commented Jan 12, 2025

They use the same scaling (100%) but they have different resolutions also the left one is vertically placed. I don't know if that could be a problem.

@ilya-fedin
Copy link
Contributor

I see that Qt stops screen change checks on window move when there's a DPI change until there's actual DPI change event from the system. I thought maybe DPI change is what happens for you but the system doesn't behave like Qt thinks (doesn't send the event it expects) and screen updates stuck. But if you say all your screens have the same scaling, this couldn't be it.

@mtsbh
Copy link
Author

mtsbh commented Jan 16, 2025

Sometimes the OS thinks that the right monitor is my main. Idk why. Also, for example, when installing windows, the installation starts from my main monitor but after couple of steps ahead it changes to the right one (where I see the pop ups) and I complete the installation on the right monitor. After the installation is done the monitors are arranged as if the right one is my middle one and every time after windows installation I need to rearrange them from Display settings so that the right goes to the right side really. And still windows thinks that the one from the right is my N:1 monitor.

@ilya-fedin
Copy link
Contributor

Well, Qt gets screen from the global coordinates. And it should actualize the info on window move events, but for some reason it doesn't work in your case unless you move the window to other screen and back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants