mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
184 stars 115 forks source link

1.18: Notification Area does not display "Passive" icons #537

Closed andreymal closed 6 years ago

andreymal commented 7 years ago

Today I upgraded MATE to 1.18 on Arch Linux, and mate-panel 1.18 shows not all app icons.

For example, deadbeef audio player (gtk2 version) or KDE Connect has no tray icons for 1.18. Also Telegram icon is not visible sometimes. But other apps (Thunderbird, Psi+, Remmina etc.) still has icons in 1.18.

If I downgrade mate-panel to 1.16, then icons are returned.

If I run xfce4-panel instead of mate-panel, then icons are also visible.

lukefromdc commented 7 years ago

Was your mate-panel 1.16 built with GTK3 or GTK2? I don't have either of these apps so can't test but this could be caused by something causing these and only these icons to be allocated zero width. Other things are also possible though, so this is just something I saw before in early GTK3 development with some of the things in mate-applets.

andreymal commented 7 years ago

Was your mate-panel 1.16 built with GTK3 or GTK2?

GTK2

lukefromdc commented 7 years ago

OK, I also see that these are QT applications, and others have reported problems before with QT apps in mate-panel with GTK3. I won't be able to fix this myself, but I will now ask some questions myself for the other mate-panel devs. Could the recent status-notifier work have broken rendering of QT icons? Is this related to prior issues with QT icons we have had? Can anyone duplicate this with a GTK3 build of mate-panel 1.16? If so, none of the 1.18 changes are at fault and we may be looking at another case where code written for GTK2 used with GTK3 renders a zero-width icon.

monsta commented 7 years ago

@cwendling: please have a look at this...

monsta commented 7 years ago

Interesting, deadbeef allows you to switch between GTK+2 and 3 UI in the preferences. Both versions show tray icon with MATE 1.16 in Ubuntu 16.10. GTK+3 version is 3.20.9 there.

monsta commented 7 years ago

Now trying deadbeef in Debian Testing with MATE 1.18 and GTK+ 3.22.8. Here deadbeef is from deb-multimedia repo, and for some reason it has only GTK+3 UI available. Well, the tray icon is shown normally.

andreymal commented 7 years ago

My deadbeef has only GTK2 UI. Now I will recompile it with GTK3

monsta commented 7 years ago

Qt5 test in the same system with 1.18: installed pyqt5-examples package and ran the systray example:

$ /usr/share/doc/pyqt5-examples/examples/desktop/systray/systray.py

All good, icon is shown and can be switched on and off too.

andreymal commented 7 years ago

No, deadbeef GTK3 has no tray icon for me

andreymal commented 7 years ago

But systray.py works

But KDE Connect still has no tray icon, I don't know why :)


For example, screenshot with xfce4-panel

cwendling commented 7 years ago

@andreymal could you see what you have from notification-area in .xsession-errors, or the similar (if systemd or whatever)?

monsta commented 7 years ago

I also run GTK+2 apps which have a tray icon - Pidgin and Hexchat, and both display it fine. So it's probably not related to a specific UI toolkit...

cwendling commented 7 years ago

GTK apps using stock GTK tray icons will use the same method as they did in 1.16, that is XEMBED. Qt5 ones, Qt4 ones with sni-qt, and appindicator ones will likely use SNI now.

Maybe some configuration or build options of some of the apps here affect how they report the icons, hence the varying results.

monsta commented 7 years ago

With systemd it would be useful to run journalctl to check for any messages. Or just run the app from terminal to see all the messages right there.

andreymal commented 7 years ago

Yes, Pidgin has tray icon for me

.xsession-errors has some lines, but nothing about tray or mate-panel. stdout of deadbeef has only connecting button tray signals

Well, I'll try to reproduce this in a virtual machine

cwendling commented 7 years ago

@andreymal do you have https://github.com/vovochka404/deadbeef-statusnotifier-plugin in deadbeef?

andreymal commented 7 years ago

