Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the new XdgIconLoaderEngine, Qt4 status notifier items have no icon #1081

Closed
paulolieuthier opened this issue Jun 28, 2016 · 43 comments
Closed

Comments

@paulolieuthier
Copy link
Contributor

sni-qt turns Qt4's QSystemTray items into StatusNotiferItems. After the new XdgIconLoaderEngine addition to our Qt plugin (lxqt/lxqt-qtplugin#10), those icons are no longer visible.

This is what happens (AFAIK):

  • lxqt-panel asks the application for a icon name, and then asks QIcon for that icon (source).
  • QIcon creates the icon through our engine (source).
  • XdgIconLoaderEngine can't find sni-qt powered icons, because those are in private, custom folders.
  • Somehow the QIcon instance created is valid (source) and lxqt-panel won't search for the icons in the custom theme folders because it thinks the icons were found in the system theme.

This needs to be fixed in the current milestone.

@paulolieuthier
Copy link
Contributor Author

The weird thing is that I (still) don't see any difference between XdgIconLoaderEngine and QIconLoaderEngine.

@tsujan
Copy link
Member

tsujan commented Jun 28, 2016

If that's the case, it should be fixed before the next release, IMHO. Sorry that I can't help (I didn't have time to try XdgIconLoaderEngine and still use my old trick lxqt/lxqt-qtplugin#9). I may be totally lost asking this but how could a Qt5 icon loader affect Qt4 apps? Here, without XdgIconLoaderEngine, I see Skype's icon among status notifier items.

@paulolieuthier
Copy link
Contributor Author

Well, that's actually a good question. I think that's because lxqt-panel is the one using XdgIconLoaderEngine, and the Qt4 apps are using the StatusNotifierItem protocol.

@paulolieuthier
Copy link
Contributor Author

The way I see it, the problem is not about Qt4, or the SNI protocol. It's about the icon loader engine stating that it found icons that it didn't find.

@luis-pereira
Copy link
Member

@paulolieuthier Can you give me an example ?

@paulolieuthier
Copy link
Contributor Author

KeePassX and MEGASync.

@luis-pereira
Copy link
Member

KeePassX is working for me
screen-2016-06-28-19-54-22

@stefonarch
Copy link
Member

stefonarch commented Jun 28, 2016

Keepassx works too here, but appset-qt is not visible, was always wondering why. No other qt4 stuff to test with.
EDIT: qstardict works, qt-recordmydesktop too.

@palinek
Copy link
Contributor

palinek commented Jun 28, 2016

I'd would like to sort this out, but both megasync & keepasx are working here...

@stefonarch
Copy link
Member

stefonarch commented Jun 28, 2016

I'm still somewhat confused about the differences between tray icons and status-notifier icons, is this issue about both? Because keepassx, recordmydesktop and qstardict do not notify anything and are in the systray.

@luis-pereira
Copy link
Member

I'm in the same situation as @palinek. keeppassx, megasync, appset-qt and skype work Ok im my system.
screen-2016-06-28-21-11-54

@stefonarch
Copy link
Member

stefonarch commented Jun 28, 2016

Skype always worked, megasyncjust installed too. So the only one for me is appset-qt which is invisible.

@paulolieuthier
Copy link
Contributor Author

paulolieuthier commented Jun 28, 2016

Are you all using the lastest version of Qt, as in Arch? It's very weird that I'm the only one seeing it. It works for me only when I disable our custom icon loader engine in lxqt-qtplugin.

@luis-pereira
Copy link
Member

@paulolieuthier I'm running Arch qt5-base 5.6.1-2

@pmattern
Copy link
Contributor

@luis-pereira
Some strange findings with QupZilla's UI here are suggesting this could be related to Qt 5.7.

@stefonarch
Copy link
Member

stefonarch commented Jun 29, 2016

I'm running latest arch + lxqt stuff. Clearly I remember that when I installed appset-qt June 2 the icon in tray was working and stopped after, probably June 7, that was still with qt5.6; looking at pacman's log this would not be related to qtplugin, at least not directly

[2016-05-01 07:54] upgraded lxqt-qtplugin-git (0.10.0.1.g2b494a5-1 -> 0.10.0.5.g4a3d790-1)
[2016-05-09 09:51] reinstalled lxqt-qtplugin-git (0.10.0.5.g4a3d790-1)
[2016-05-21 12:51] upgraded lxqt-qtplugin-git (0.10.0.5.g4a3d790-1 -> 0.10.0.7.g3ad671e-1)

[2016-06-07 19:14] reinstalled lxqt-qtplugin-git (0.10.0.7.g3ad671e-1)
[2016-06-07 18:50] upgraded liblxqt-git (0.10.0.32.gf2ea70d-1 -> 0.10.0.44.g679673b-1)
[2016-06-07 18:51] upgraded libqtxdg-git (1.3.0.33.g2a38336-1 -> 1.3.0.39.gb847928-1)
[2016-06-07 18:51] upgraded lxqt-common-git (0.10.0.25.gfd6256f-1 -> 0.10.0.30.g7cf4576-1)

@luis-pereira
Copy link
Member

@paulolieuthier Just updated to Qt 5.7.0 on Arch. Now I'm able to reproduce it.

@luis-pereira
Copy link
Member

Can we close this ? After lxqt/lxqt-qtplugin@411f696 everything works fine to me.

@stefonarch
Copy link
Member

stefonarch commented Jul 10, 2016

The only program which wasn't displayed here correctly was appset-qt, I notice now that it works even before upgrading lxqt-qtplugin-git (0.10.0.7.g3ad671e-1 -> 0.10.0.8.g411f696-1) which makes me think that this is not related to qtplugin.
So yes, for me everything works fine.

EDIT: nope, after upgrading qt-plugin appset-qt is not displayed and main window is only displayed after doing appset-qt-lauch.sh and appset-qt but no tray.
Object::connect: No such slot MainWindow::refreshCom()

I do a full upgrade of everything now.

@paulolieuthier
Copy link
Contributor Author

Running lastest Arch, lxqt-panel and lxqt-qtplugin. Qt4 (sni-qt) apps are still icon-less.

@stefonarch
Copy link
Member

After full upgrade appset-qt has still problems, but I think that it's fault.
skype, megasync, qt-recordmydesktop icons are all working.

@luis-pereira
Copy link
Member

I'm running:

  • Arch with Qt 5.7.0
  • lxqt-qtplugin master branch

Not running:

  • sni-qt

Resulting in:
screen-2016-07-12-11-48-59

@paulolieuthier
Copy link
Contributor Author

Of course it works if I unninstall sni-qt, but then Qt4 apps will appear in the old system tray, which is not what we want. If I checkout lxqt/lxqt-qtplugin@4a3d790 (the commit before the commit that introduces the new icon loader engine), it works perfectly.

@luis-pereira does it work for you with sni-qt installed?

@stefonarch
Copy link
Member

I missed something, I was never running sni-qt, as it's dependency was optional. Running it I see same problems.

@paulolieuthier
Copy link
Contributor Author

paulolieuthier commented Jul 21, 2016

After another update, transmission-qt, which is Qt5-based (no sni-qt), is iconless as well:

screenshot

@luis-pereira
Copy link
Member

@paulolieuthier Can you pls test with the libqtxdg backport branch ?
I get this:
screen-2016-07-30-01-56-01
Although something strange happens with the Breeze icon theme.

p.s. Long delay. Real life gets in the way.

@paulolieuthier
Copy link
Contributor Author

Transmission is back, but the sni-qt apps are still not, unfortunately:

screenshot_20160729_234922

@tsujan
Copy link
Member

tsujan commented Jul 30, 2016

After upgrading LXQt last week, I forgot to say that all sni-qt apps are OK here.

@luis-pereira
Copy link
Member

Actually I didn't debug the statusnotifier thing, yet.

@tsujan
Copy link
Member

tsujan commented Jul 30, 2016

Is it possible that this difference in results is due to the icon theme? On Debian, I don't have breeze and everything is OK. On Manjaro, when breeze is activated, I see no problem but there I have only one sni-qt app.

@paulolieuthier
Copy link
Contributor Author

I had already tried with other icon themes, same thing.

@paulolieuthier
Copy link
Contributor Author

paulolieuthier commented Jul 30, 2016

@luis-pereira: on top of your branch, the following patch is a workaround to the bug:

diff --git a/plugin-statusnotifier/statusnotifierbutton.cpp b/plugin-statusnotifier/statusnotifierbutton.cpp
index 0aa68c4..adc87a6 100644
--- a/plugin-statusnotifier/statusnotifierbutton.cpp
+++ b/plugin-statusnotifier/statusnotifierbutton.cpp
@@ -136,9 +136,8 @@ void StatusNotifierButton::refetchIcon(Status status)
         QIcon nextIcon;
         if (!iconName.isEmpty())
         {
-            if (QIcon::hasThemeIcon(iconName))
-                nextIcon = QIcon::fromTheme(iconName);
-            else
+            nextIcon = QIcon::fromTheme(iconName);
+            if (nextIcon.isNull())
             {
                 QDir themeDir(mThemePath);
                 if (themeDir.exists())

The thing is that QIcon::hasThemeIcon is always returning true with our icon engine.

@luis-pereira
Copy link
Member

@paulolieuthier Thanks for the great clue. When real life gets a little bit out of the way (begining of next week) it will be much faster.

@paulolieuthier
Copy link
Contributor Author

Although lxqt/libqtxdg#99 fixes the issue with the statusnotifier icons, lxqt/libqtxdg#97 (the backport branch) is still needed for other icons issues, like with pcmanfm-qt:

screenshot_20160730_131040

@luis-pereira
Copy link
Member

@paulolieuthier Sure. But this particular issue is about the Status Notifier.
I made the patch from master because they are independent from each other. Both should make it to master if we found they are reliable.

@paulolieuthier
Copy link
Contributor Author

Yeah, sure. I'm just keeping record of it.

luis-pereira added a commit to lxqt/libqtxdg that referenced this issue Aug 5, 2016
@tsujan
Copy link
Member

tsujan commented Aug 7, 2016

It's my turn to report a similar problem ;)
On Debian, status notifier icons were (and are) all right. But, on a newly installed Manjaro, Pidgin and Skype don't have a tray icon, while I have sni-qt, lib32-sni-qt and all libappindicators here. Both Pidgin and Skype do have tray icon under KDE.

Edit: I was wrong about Pidgin but not about Skype. Here Skype has a tray icon when run under KDE but not under LXQt.

@paulolieuthier
Copy link
Contributor Author

@tsujan Skype does not support the Status Notifier specification, so it should appear in the old system tray plugin. Plasma turns XEmbed icons into SNIs using a bridge.

@tsujan
Copy link
Member

tsujan commented Aug 8, 2016

Skype does not support the Status Notifier specification

On Debian and when 32-bit sni-qt is installed, Skype's tray icon appears in LXQt's Status Notifier -- I never use the old systray.

@palinek
Copy link
Contributor

palinek commented Aug 8, 2016

... icon appears in LXQt's Status Notifier -- I never use the old systray.

Did you realy get e.g. pidgin icon into SNI? I've never succeeded ...

@tsujan
Copy link
Member

tsujan commented Aug 8, 2016

Did you realy get e.g. pidgin icon into SNI?

Yes! That requires pidgin-indicator. Until now, only Skype doesn't have an icon and only on Manjaro; I don't know what's missing here.

Edit: As far as I see, the only difference is the Qt version.

@luis-pereira
Copy link
Member

@tsujan What do you don't see ? Only the icon or the item is not there ?

@tsujan
Copy link
Member

tsujan commented Aug 8, 2016

@luis-pereira
First, I may be wrong but I don't think this is about an LXQt bug because, with the same version, the Skype tray icon is OK on Debian. It may be related to Qt or ... That was the reason I didn't reopen this issue.

Second, it's only about Skype so far: it has no item in the status notifier at all.

@agaida agaida added this to test in Issues Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issues
  
Translations and L10N
Development

Successfully merging a pull request may close this issue.

6 participants