Tdesktop: MediaView shows on wrong monitor

Created on 31 Aug 2018  ยท  50Comments  ยท  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. You need two monitors. Enable extended desktop mode. Set display 2 as primary monitor.
  2. Disconnect monitor 2.
  3. Startup Telegram.
  4. Connect monitor 2. Windows will automatically move MainWindow to monitor 2.
  5. Click on a photo or a gif to preview.

Expected behaviour

MediaView shows on monitor 2.

Actual behaviour

MediaView shows on monitor 1.

Configuration

Operating system: Windows 10 1803

Version of Telegram Desktop: 1.3.14

Used theme: default

bug

Most helpful comment

I have same issue with Telegram Desktop 1.3.16 Alpha on Windows 10. To fix this problem u need drag telegram window to second monitor with opened image and drag it back.
Very annoying issue...

All 50 comments

I have same issue with Telegram Desktop 1.3.14 on Linux (Linux Mint 18.3)

I have same issue with Telegram Desktop 1.3.16 Alpha on Windows 10. To fix this problem u need drag telegram window to second monitor with opened image and drag it back.
Very annoying issue...

I have the same Issue with Telegram Desktop 1.4.3 and 1.4.4 Beta on Linux Mint 18.3 Cinnamon

In telegram 1.4.3 with Ubuntu 18.04.1 still appearing to another display even with dragging telegram window to display with image and dragging back

UPD I've switched primary display to another for Ubuntu (I have 3) and 3rd was chosen one and it opens media on same display now. Maybe it would help.

I still have the problem with Telegram Desktop 1.5

I have the problem now with Telegram Desktop 1.5.2 on Ubuntu 18.10, using Wayland.

I have the same issue on Windows with version 1.5.2

I am having this issue on Fedora 29, gnome desktop. Telegram version 1.5.2
Edit: This does not occur the first time I open an image, when telegram is freshly launched. Only on the second image and onward.

I am having this issue on Fedora 29, gnome desktop. Telegram version 1.5.2
Edit: This does not occur the first time I open an image, when telegram is freshly launched. Only on the second image and onward.

I can confirm this on Arch. I can also report that it does not occur with Plasma / KWin.

Same issue on Arch Linux with version 1.5.4(latest version).
As @malucious81 said, this bug appears only the second time you open an image.

same issue mint 19.1

same issue win7 x64 1.5.4

Similar issue with Windows 10, Telegram opens on the secondary not primary monitor and its awkward (alt-space, "M," arrow, mouse move) to put it back on the primary where it was during close down.

This issue was fixed for me (Ubuntu 18.04; media view window was displaying on second monitor) after v1.5.11 release. I'm not familiar with the tdesktop's codebase but this change might be the one that fixed this.

Same, Arch Linux + i3wm, Telegram Desktop 1.5.12

I still have the problem with Telegram Desktop 1.5.11 and 1.5.12 on Linux Mint 18.3 Cinnamon

The issue is resolved for me on version 1.5.11 still on Fedora 29 Workstation.

Expected behaviour: I can move preview window on any monitor I want

I am having this issue on Fedora 29, gnome desktop. Telegram version 1.5.2
Edit: This does not occur the first time I open an image, when telegram is freshly launched. Only on the second image and onward.

I can confirm this on Arch. I can also report that it does not occur with Plasma / KWin.

And now I can confirm it's fixed on Gnome, but now broken on Plasma / KWin.

@kode54 .. and that's all you need to know about UI development for Linux ๐Ÿคฃ

Has two displays, Primary left โ„–1, second right โ„–2.
Media popup opens on โ„–2 everytime.

  • Linux Mint 19.1 Tessa (based on Ubuntu 18.04) with Cinnamon _link_
  • Telegram Desktop 1.6.3-6-g9b247ce (from snapd)

What about #5615, it's same problem or not?

Has two displays, Primary left โ„–1, second right โ„–2.
Media popup opens on โ„–2 everytime.

Same thing in inverse.
Primary right, secondary left.
Media popup opens on secondary everytime.