No

andreymal commented 7 years ago

I installed Ubuntu 17.04 with MATE 1.18 — it works :( Well, looks like my local problem now (or Arch Linux problem), so I have to close this issue until I reproduce it on other OS

P.S. Manjaro with mate-panel-gtk3 1.16 also works

andreymal commented 7 years ago

Oops, I disabled "KDE Status Notifier" plugin in deadbeef and tray icon was returned ._.

But KDE Connect still has no icon

monsta commented 7 years ago

Can you test KDE apps in Ubuntu or Manjaro or other systems you have?

cwendling commented 7 years ago

Oops, I disabled "KDE Status Notifier" plugin in deadbeef and tray icon was returned ._.

I didn't try the AUR version yet, and the proper Arch version only has 0.7.2 which doesn't seem to have that plugin.

However, it seems to be a problem on deabeef's side: https://github.com/Alexey-Yakovenko/deadbeef/issues/1608

But KDE Connect still has no icon

I can't seem to find how to make it to anything at all, so I can't really say… What do you see when running the following and starting KDE Connect? (I guess it has to be stopped completely, possibly killing kdeconnectd manually, and then restarted):

$ dbus-monitor --session --monitor interface=org.kde.StatusNotifierWatcher
andreymal commented 7 years ago

@cwendling

method call time=1490273115.630544 sender=:1.2052 -> destination=org.kde.StatusNotifierWatcher serial=53 path=/StatusNotifierWatcher; interface=org.kde.StatusNotifierWatcher; member=RegisterStatusNotifierItem
   string "org.kde.StatusNotifierItem-1894-1"
signal time=1490273115.630822 sender=:1.2033 -> destination=(null destination) serial=79 path=/StatusNotifierWatcher; interface=org.kde.StatusNotifierWatcher; member=StatusNotifierItemRegistered
   string "org.kde.StatusNotifierItem-1894-1/StatusNotifierItem"

@monsta I installed plasma-workspace and kdeconnect and ran "plasmawindowed org.kde.kdeconnect --statusnotifier" on:

But now I'm not sure if this is MATE problem or KDE5 problem, should I reopen this issue?

cwendling commented 7 years ago

OK, got it. kdeconnect not appearing for me is not a bug: it reports itself as Passive, which means that "The item doesn't convey important information to the user, it can be considered an "idle" status and is likely that visualizations will chose to hide it.". And we decide to do just that: not display it. You can change that by altering the code, and for me if force it to always be visible it shows up.

If this is really a problem, e.g. if some items are buggy and never change their state to Active when needed, we could imagine either showing everything, or add an option to choose whether to display Passive items too.

andreymal commented 7 years ago

@cwendling I'm not sure, but maybe "passive" means "display in menu"?

Like Windows:

Anyway, I think that the icons should not be completely lost, regardless of what freedesktop says. Many applications (KDE Connect, audio players, vnc clients, browsers etc.) cannot have some important information, so they are always "passive" by design. But icons show that applications are running, and allow quick access to some actions (like "Send file" in KDE Connect), so it's important for me.

cwendling commented 7 years ago

@andreymal Well, I just quoted what the specification has to say, which seemed like a good reference.

Many applications (KDE Connect, audio players, vnc clients, browsers etc.) cannot have some important information, so they are always "passive" by design.

I would have expected KDE Connect to stop advertising itself as passive when e.g. devices are detected or so, doesn't it? And wouldn't have expected e.g. audio players to be passive.

Anyway, if those report themselves as passive, it might mean 2 things, which might or might not alter our reaction to this:

  1. many apps are not really using that property correctly. That sounds odd for a KDE app, as the spec comes from there.
  2. all-purpose hosts like MATE's notification area should display passive elements too, and the spec isn't clear. That might make sense if some desktop are expecting several hosts, yet it seems fairly odd to me.

On what we can do, I'm not totally sure. Here are the options I can think of:

@monsta @XRevan86 @raveit65 what do you think?

monsta commented 7 years ago

For users it's a regression compared to 1.16 behavior. They don't know 1.18 has SNI support, they just see that some tray icon stopped working. So I'd make these "passive" icons show like before.

cwendling commented 7 years ago

@monsta OK, makes some sense I guess. Should there be a (possibly hidden) setting for that?

cwendling commented 7 years ago

@andreymal @monsta @XRevan86 @raveit65 See #558

raveit65 commented 7 years ago

/ TODO: hide "Passive" items with a setting? /

+1 Makes sense for me to have a setting which follow specifications as non default.

monsta commented 7 years ago

Maybe add some GSettings key... for people who would prefer that behavior.

monsta commented 7 years ago

For testing #558, which app in Debian/Ubuntu has these "passive" notification icons? Except for KDE apps please :smile:

cwendling commented 7 years ago

@monsta I don't know any myself. KDE Connect does for sure, but that's KDE…

raveit65 commented 7 years ago

merged https://github.com/mate-desktop/mate-panel/commit/36c54308f7b0e05f24b9b90fb2f79546608667b2

raveit65 commented 7 years ago

For the record, status icon from mate-polkit can compiled with libappindicator support and use the "Passive" state. https://github.com/mate-desktop/mate-polkit/blob/master/src/main.c#L202 After you typed the root password for an application the icon stays open until the session will closed. Which is a bit annoying, for this reason i don't use libappindicator for fedora here.

andreymal commented 6 years ago

Since version 1.2, Telegram also don't have an icon. KDE Connect also does not have an icon now. ("KDE Status Notifier" plugin in deadbeef is missing now, don't tested yet)

