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

[KDE plasma] Right-click on systray icon does nothing #5960

Closed
PVince81 opened this issue Aug 14, 2017 · 26 comments
Closed

[KDE plasma] Right-click on systray icon does nothing #5960

PVince81 opened this issue Aug 14, 2017 · 26 comments
Labels
p2-high Escalation, on top of current planning, release blocker

Comments

@PVince81
Copy link
Contributor

PVince81 commented Aug 14, 2017

Steps

  1. Install owncloud-client RC1
  2. Run it
  3. Right click on system tray icon
  4. Left click

Actual result

Right-click doesn't work but left click does display the popup.

Expected result

Right-click must bring up the menu.

Env

@PVince81
Copy link
Contributor Author

@guruz FYI

Going to try compiling from source to see if the problem is with the bundled libs.

@PVince81 PVince81 mentioned this issue Aug 14, 2017
3 tasks
@PVince81
Copy link
Contributor Author

PVince81 commented Aug 14, 2017

Checked out v2.3.3-rc1 from source:

  • Leap package with bundled Qt 5.6.2: right-click doesn't work. Systray icon is gray cloud. 🚫
  • Leap local build with local Qt 5.6.1: right-click works, systray icon is cloud border only (looks nicer with Plasma 5) ✅
  • Leap local build with Qt 5.6.2 bundled by package: right-click does not work, see [KDE plasma] Right-click on systray icon does nothing #5960 (comment)

I also have a Tumbleweed box but there is currently no package so I can't test.

  • Tumbleweed package with bundled Qt 5.6.2: right-click works ✅
  • Tumbleweed local build with local Qt 5.9.1: right-click works ✅
  • Tumbleweed local build with bundled Qt: TODO

@jnweiger
Copy link
Contributor

jnweiger commented Aug 14, 2017

thanks for testing.

the cmake call for using the bundled Qt is something like this

cmake .. \
  -DWITH_DOC=TRUE \
  -DCMAKE_FIND_ROOT_PATH="/opt/ownCloud/qt-5.6.2" \
  -DMIRALL_VERSION_SUFFIX="rc1" \
  -DMIRALL_VERSION_BUILD="8192" \
  -DKDE_INSTALL_USE_QT_SYS_PATHS=1 \
  -DCMAKE_C_FLAGS:STRING="%{optflags}" \
  -DCMAKE_CXX_FLAGS:STRING="%{optflags}" \
  -DCMAKE_SKIP_RPATH=OFF \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_INSTALL_PREFIX=/opt/ownCloud/ownCloud \
  -DCMAKE_INSTALL_DATAROOTDIR:PATH=%{_datadir} \
  -DDATA_INSTALL_DIR:PATH=%{_datadir} \
  -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir} \
  -DSYSCONF_INSTALL_DIR=%{_sysconfdir} \
%if %{_lib} == lib64
  -DLIB_SUFFIX=64 \
%endif
  -DQTKEYCHAIN_INCLUDE_DIR=/opt/ownCloud/qt-5.6.2/include/qt5keychain \
  -DQTKEYCHAIN_LIBRARY=/opt/ownCloud/qt-5.6.2/%{_lib}/libqt5keychain.so \
  -DGIT_SHA1="HACK FIXME" \
  -DBUILD_SHELL_INTEGRATION=OFF \
  -DPACKAGE="%{name}" \
  -DCMAKE_SKIP_BUILD_RPATH=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH="/opt/ownCloud/ownCloud/%{_lib};/opt/ownCloud/qt-5.6.2/%{_lib}" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON

@PVince81
Copy link
Contributor Author

from the build log:

