Bug 358328 - Application systray icon: No context menu
Summary: Application systray icon: No context menu
Status: RESOLVED DUPLICATE of bug 362941
Alias: None
Product: plasmashell
Classification: Plasma
Component: XembedSNIProxy (show other bugs)
Version: 5.5.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 356500 358487 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-21 21:10 UTC by g111
Modified: 2017-01-05 15:04 UTC (History)
22 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description g111 2016-01-21 21:10:53 UTC
I am using The UPnP server "minimserver" and its control app "minimwatch" that is written in java. When running minimwatch it displays an (old style xembed) systray icon. The  right-mouse context menu is the only way to interact with it. Unfortunately the menu is not displayed anymore in plasmashell 5.5 making minimwatch completely useless.

Reproducible: Always

Steps to Reproduce:
1. Install minimwatch. See http://minimserver.com/install-linux-mwatch.html
2. Run it. It will display a systray icon
3. Try to right click the icon to open the context menu

Actual Results:  
The context menu does not show up.

Expected Results:  
The context menu should be displayed.

With plasmashell 5.3 xembed icons were not supported anymore. I worked around this by using wmsystemtray. With plasmashell 5.5 this programm does not start anymore because KDE already has launched a systemtray. So the workaround does not work anymore. Is there another idea for a workaround?

Another xembed icon (of a program written in perl/gtk) does show its context menu fine. So it seems to be a problem of a java systray icon.
Comment 1 g111 2016-01-23 12:32:23 UTC
When right clicking on the icon an entry is written in the ~/.xsession-errors logfile:

Could not find DBusMenu interface, falling back to calling ContextMenu()
kde.xembedsniproxy: Received click 3 with passed x*y 1691 1169

(I do not know if this is of any interest?)
Comment 2 David Edmundson 2016-01-23 12:42:05 UTC
the first line is plasma trying to see if we have a DBus menu that it can show itself, before falling back to telling the app (in this case xembedsniproxy) to show a menuitself.

That's all correct

The second line is xembedsniproxy sending a right click to the java app at that co-ordinate.

Again, that's all correct.

I think I have some issues with the java apps and focus, but I need to poke round the java code to find out.
Comment 3 g111 2016-01-23 15:58:46 UTC
Interestingly the icon is able to open a small popup if the state of the watched minimserver changes (starting, stopping, rescanning). 

So maybe the click event for opening the context menu does not reach the app? (Well, just a guess, I do not know about the technical internals.)
Comment 4 David Edmundson 2016-01-23 16:17:10 UTC
*** Bug 356500 has been marked as a duplicate of this bug. ***
Comment 5 David Edmundson 2016-01-26 16:39:06 UTC
*** Bug 358487 has been marked as a duplicate of this bug. ***
Comment 6 Nicolas L. 2016-01-26 22:15:11 UTC
just to add infos : Bug 358487 is not a java apps but a perl-gtk3 ( but the same final issue ).
Comment 7 Jörg Walter 2016-01-28 13:54:42 UTC
FWIW, this also happens for radiotray (python/Gtk 3).
Comment 8 David Edmundson 2016-01-28 13:55:37 UTC
oh, that's interesting. Radiotray is one of the ones I tested against.