But now I use mate-panel 1.18.6 (compiled manually using "makepkg -s" with PKGBUILD from Arch Linux repo) with this source code:

/* TODO: hide "Passive" items with a setting? */
/*Special case mate-polkit*/
if (g_strcmp0 (v0->status, "password-dialog") != 0){
  visible = g_strcmp0 (v0->status, "Passive") != 0;
  gtk_widget_set_visible (GTK_WIDGET (v0), visible);
  }
else
gtk_widget_set_visible (GTK_WIDGET (v0), TRUE);

And this is not working.

I'll try to reproduce this on Ubuntu later. If this will reproduced, I'll have to reopen this issue

fpoto commented 6 years ago

Apparently I have got the same problem. Debian testing, Mate 1.18.0, Telegram 1.2

When I enable/disable the tray icon from the Telegram settings window, I see that the notification area expands/shrinks by few pixels in the place where the icon should be.

andreymal commented 6 years ago

It's possible to click to this one-pixel area :)

Anyway, telegram icon still works good in xfce4-panel or Ubuntu Unity 7, so it looks like mate-panel problem

fpoto commented 6 years ago

Yes, I can click it! I had tried previously without success, now I did it. Apparently in fact is just one pixel wide.

Maxxie commented 6 years ago

Same thing on debian sid with mate-panel 1.18.6-1.

andreymal commented 6 years ago

Actually KDE Connect icon works good now, so I think that someone should create new issue about Telegram. But I can't reproduce this problem on Ubuntu MATE :(

fpoto commented 6 years ago

Why was this issue closed? The problem still exists on Debian testing, Mate 1.18.0, Telegram 1.2

raveit65 commented 6 years ago

Why was this issue closed?

Simply read the comment where it was closed by reporter.....

fpoto commented 6 years ago

As I reported above, I think it should be reopened

chelobaka commented 6 years ago

Same problem (besides Telegram) with Shutter — no icon. Debian testing, Mate 1.18.

andreymal commented 6 years ago

I changed the title to avoid misunderstanding. This problem has been solved. Problem with Telegram has a different nature. See #695

monsta commented 6 years ago

But I can't reproduce this problem on Ubuntu MATE :(

Probably because SNI support is disabled there, so the tray area behaves like in 1.16.