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 tray icon doesn't work #6545

Closed
michaelstingl opened this issue May 24, 2018 · 35 comments
Closed

KDE Plasma: Right-click on tray icon doesn't work #6545

michaelstingl opened this issue May 24, 2018 · 35 comments
Assignees
Labels
blue-ticket Linux packaging ReadyToTest QA, please validate the fix/enhancement
Milestone

Comments

@michaelstingl
Copy link
Contributor

kde-right-click

You need to right-click tray icon very often. No effect. If it worked once, then it seems more likely to work again… (🤔sounds strange, I know)

Steps to reproduce

  1. Install 2.4.1 on Kubuntu 18.04
  2. Right-click on tray icon

Client configuration

Client version:
2.4.1

Operating system:
Kubuntu 18.04

OS language:
EN

Qt version used by client package (Linux only, see also Settings dialog):
5.6.2

Client package (From ownCloud or distro) (Linux only):
From ownCloud

Installation path of client:
???

00009497

@guruz
Copy link
Contributor

guruz commented May 24, 2018

@michaelstingl Do you have a machine to reproduce this? If yes try the 2.5.0 nightlies with newer Qt?

@ogoffart
Copy link
Contributor

"Works for me" is all i can say. (But i'm using Qt 5.10.1 on Archlinux)

This looks like a Qt or Plasma bug.

@michaelstingl
Copy link
Contributor Author

michaelstingl commented May 24, 2018

Same with 2.5.0 daily with Qt 5.10.1

cursor_and_michaels_win_server

I run a VirtualBox machine fresh installed from kubuntu-18.04-desktop-amd64.iso (no special options, everything default)

BTW Why does the "Close" button has the "X"?

@ckamm ckamm added this to the 2.5.0 milestone May 25, 2018
@ckamm
Copy link
Contributor

ckamm commented May 25, 2018

I'm also on kubuntu 18.04 but haven't seen this issue. I was using my own builds with a different Qt version though. I'll see - at best we can find yet another tray icon workaround though. :/

@ckamm
Copy link
Contributor

ckamm commented May 25, 2018

I can reproduce with the kubuntu-18.04 iso. Interestingly floating systray widgets work (on the second click, it seems focus needs to go to the tray first - that's not the case for other indicators), but systrays in panels don't do right-clicks reliably at all. Left-clicks work every time.

I tested with 2.4.1 (built with and running with Qt 5.6.2)

@ckamm
Copy link
Contributor

ckamm commented May 25, 2018

And I can confirm that my manually built version with Qt 5.9.1 using the system Qt 5.9.5 works as expected. And with the nightly using 5.10.1 it doesn't work again.

(also note that my custom build is the only instance to use the ubuntu monochome icon (black cloud with white outline, I didn't find it in our repo, where does it come from?), the others use the default colored owncloud icon)

@ckamm
Copy link
Contributor

ckamm commented May 25, 2018

It seems to relate to some of our other tray workarounds - with OWNCLOUD_MINIMAL_TRAY_MENU=1 it works. Sadly, OWNCLOUD_FORCE_QDBUS_TRAY_WORKAROUND=1 makes it work too.

@ckamm
Copy link
Contributor

ckamm commented May 25, 2018

@ogoffart I currently have no good guess as to why my 5.9 version would work when the 5.6 and 5.10 versions don't. Any ideas?

I don't want to enable the workaround we built for qdbusmenu because that triggered another set of tray bugs. :/

@ogoffart
Copy link
Contributor

Maybe because of a plugin that is only loaded with system's Qt (such as the KDE integration plugin). It might have a different systray implementation.

@SamuAlfageme
Copy link
Contributor

SamuAlfageme commented May 28, 2018

Reminds me somehow to #5968 (see also https://github.com/owncloud/enterprise/issues/2151)

@guruz
Copy link
Contributor

guruz commented May 28, 2018

Maybe because of a plugin that is only loaded with system's Qt (such as the KDE integration plugin).

https://unix.stackexchange.com/a/358500
https://unix.stackexchange.com/a/220110

@ogoffart
Copy link
Contributor

In my opinion, we should not ship Qt for distribution that have a Qt that is recent enough.
So distribution with Qt >5.6.1 (or 5.9.1?) should simply use system Qt

@guruz
Copy link
Contributor

guruz commented May 30, 2018

They won't get HTTP2 then though

@guruz
Copy link
Contributor

guruz commented May 30, 2018

(but tray is more important than HTTP2 so @ogoffart is right)

@michaelstingl
Copy link
Contributor Author

adding @dschmidt to the discussion…

@ckamm
Copy link
Contributor

ckamm commented Jun 11, 2018

I've tried to verify that this is indeed about the platform plugins. Comparing the loaded libraries doesn't help unfortunately since both versions load things like /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so - though it could be that the distributed version discards it somehow. I haven't yet figured out how to tell what's actually happening with the tray.

@ckamm
Copy link
Contributor

ckamm commented Jun 11, 2018

What I could verify is that my self-build version also starts having a broken tray if I remove /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so and that makes sense as this library contains kdeplatformsystemtrayicon.cpp

@ckamm
Copy link
Contributor

ckamm commented Jun 13, 2018

So: Yes, using the system Qt for the distributions where it's new enough to not cause other issues would be the correct solution.

I'll also look for workarounds (the minimal tray menu works, after all), but those will likely need compromises with respect to features, or introduce new issues down the line.

@ckamm
Copy link
Contributor

ckamm commented Jun 14, 2018

Some debugging has shown me that contextMenu->isVisible() always returns false if the kde integration plugin isn't loaded. And building the context menu in aboutToShow() doesn't work either, similar to OSX.

ckamm added a commit that referenced this issue Jun 14, 2018
* Disentangle the previous 'qdbusWorkarounds' into three different
  things
* Make not trusting tray.isVisible() a new workaround
* Introduce env vars for all workaround flags
* Use the workaround flags for OSX
* Determine workaround flags for KDE when the plasma integration plugin
  is missing
@jnweiger
Copy link
Contributor

@michaelstingl here are linux packages built from ckamm' tray-workarounds branch. Can you try if this improves the situation on your kubuntu too. for me is seems to ease the pain.

https://download.owncloud.com/internal/repo/desktop:/testing/download/

@jnweiger
Copy link
Contributor

I am unhappy with my test environment:

  • The old 241 code now behaves acceptably well. The right click menu shows up on every second click.
  • The new code from Tray workarounds #6586 seem to just behave the same :-(

@ckamm
Copy link
Contributor

ckamm commented Jun 18, 2018

@jnweiger Odd. Are all of these tests done with binaries that link to a custom Qt version that has a different minor version number from the system Qt? The important bit is to ensure that KDEPlasmaPlatformTheme.so can't be loaded - otherwise it should just work.

@jnweiger
Copy link
Contributor

gna my tests were faulty, I'll recheck and keep an eye on KDEPlasmaPlatformTheme.so -- thanks for raising doubt :-)

@jnweiger
Copy link
Contributor

jnweiger commented Jun 18, 2018

  • cernbox 241 with qt562 is without KDEPlasmaPlatformTheme.so and right click on the tray icon is very hard.
  • testpilotcloud 242-daily with qt562 is without KDEPlasmaPlatformTheme.so and right click on the tray icon is very hard.
  • testpilotcloud 250-daily with qt5101 is without KDEPlasmaPlatformTheme.so and right click on the tray icon is very hard.
  • owncloud 250-trayworkarounds with qt5101 is without KDEPlasmaPlatformTheme.so and right click on the tray icon works almost ever time. Occasionally a second right click is needed, (seems to coincident with messages fading in or out) .

All of these done on one and the same VM in that order, with purge and autoremove in between and ca. 240 online updates waiting to be installed.
All done linked with our own QT, either 5.6.2 or 5.10.1, never with a system qt.
No dolphin, nemo, nautilus plugins installed.

grepped for KDEPlasmaPlatfomTheme in ldd and lsof output using grep -i pla.

There are matches only for things like

.../libcomposeplatforminputcontextplugin.so
.../platforms/libqxcb.so
.../plasmashellVr1298.4.slave-socket

@jnweiger
Copy link
Contributor

Reproduced the same behaviour after installing all pending ubuntu online updates.

@ckamm, I now officially love your trayworkarounds branch!

@jnweiger
Copy link
Contributor

@ckamm, what would be the effort to backport this PR for 2.4.2 ?

ckamm added a commit that referenced this issue Jun 19, 2018
* Disentangle the previous 'qdbusWorkarounds' into three different
  things
* Make not trusting tray.isVisible() a new workaround
* Introduce env vars for all workaround flags
* Use the workaround flags for OSX
* Determine workaround flags for KDE when the plasma integration plugin
  is missing
@ckamm ckamm added ReadyToTest QA, please validate the fix/enhancement and removed PR available labels Jun 19, 2018
@ckamm
Copy link
Contributor

ckamm commented Jun 19, 2018

@jnweiger Thanks for the elaborate testing! The patch applies cleanly to 2.4, would be no effort to backport.

@jnweiger
Copy link
Contributor

Great! Also for 2.4.* with Qt-5.6.2 ?

ckamm added a commit that referenced this issue Jun 19, 2018
* Disentangle the previous 'qdbusWorkarounds' into three different
  things
* Make not trusting tray.isVisible() a new workaround
* Introduce env vars for all workaround flags
* Use the workaround flags for OSX
* Determine workaround flags for KDE when the plasma integration plugin
  is missing

(cherry picked from commit 99116ac)
(cherry picked from commit ca033b9)
(cherry picked from commit 8b1d979)
(cherry picked from commit a0d6139)
@ckamm
Copy link
Contributor

ckamm commented Jun 19, 2018

@jnweiger Backport PR is #6594

I don't understand the question about 2.4.* with Qt-5.6.2. A bugfix would only go into 2.4.2? And hopefully the Qt version doesn't matter - it might though! Could I ask you to test the 2.4 builds as thoroughly? I'd be sad if we broke trays for 2.4.2 instead of improving the situation.

@jnweiger
Copy link
Contributor

building test packages...
I was afraid Qt-5.6.2 might need other workarounds than 5.10.1 - if not, the better!

@jnweiger
Copy link
Contributor

jnweiger commented Jun 19, 2018

@jnweiger
Copy link
Contributor

Thumbs up for the backported PR! Approved from my side, but please doublecheck Olivier's comment.

guruz pushed a commit that referenced this issue Jun 19, 2018
* Disentangle the previous 'qdbusWorkarounds' into three different
  things
* Make not trusting tray.isVisible() a new workaround
* Introduce env vars for all workaround flags
* Use the workaround flags for OSX
* Determine workaround flags for KDE when the plasma integration plugin
  is missing

(cherry picked from commit 99116ac)
(cherry picked from commit ca033b9)
(cherry picked from commit 8b1d979)
(cherry picked from commit a0d6139)
@michaelstingl
Copy link
Contributor Author

michaelstingl commented Jul 2, 2018

@jnweiger @ogoffart close now?

@jnweiger
Copy link
Contributor

jnweiger commented Jul 11, 2018

Backport test done:
Install 242rc1 both testpilotcloud-client and owncloud-client on a ubuntu 18.04 plasma VM.

ubuntu

wget -nv https://download.opensuse.org/repositories/isv:ownCloud:desktop:client-2.4.2rc1/Ubuntu_18.04/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop:/client-2.4.2rc1/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/isv:ownCloud:desktop:client-2.4.2rc1.list"
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/testpilot:/testing/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/isv:ownCloud:testpilot:testing.list"
sudo apt-get update
sudo apt purge -y owncloud-client libowncloudsync0
sudo apt purge -y testpilotcloud-client libtestpilotcloudsync0
sudo apt-get install -y owncloud-client
sudo apt-get install -y testpilotcloud-client
owncloudcmd --version
testpilotcloudcmd --version

leap

zypper addrepo https://download.opensuse.org/repositories/isv:ownCloud:desktop:client-2.4.2rc1/openSUSE_Leap_42.2/isv:ownCloud:desktop:client-2.4.2rc1.repo
zypper addrepo https://download.opensuse.org/repositories/isv:ownCloud:testpilot:testing/openSUSE_Leap_42.2/isv:ownCloud:testpilot:testing.repo
zypper refresh
zypper rm -y owncloud-client libowncloudsync0
zypper rm -y testpilotcloud-client libtestpilotcloudsync0
zypper install -y owncloud-client
zypper install -y testpilotcloud-client
owncloudcmd --version
testpilotcloudcmd --version

Both systems

  • log in on the desktop
  • left click the system menue: a dialog opens containing plasma search.
  • run the installatin procedures above. the correct cliebt version numbers are printed at the end.
    Both systems, both clients:
  • right click the tray icon multople times. a dialog containing quit opens and closes
  • left click the icon, the settings window opens.
  • use right click -> quit to end the client.
Success. Thank you all.Closing.

@jnweiger
Copy link
Contributor

Backport test done:

#### Task

Install 242rc1 both testpilotcloud-client and owncloud-client on a ubuntu 18.04 plasma VM.

##### ubuntu
wget -nv https://download.opensuse.org/repositories/isv:ownCloud:desktop:client-2.4.2rc1/Ubuntu_18.04/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop:/client-2.4.2rc1/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/isv:ownCloud:desktop:client-2.4.2rc1.list"
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/testpilot:/testing/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/isv:ownCloud:testpilot:testing.list"
sudo apt-get update
sudo apt purge -y owncloud-client libowncloudsync0
sudo apt purge -y testpilotcloud-client libtestpilotcloudsync0
sudo apt-get install -y owncloud-client
sudo apt-get install -y testpilotcloud-client
owncloudcmd --version
testpilotcloudcmd --version

##### leap
zypper addrepo https://download.opensuse.org/repositories/isv:ownCloud:desktop:client-2.4.2rc1/openSUSE_Leap_42.2/isv:ownCloud:desktop:client-2.4.2rc1.repo
zypper addrepo https://download.opensuse.org/repositories/isv:ownCloud:testpilot:testing/openSUSE_Leap_42.2/isv:ownCloud:testpilot:testing.repo
zypper refresh
zypper rm -y owncloud-client libowncloudsync0
zypper rm -y testpilotcloud-client libtestpilotcloudsync0
zypper install -y owncloud-client
zypper install -y testpilotcloud-client
owncloudcmd --version
testpilotcloudcmd --version


Both systems
* log in on the desktop
* left click the system menue: a dialog opens containing plasma search.
* run the installatin procedures above. the correct cliebt version numbers are printed at the end.
Both systems, both clients:
* right click the tray icon multople times. a dialog containing quit opens and closes
* left click the icon, the settings window opens.
* use right click -> quit to end the client.

Success. Thank you all.Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blue-ticket Linux packaging ReadyToTest QA, please validate the fix/enhancement
Projects
None yet
Development

No branches or pull requests

6 participants