tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Display scaling bug

Open apxapob opened this issue 1 year ago • 1 comments

Steps to reproduce

requirements: 2 monitors with different dpi and resolution.

  1. Set different scale factors on your monitors.(I have 200% on main and 125% on secondary)
  2. Open telegram window on main monitor.
  3. Turn off your main monitor
  4. Turn it on.

Result: image

Expected behaviour

I expect telegram to render correctly.

Actual behaviour

image

Operating system

Windows 11

Version of Telegram Desktop

5.3.1

Installation source

Static binary from official website

Crash ID

no

Logs

no

apxapob avatar Aug 04 '24 09:08 apxapob

Similar but different effect happens on Linux desktops with mixed DPI: When toggling off the HiDPI (scale 2.0) monitor, the TDesktop window becomes scale 1.0, then doesn't pick up the scale 2.0 when relocated onto the 2.0 display, either manually by dragging, or automatically by the output restore features of the compositor when the output is momentarily removed.

kode54 avatar Aug 09 '24 23:08 kode54

@apxapob is this still happening with 5.6?

ilya-fedin avatar Oct 05 '24 22:10 ilya-fedin

@apxapob is this still happening with 5.6?

yep still happening.

apxapob avatar Oct 06 '24 06:10 apxapob

Does it stop happening if you enable system window frame in settings?

ilya-fedin avatar Oct 06 '24 06:10 ilya-fedin

Does it stop happening if you enable system window frame in settings?

yeah, happening with system window frame enabled too

apxapob avatar Oct 06 '24 06:10 apxapob

Can you reproduce the same issue with qBittorrent?

ilya-fedin avatar Oct 06 '24 07:10 ilya-fedin

Can you reproduce the same issue with qBittorrent?

qBittorrent has similar issue. When I turn off the monitor the window goes to the second monitor and has broken layout. And when I turn on the first monitor layout is fine, but it shows everything like it has 100% scaling, not 200%. The ui becomes too small.

apxapob avatar Oct 06 '24 09:10 apxapob

Oh, so backporting Qt 6 changes is probably useless given that qBittorent which uses Qt 6 is bugged, too...

ilya-fedin avatar Oct 06 '24 09:10 ilya-fedin

Can you check which exactly Qt version qBittorent uses right now (in about dialog)?

ilya-fedin avatar Oct 06 '24 09:10 ilya-fedin

Can you check which exactly Qt version qBittorent uses right now (in about dialog)?

Qt: 6.3.0

apxapob avatar Oct 06 '24 09:10 apxapob

Qt: 6.3.0

Are you sure your qbittorrent is latest? I see Qt 6.7.3 is mentioned on their website...

ilya-fedin avatar Oct 06 '24 09:10 ilya-fedin

Qt: 6.3.0

Are you sure your qbittorrent is latest? I see Qt 6.7.3 is mentioned on their website...

on latest qbittorrent it's indeed 6.7.3

https://i.imgur.com/7uh8QPu.png

Aokromes avatar Oct 06 '24 09:10 Aokromes

i wonder whether latest qbittorrent bugs

ilya-fedin avatar Oct 06 '24 09:10 ilya-fedin

Updated qbittorrent. The same situation on Qt 6.7.3

apxapob avatar Oct 06 '24 09:10 apxapob

ok, thanks

ilya-fedin avatar Oct 06 '24 09:10 ilya-fedin

Does this happen with 5.6.1?

ilya-fedin avatar Oct 07 '24 22:10 ilya-fedin

I don't know. Where can I check that?

apxapob avatar Oct 08 '24 06:10 apxapob

I don't know. Where can I check that?

I don't quite understand the question. How did you check previously?

ilya-fedin avatar Oct 08 '24 12:10 ilya-fedin

oh sorry. I thought I need to find an app with Qt 5.6.1 In telegram 5.6.1 the bug still happens.

apxapob avatar Oct 08 '24 12:10 apxapob

What do you do to get out of this state? Does resizing window help? Does moving the window a little bit (the relevant event should be sent on mouse button release) help? Does changing Windows settings (e.g. enabling/disabling dark mode) and then moving the window a little bit help?

ilya-fedin avatar Oct 09 '24 00:10 ilya-fedin

I usually just restart telegram. Also I can fix it by changing screen scale factor. Anything else doesn't help.

apxapob avatar Oct 09 '24 06:10 apxapob

Anything else doesn't help.

None of the things I suggested to try?

ilya-fedin avatar Oct 09 '24 06:10 ilya-fedin

Yeah.

apxapob avatar Oct 09 '24 06:10 apxapob

Hm. I wonder whether the relevant message is sent only with native titlebar. Can you try moving the window with it?

An important thing is to try switch the system dark mode if just moving doesn't work as it sends the event that forces Qt to update its screen list (and then on the end of window move Qt should update window's associated screen).

ilya-fedin avatar Oct 09 '24 06:10 ilya-fedin

Tried that. Didn't help.

apxapob avatar Oct 09 '24 07:10 apxapob

Does this happen with 5.6.2?

ilya-fedin avatar Oct 14 '24 15:10 ilya-fedin

This is funny. Telegram 5.6.2 crashes when I turn the monitor on. Which is better because I don't have to shut it down by myself=)

apxapob avatar Oct 14 '24 20:10 apxapob

Can you provide crash id of the crash report (you have to enable beta installation in settings for crash reporter to appear, DON'T wait for an update)?

ilya-fedin avatar Oct 15 '24 04:10 ilya-fedin

Crash ID: 3c7ec04c-7038-4481-9c8d-1ba3b03086c3

apxapob avatar Oct 15 '24 06:10 apxapob

Can you re-test the bug when you will get 5.6.3?

ilya-fedin avatar Oct 15 '24 08:10 ilya-fedin