For a long time I have been plagued by a QubesOS window management bug and I don’t know how to fix it. I also misdiagnosed the problem in a very old post. To streamline the troubleshooting process, I will create this new post in the hope that someone knows a fix.
Every time I try to open Telegram’s media preview (the pop-up window you get when you click on a video or image), the preview shows a white screen or fragments of Telegram’s main window.
Problem 2
Sometimes the window spawns behind Telegram’s main window, which makes no sense since you want to see what you clicked on. If you toggle through the windows, you come back to the white broken screen problem (problem 1).
What I know so far
The problem has nothing to do with my multi-monitor setup, as I also tested it on my laptop screen without a second monitor attached.
1 out of 100 times the preview window opens correctly. So it can work, but only once a day with a lot of luck.
It is also not a minimal template problem, as I tested it with the latest Debian-12-XFCE template (and the default telegram-desktop package).
The problem is not new either, as I had the same problem with Qubes 4.1, as you can see from my older post.
My guess
It is not a direct Telegram issue, but a deeper QubesOS window management bug. Any ideas how to fix it?
I just wanted to add a note and tested the Flatpak version. It works!
The previewed image/video jumps up and down a bit until it finds the center, but it works! This confirms my suspicion that the QubesOS window management and the extra margins around the windows somehow break Telegram’s preview.
If I don’t follow up on this thread in the next few days, the fix is to use the Flatpak image!
Updated again, it seems to work, but when I scale the interface inside the Telegram app, the preview window is no longer centered, but more down. So the current working solution is to use the Flatpak app and not to change the interface scaling in Telegram’s settings!
Last update: I went into Telegram’s advanced settings and selected “Use system window frame”. This makes the Flatpak Telegram window a bit smaller. I scaled the interface up a bit (otherwise I cannot see anything). Now everything in the main window is the way I want it.
The problem now is that the preview window is no longer centered, but the cuts have the images at the bottom (the horizontal center is in the bottom third of the screen now). This makes sense to me, as the assumed screen might be larger to accommodate the interface scaling.
Then I noticed that there is a window expand button in the preview window at the top/right. I pressed it and got an independent window that was centered correctly! Then I clicked it again and got the old preview window back. But now it was centered correctly! So I would assume that the top/right window expansion button basically resets the broken interface scaling properties.
So what you need to do to get Telegram working nicely on your Qubes 4.2.3
Install the Flatpak application (not the telegram-desktop package)
Set the interface scaling to your liking
Check “Use system window frame” in Telegram’s advanced settings
Open the now broken preview window, expand it with the up/right key, close it again.
Enjoy Telegram!
This took me about 3 years to figure out.
To install the Flatpak in a template, run the following commands: