In the QT application telegram-desktop: When it raises a small "always visible" notification window, similar to e.g. browser notifications, those small notification windows are not recognised as floating notifications by sway. Instead, they are treated like normal windows - tiling layout is adjusted to display and scale the notification window like any other normal window.
How do I help to debug this?
Is it using Wayland or X11?
I've set
QT_QPA_PLATFORMTHEME=qt5ct
QT_QPA_PLATFORM=wayland-egl
And when launching telegram-desktop, it prints
Using Wayland-EGL
Then I'm afraid we can't do anything about it. It should use system notifications via the dbus API instead. Maybe Telegram can already do that?
Interesting... so you're saying that in Wayland there is no way for an application to specify a small, floating window such that a tiling window manager can honor that?
Or, if so - what is the "proper" solution from a wayland perspective?
Or, do you mean simply that this is probably a buggy implementation from Telegram's part?
In Wayland there's no standardized way for a regular client to decide to draw a window in the corner of the screen. Clients don't know their absolute position. There are privileged protocols to do so but they shouldn't be used by regular clients like Telegram.
The proper solution is to use the dbus notification API with a notification daemon like dunst or mako. This requires Telegram to support it, if it doesn't that's a Telegram bug.
Thanks for the clarification and amazing work @emersion !
Hi. I am trying to fix the same issue. Is it possible to put telegram notification window in floating mode and just move it to the corner of the screen?
The proper solution is to use the dbus notification API with a notification daemon like dunst or mako.
Just FYI, there is a setting in TelegramDesktop now Notifications -> Use native notifications which makes telegram use mako. It seems to be working as expected.
Most helpful comment
Just FYI, there is a setting in TelegramDesktop now
Notifications->Use native notificationswhich makes telegram usemako. It seems to be working as expected.