That could mean it's not a client toolkit issue but something else
Comment 9 Wulf 2016-01-28 20:09:14 UTC
(In reply to Jörg Walter from comment #7)
> FWIW, this also happens for radiotray (python/Gtk 3).

just fyi - I can't confirm; radiotray works very well for me and it is clickable: left (normal menu) and right (context menu) click
Comment 10 Nicolas L. 2016-02-04 10:50:53 UTC
I see the same with remmina
Comment 11 Jörg Walter 2016-02-10 09:29:01 UTC
(In reply to Wulf from comment #9)
> (In reply to Jörg Walter from comment #7)
> > FWIW, this also happens for radiotray (python/Gtk 3).
> 
> just fyi - I can't confirm; radiotray works very well for me and it is
> clickable: left (normal menu) and right (context menu) click

Note the toolkit: The Gtk-2 version (Ubuntu Wily) works, but the new Gtk-3 version (from xenial) fails.
Comment 12 bjoernv 2016-02-29 17:02:11 UTC
Here is a small Java example. The context menu is not displayed:

Tray Icon Demo
https://docs.oracle.com/javase/tutorial/uiswing/examples/misc/index.html#TrayIconDemo

(To fix the warning, please enable metal instead of Windows LaF in ./src/misc/TrayIconDemo.java:
[...]
            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
[...]
)
Comment 13 Shlomi Fish 2016-03-13 09:26:34 UTC
We're running into this problem in Mageia v6/Cauldron - see https://bugs.mageia.org/show_bug.cgi?id=17592 .
Comment 14 Thomas Pfeiffer 2016-03-15 21:18:42 UTC
Please don't add the VisualDesign flag to purely technical bugs. There is nothing for the VDG to do here.
Comment 15 Nicolas L. 2016-04-06 12:53:11 UTC
Any news on this issue ?
Comment 16 Māris Nartišs 2016-04-13 13:12:29 UTC
I observe the same behaviour with Rachota app (http://rachota.sourceforge.net/en/index.html) - I see a blank square where icon should be and can not get any pop-up menu to appear. 

.xsession-errors:
Could not find DBusMenu interface, falling back to calling ContextMenu()
kde.xembedsniproxy: Received click 3 with passed x*y 1237 834
kde.xembedsniproxy: Received click 1 with passed x*y 1237 834

kde-apps/plasma-apps-15.08.3:4/15.08
kde-apps/plasma-runtime-15.12.3:4/15.12
kde-base/kdeplasma-addons-4.14.3:4/4.14
kde-base/libplasmaclock-4.11.22:4/4.11
kde-base/libplasmagenericshell-4.11.22:4/4.11
kde-frameworks/plasma-5.21.0:5/5.21
kde-plasma/plasma-desktop-5.6.2:5
kde-plasma/plasma-workspace-5.6.2:5
dev-libs/sni-qt-0.2.6-r1 
dev-libs/libappindicator-12.10.0-r200 
dev-libs/libappindicator-12.10.0-r300
Comment 17 Elia Devito 2016-05-07 13:30:12 UTC
On this bug there is two potential patch to fix/workaround this (at least for java app)

https://bugs.kde.org/show_bug.cgi?id=355504
Comment 18 EMR_Kde 2016-05-07 13:50:17 UTC
(In reply to Elia Devito from comment #17)
> On this bug there is two potential patch to fix/workaround this (at least
> for java app)
> 
> https://bugs.kde.org/show_bug.cgi?id=355504

Maybe I am missing something, but after following all of these bugs, I came full circle back here. I am running DavMail and the icon, when I left click, a pop up says "JavaEmbeddedFrame", right click does nothing.
Comment 19 Michael Büker 2016-06-05 20:45:03 UTC
I can confirm for solaar, an application for controlling Logitech wireless devices, written in Python with GTK3 (not Java!).
Comment 20 EMR_Kde 2016-06-06 00:23:06 UTC
Yeah, we(In reply to Michael Büker from comment #19)
> I can confirm for solaar, an application for controlling Logitech wireless
> devices, written in Python with GTK3 (not Java!).

Good luck... no one seems intended on fixing this "feature"
Comment 21 EMR_Kde 2016-06-17 13:39:14 UTC
*bump* ?
Comment 22 Shlomi Fish 2016-06-19 08:22:59 UTC
(In reply to EMR_Kde from comment #21)
> *bump* ?

*bump* from me as well.
Comment 23 rnet723 2016-06-22 08:24:42 UTC
StarDict is affected aswell.
Comment 24 Luiz Angelo De Luca 2016-07-19 00:22:57 UTC
I just tested with plasma 5.7.0/5.24 from OpenSUSE Tumbleweed and it is still here.

In my case, it is a Windows prog running using wine.
BTW, as the icon is constantly animating, plasma keeps spamming my xerror with

kde.xembedsniproxy: Scaling pixmap of window 117440521 "" from w*h 20 20.
Comment 25 David Edmundson 2016-07-21 14:04:25 UTC

*** This bug has been marked as a duplicate of bug 362941 ***