cmake .. -DWITH_DOC=TRUE -DCMAKE_FIND_ROOT_PATH=/opt/ownCloud/qt-5.6.2 -DMIRALL_VERSION_SUFFIX=rc1 -DMIRALL_VERSION_BUILD=8192 -DKDE_INSTALL_USE_QT_SYS_PATHS=1 '-DCMAKE_C_FLAGS:STRING=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' '-DCMAKE_CXX_FLAGS:STRING=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' -DCMAKE_SKIP_RPATH=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/opt/ownCloud/ownCloud -DCMAKE_INSTALL_DATAROOTDIR:PATH=/usr/share -DDATA_INSTALL_DIR:PATH=/usr/share -DCMAKE_INSTALL_DOCDIR:PATH=/usr/share/doc/packages -DSYSCONF_INSTALL_DIR=/etc -DLIB_SUFFIX=64 -DQTKEYCHAIN_INCLUDE_DIR=/opt/ownCloud/qt-5.6.2/include/qt5keychain -DQTKEYCHAIN_LIBRARY=/opt/ownCloud/qt-5.6.2/lib64/libqt5keychain.so '-DGIT_SHA1=HACK FIXME' -DBUILD_SHELL_INTEGRATION=OFF -DPACKAGE=owncloud-client -DCMAKE_SKIP_BUILD_RPATH=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON '-DCMAKE_INSTALL_RPATH=/opt/ownCloud/ownCloud/lib64;/opt/ownCloud/qt-5.6.2/lib64' -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON

@PVince81
Copy link
Contributor Author

after some struggles I got it running:

export LD_LIBRARY_PATH=/opt/ownCloud/qt-5.6.2/lib64:/opt/ownCloud/ownCloud/lib64/
bin/owncloud

right-click doesn't work here.

@PVince81
Copy link
Contributor Author

The packaged owncloud-client works if I start it with:

OWNCLOUD_FORCE_QDBUS_TRAY_WORKAROUND=1 owncloud

right click works then

@PVince81
Copy link
Contributor Author

We tried other things like XDG_CURRENT_DESKTOP=gnome and XDG_CURRENT_DESKTOP=xfce but it doesn't work.

We checked LD_DEBUG and lsof to check if other Qt libs were loaded, but none outside of "/opt/ownCloud" were loaded.

Also apparently no KDE theme plugin.

@PVince81
Copy link
Contributor Author

I've setup a Leap 42.3 VM (my local system is 42.2).

Inside that VM, the owncloud client works fine and the right click works.
It looks like Leap 42.3 already provides Qt 5.6.2 so it might explain why it works there.

Would need to test again with a 42.2 VM with older Qt to confirm if this whole issue is about some incompatibilities.

@PVince81
Copy link
Contributor Author

this also means that bundling 5.6.2 for Leap 42.3 is a bit superfluous...

@jnweiger
Copy link
Contributor

jnweiger commented Aug 15, 2017

@PVince81
Copy link
Contributor Author

Just tested Tumbleweed package owncloud-client-2.3.3~rc1-8194.1.x86_64.
Desktop client works, right-click works.
This is probably because Tumbleweed has Qt 5.9.1 which might work better when sharing systray with 5.6.2 than 5.6.1<->5.6.2

@PVince81
Copy link
Contributor Author

I've updated the test results post: #5960 (comment)

@jnweiger
Copy link
Contributor

Apply this for leap 42.2 ?

%if 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} == 120200
OWNCLOUD_FORCE_QDBUS_TRAY_WORKAROUND.patch.txt
%endif

@PVince81
Copy link
Contributor Author

I'm fine with this if @guruz is as well.

Let's hope it's the only affected version. There is a slight risk that other distros with older Qts might be affected as well, or at least those which are on 5.6.1.

@jnweiger
Copy link
Contributor

I'd attribute the risks more to distro specific patches and corner case config. E.g. opensuse Leap is the only distro that needs a patch, so that our icons show up properly.

@jturcotte
Copy link
Member

opensuse Leap is the only distro that needs a patch, so that our icons show up properly.

@jnweiger Which patch is this?

@guruz
Copy link
Contributor

guruz commented Aug 15, 2017

FYI @ckamm @ogoffart @dschmidt