Same issue +1

Linux Mint 19.1

Same issue
Ubuntu 18.10
Telegram 1.8.15

Same issue

Windows 10 (10.0.18362.535)

same issue on mint 19.2

same issue on linux mint 19.3 with last version of telegram desktop. Please fix this, or provide manual how to fix it.

same issue with some changes from previous

OS              Linux Mint 19.2
Kernel          5.5.2-050502-generic
Snap package    telegram-desktop 1.9.9-4-ga25792187

Two FullHD displays in horizontal, right is primary. Media popup opens on left everytime.

Linux Mint 18.3 Cinnamon
Telegram Desktop 1.9.21
Same problem

Windows 10
Telegram Desktop 2.1.6
Same problem

Same issue
Arch Linux (kernel 5.7.7-arch1-1)
Telegram Desktop 2.1.13

In my case, the problem appears only with MATE, with Lxqt everything is fine.

Same problem

ArchLinux (5.8.5-arch1-1)
Gnome 3.36.5 (Wayland)
Telegram Desktop 2.3.2

Global env:
GDK_BACKEND=x11

telegramdesktop.desktop:
Exec=env QT_QPA_PLATFORM=wayland XCURSOR_SIZE=24 telegram-desktop -- %u

Console output after displaying the image in full-screen mode:

qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

crap, missed this yesterday to wish it a happy 2-year anniversary! ๐ŸŽ‰๐ŸŽ‚

Windows 10, Telegram v2.3.1.

Some Problem here.

Telegram Desktop 2.4.6
Linux Mint 20 Cinnamon

Primary right, secondary left.
Telegram is on the primary.
Media popup opens on secondary every time and locks the telegram window.

And when I use "Move to the other monitor" in the taskbar, this setting will be ignored the next time i open the media viewer.

The Telegram main window is locked, when the media viewer is opened, so the media viewer should open on the same monitor like the telegram main window and its better to not lock the main window for better work flow.

image

System: Kernel: 5.4.0-52-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.7
wm: muffin dm: LightDM Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
Machine: Type: Desktop Mobo: MSI model: Z77A-G41 (MS-7758) v: 3.0 serial:
BIOS: American Megatrends v: 2.13 date: 03/07/2014
CPU: Topology: Quad Core model: Intel Core i5-3570K bits: 64 type: MCP arch: Ivy Bridge
rev: 9 L2 cache: 6144 KiB
flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 27201
Speed: 1600 MHz min/max: 1600/6300 MHz Core speeds (MHz): 1: 1600 2: 1600 3: 1600
4: 1600
Graphics: Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics vendor: Micro-Star MSI
driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0162
Device-2: NVIDIA GP104 [GeForce GTX 1070] vendor: ZOTAC driver: nvidia v: 450.80.02
bus ID: 01:00.0 chip ID: 10de:1b81
Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia
unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz, 1920x1080~60Hz
OpenGL: renderer: GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 450.80.02
direct render: Yes
Audio: Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20
Device-2: NVIDIA GP104 High Definition Audio vendor: ZOTAC driver: snd_hda_intel
v: kernel bus ID: 01:00.1 chip ID: 10de:10f0
Sound Server: ALSA v: k5.4.0-52-generic
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI
driver: r8169 v: kernel port: d000 bus ID: 03:00.0 chip ID: 10ec:8168
IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac:
IF-ID-1: wgpia0 state: unknown speed: N/A duplex: N/A mac: N/A
Drives: Local Storage: total: 232.89 GiB used: 37.82 GiB (16.2%)
ID-1: /dev/sda vendor: Crucial model: CT250MX500SSD1 size: 232.89 GiB speed: 3.0 Gb/s
serial:
Partition: ID-1: / size: 227.74 GiB used: 37.82 GiB (16.6%) fs: ext4 dev: /dev/sda5
Sensors: System Temperatures: cpu: 37.0 C mobo: N/A gpu: nvidia temp: 59 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Repos: No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
1: deb http: //packages.linuxmint.com ulyana main upstream import backport #id:linuxmint_main
2: deb http: //archive.ubuntu.com/ubuntu focal main restricted universe multiverse
3: deb http: //archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
4: deb http: //archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
6: deb http: //archive.canonical.com/ubuntu/ focal partner
Info: Processes: 236 Uptime: 1h 09m Memory: 15.34 GiB used: 3.06 GiB (20.0%) Init: systemd
v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client
inxi: 3.0.38

