wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
6.13k stars 1.77k forks source link

Taskbar icon behaviour broken in KDE Plasma 5 #18081

Open wxtrac opened 6 years ago

wxtrac commented 6 years ago

Issue migrated from trac ticket # 18081

component: wxGTK | priority: normal

2018-02-12 02:01:29: HighCommander4 (Nathan Ridge) created the issue


Originally reported here.

After upgrading my desktop environment from KDE Plasma 4 to KDE Plasma 5, the behaviour of taskbar icons has regressed:

These problems can be reproduced in the 'taskbar' sample.

My GTK version is 3.22.

wxtrac commented 6 years ago

2018-02-12 02:13:24: HighCommander4 (Nathan Ridge) commented


Perhaps this (from the GTK docs) is relevant?

gtk_status_icon_set_tooltip_text has been deprecated since version 3.14 and should not be used in newly-written code.

Use notifications

wxtrac commented 6 years ago

2018-02-12 04:08:32: HighCommander4 (Nathan Ridge) commented


I did some research into the topic and found the following:

So, it seems wxWidgets could support the StatusNotifierItem spec, either by using libappindicator (making it an optional dependency), or by implementing the spec itself (based on a brief glance at the libappindicator implementation, it involves sending some D-Bus messages).

wxtrac commented 6 years ago

2018-10-27 07:19:45: HighCommander4 (Nathan Ridge) commented


Apparently xembed-sni-proxy has been fixed in Plasma >= 5.10 ([1], [2]), though I can't test that myself since I use Debian stable which is stuck on 5.8.

Of course, wxWidgets should still aim to migrate to StatusNotifierItem at some point, as xembed-sni-proxy and GtkStatusIcon will eventually go away.

[1] https://bugs.kde.org/show_bug.cgi?id=362941 [2] https://bugs.kde.org/show_bug.cgi?id=375017

wxtrac commented 6 years ago

2018-10-27 14:58:36: @vadz commented


It would, of course, be great to migrate to newer API, but I've never used neither libappindicator nor statusnotifier and I have no idea which one to use and whether it provides enough functionality to implement the existing API.

If anybody could look into this and provide at least a plan of action (and ideally a patch...), it would be very, very welcome.

fishnet37222 commented 6 months ago

Just as an FYI, this issue still occurs in Plasma 6. At least with regards to the tooltip. I got the context menu to appear by handling wxEVT_TASKBAR_CLICK and calling wxTaskBarIcon::PopupMenu().

vadz commented 6 months ago

FWIW I think using libayatana-appindicator might fix this, at least my understanding is that this is what is used for working taskbar icons under Linux nowadays — even though I haven't tested it under KDE myself (if anybody is interested, they have a simple example which can be compiled with just a single gcc command to check if it works as expected on your system).