@guruz guruz added the p2-high Escalation, on top of current planning, release blocker label Aug 15, 2017
@jnweiger
Copy link
Contributor

@jturcotte

%if 0%{?is_opensuse} && 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100
# openSUSE_Leap_42.2
Patch2:         no_icon_substitution.diff
%endif
-- src/libsync/theme.cpp	2017-04-24 13:42:05.000000000 +0200
+++ src/libsync/theme.cpp	2017-04-27 16:58:07.671945560 +0200
@@ -130,7 +130,8 @@
     if (cached.isNull()) {
         if(QIcon::hasThemeIcon(name)) {
             // use from theme
-            return cached = QIcon::fromTheme(name);
+	    // or don't: https://github.com/owncloud/ownbrander/issues/715
+            // return cached = QIcon::fromTheme(name);
         }
 
         QList<int> sizes;

@PVince81
Copy link
Contributor Author

@jnweiger tested Leap 42.2 with the patched package, right-click works for me.

owncloud-client-2.3.3~rc1-8196.1.x86_64

@jturcotte
Copy link
Member

jturcotte commented Aug 15, 2017

From my understanding this patch works around a KDE feature to provide themed icons, and this isn't related to the tray icon context menu.

I looked at the libqt5-qtbase patches and I can't find much related to the tray icon, so it's quite possible that this also affect other distros. I just hope that this would be specific to Qt 5.6.1 and not earlier versions as well.

@SamuAlfageme
Copy link
Contributor

Hmm... while testing other plasma-related issues with 2.3.3RC2 I also saw this one on Debian 9 w/ plasma 5.8 and Qt 5.7.1:

However I could not reproduce it on distributions with higher versions of KDE plasma. 😕

@SamuAlfageme SamuAlfageme changed the title 2.3.3 rc1 Right-click on systray icon does nothing [KDE plasma] Right-click on systray icon does nothing Aug 23, 2017
@guruz
Copy link
Contributor

guruz commented Aug 25, 2017

What's the conclusion on this now?

Does this need more package patches/workarounds @SamuAlfageme ? #5960 (comment) FYI @jnweiger

If not please close this issue so we can proceed with a 2.3.3 final :-)

@PVince81
Copy link
Contributor Author

Nothing more from me, feel free to close.

@dragotin
Copy link
Contributor

dragotin commented Sep 4, 2017

Hm, what is the conclusion now? Remember that there still is also downstream...

Do I need to include the patch in the 'official' openSUSE Tumbleweed packages? Obviously not, as Tumbleweed is on Qt version 5.9.1currently. Is it needed for the released Leap versions? And for which?

I am talking about this patch:

--- owncloudclient-2.3.3-rc1/src/gui/owncloudgui.cpp.orig	2017-08-15 09:42:26.555714353 +0000
+++ owncloudclient-2.3.3-rc1/src/gui/owncloudgui.cpp	2017-08-15 09:59:04.137384119 +0000
@@ -59,7 +59,7 @@
     _logBrowser(0),
     _contextMenuVisibleOsx(false),
     _recentActionsMenu(0),
-    _qdbusmenuWorkaround(false),
+    _qdbusmenuWorkaround(true),
     _folderOpenActionMapper(new QSignalMapper(this)),
     _recentItemsMapper(new QSignalMapper(this)),
     _app(parent)

Can anybody outline what this patch actually does? Thanks. A bit more communication on these kind of things would be great... I guess the packaging-mailinglist was killed?

@ogoffart
Copy link
Contributor

ogoffart commented Sep 5, 2017

I think there is a bug in one version of plasma that needs the work around.
With newer distribution, this work around should not be required.
The best is to test with plasma. If cou can right click to get the menu.

@guruz
Copy link
Contributor

guruz commented Sep 28, 2017

I'm closing this for now.
If anyone has issues please create a new bug mentioning which package you use, which distro etc :)

@guruz guruz closed this as completed Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

No branches or pull requests

7 participants