Same problem.

Telegram Desktop 2.4.7
Linux Mint 20 Cinnamon
rx5500xt with standard mesa driver. What else can I show?

Some Problem here.

Telegram Desktop 2.4.6
Linux Mint 20 Cinnamon

Primary right, secondary left.
Telegram is on the primary.
Media popup opens on secondary every time and locks the telegram window.

And when I use "Move to the other monitor" in the taskbar, this setting will be ignored the next time i open the media viewer.

The Telegram main window is locked, when the media viewer is opened, so the media viewer should open on the same monitor like the telegram main window and its better to not lock the main window for better work flow.

image

What else can I show?

I have no idea. This seems to be a Qt/Cinnamon/gfx drivers bug, since the tdesktop code just sets the same screen that main window uses.

What else can I show?

I have no idea. This seems to be a Qt/Cinnamon/gfx drivers bug, since the tdesktop code just sets the same screen that main window uses.

Ok, and now? Who should we contact? A solution would be great, because this bug is very annoying in my daily work...

And I see some people here have this problem also in Windows 10.
So not only Linux / Mint / Qt / Cinnamon Problem.

Only NVIDIA? Or AMD / Intel too?

And I see some people here have this problem also in Windows 10.

As far as I'm understanding, there mixed three issues:

  1. Qt doesn't handle the screen change when a screen is connected on Windows and Windows automatically moves the window to that screen, so that it is necessary to move window to another screen and back (there were multiple Qt updates, the last one is at 2.4.8, so maybe not an issue anymore)
  2. Wayland doesn't have a protocol to specify window position, so that media viewer is appearing on the screen compositor is chosen and not tdesktop, that's the cause on GNOME Wayland. Unfortunately, no way to fix since there's just no such protocol.
  3. Some weird issue on Cinnamon, I can't reproduce that on a VM, media viewer successfully opens on the right screen.

Who should we contact?

Qt or Cinnamon developers. I don't know on which side the bug so I don't know who you should contact.

Still having this issue 2 years later. Telegram windows desktop v2.47. Would it be possible to add something to the right click context menu and ask the user where they want the window to open?

@hanthecat this issue is about media viewer, not about context menu

Tip for those using Telegram Desktop on i3wm:

  1. Open the media. If it opens on the wrong dislpay, that window is still going to be in focus.
  2. Hit the key combination to move it to the scratchpad.
  3. Move your focus to the display you'd like it show on.
  4. Hit the key combination to bring it out of the scratchpad and it will show as a floating window on your current display.

Could it be possible to change the behavior of the media viewer to use the full window of Telegram as view space instead of the full screen?. This could solve this issue, and also it would be less invasive at any desktop interface. (I don't like to hide other windows if I'm watching a media in Telegram)

@amatas #1710

same problem

OS: Manjaro 20.2 Nibia
Kernel: x86_64 Linux 5.9.10-1-MANJARO
DE: KDE 5.76.0 / Plasma 5.20.4
WM: KWin
GTK Theme: Breath [GTK2/3]
Icon Theme: breath2

@Yakoot X11 or Wayland?

@Yakoot X11 or Wayland?

x11

@Yakoot can't reproduce, opens on the right screen in my VM with KDE Neon

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slowaways picture slowaways  ยท  3Comments

JhonSane picture JhonSane  ยท  3Comments

FunctionalHacker picture FunctionalHacker  ยท  3Comments

Yanrishatum picture Yanrishatum  ยท  3Comments

abhyrz picture abhyrz  ยท  3Comments