GithubHelp home page GithubHelp logo

Comments (17)

headius avatar headius commented on June 10, 2024

I updated this description because the problem is trickier than I thought.

  • I do not have any unread messages that I know of.
  • The "Draw attention" setting is turned off.

If I Alt+Tab into the app and then immediately leave it, the notification is shown each time.

If I first interact with the app, sometimes the notification does not show up.

Notably, this only seems to happen on my system (today) when I Alt+Tab from Telegram into the IntelliJ Idea application.

A short video is provided.

telegram_notification.mp4

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

It's a GNOME bug. It should blink the icon on the taskbar.

from tdesktop.

headius avatar headius commented on June 10, 2024

That may be but why does it still do this even with the "Draw attention" setting turned off? Do you have a reference to a GNOME bug I can +1 with my additional information?

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Do you have a reference to a GNOME bug I can +1 with my additional information?

I have no idea whether it was reported to GNOME at all. People regularly create issues about that window on tdesktop bugtracker and GNOME is the only DE reacting in such way to QWindow::alert(), all other DEs and OSes blink Telegram icon in taskbar.

That may be but why does it still do this even with the "Draw attention" setting turned off?

Well, it doesn't, here's the only usage of QWindow::alert in tdesktop codebase:

handle->alert(kSystemAlertDuration);

As you can see, it's called only on new notification and only when the setting is enabled.

from tdesktop.

headius avatar headius commented on June 10, 2024

But as I pointed out, it is showing up with the setting turned off.

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

But as I pointed out, it is showing up with the setting turned off.

Apparently GNOME expanded its misbehavior to other calls? I don't see the blinking when notification arrives on KDE with the setting disabled what means QWindow::alert is not called and the setting is respected as intended. As this is the only call of QWindow::alert, it can't be called on Alt-Tabbing at all and indeed there's no blinking when alt-tabbing on KDE.

from tdesktop.

headius avatar headius commented on June 10, 2024

Ok, thank you for the information. I can accept that tdesktop may not be the root cause, but I'm not sure how to continue investigating the issue. Normal notifications work fine, and I have disabled the "Draw attention" notification, but still get this when tabbing to some other applications. Perhaps I can try to debug tdesktop later and confirm it is not re-sending the notification.

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

I'm not sure as well. I guess some X11 socket sniffer/debugger is needed to see what is called when GNOME creates such a notification, but I don't know one.

from tdesktop.

headius avatar headius commented on June 10, 2024

Appears to be a similar issue: qTox/qTox#4979

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Apparently only GNOME/mutter developers know how to debug this as they deal with X11 daily and know when they create such a notification (Telegram doesn't create notifications with "is ready" content, it's completely on GNOME side).

from tdesktop.

headius avatar headius commented on June 10, 2024

Ok, thanks. I will try to follow this up on the GNOME side.

Another related issue that was closed after the issue seemed to disappear for the reporter: #10495

from tdesktop.

headius avatar headius commented on June 10, 2024

A GNOME extension to get rid of these notifications (yuck): https://github.com/nunofarruca/WindowIsReady_Remover

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Another related issue that was closed after the issue seemed to disappear for the reporter: #10495

Well, you can find a lot of issues about that weird GNOME behavior if you dig deeper, this is something people create duplicates once in a week (+/-)

from tdesktop.

headius avatar headius commented on June 10, 2024

Last comment I'll do here... this seems to be the root issue and there's several extensions to change the behavior, but it appears to be intentional and just working weirdly for some applications:

https://gitlab.gnome.org/GNOME/mutter/-/issues/673

I will proceed from here by offering my perspective on the GNOME issue and probably hacking around the behavior.

Thanks for the helpful input!

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

Oh, focus stealing prevention could be the cause, yeah. Qt has a very bugged window focus behavior on X11 (this even prevents diacritic characters from entering on some WMs: #1041) and has almost no support for the startup notification spec. KDE just ignores the prevented focus requests, without any notification.

from tdesktop.

headius avatar headius commented on June 10, 2024

KDE just ignores the prevented focus requests, without any notification.

I just made a comment requesting that behavior on GNOME, since I honestly do not care if some window tried to grab focus without a normal notification. If some window needs my attention, they can send a normal notification!

I also made a plea for this to be fixed, since downstream developers like you should not have to deal with this. Cheers!

from tdesktop.

ilya-fedin avatar ilya-fedin commented on June 10, 2024

An interesting thing is that even after disabling focus stealing prevention in KDE, Telegram window doesn't focuses itself back on alt-tab as I would expect in case of focus stealing prevention being the cause. Maybe something is missing in the reproduction steps, like the window should have some view open, some custom settings or something else?

Or maybe that's even some result of Qt & GNOME bad interability...

from tdesktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.