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

The status icon is missing on Gnome on Ubuntu #137

Open
DarthGandalf opened this issue May 30, 2021 · 2 comments
Open

The status icon is missing on Gnome on Ubuntu #137

DarthGandalf opened this issue May 30, 2021 · 2 comments

Comments

@DarthGandalf
Copy link

Ubuntu 21.04, standard installation
libxapp1 2.0.7-1

XApp.StatusIcon.get_state() returns no-support, and the tray icon never appears. But tray works with AppIndicator.Indicator which however misses the feature I need - ability to receive the activate signal.

The readme says this library should work across all Gtk desktop environments, is it true only for Mint?

Here's the code:

Glib::Object::Introspection->setup(
    basename => 'XApp',
    version  => '1.0',
    package  => 'XApp',
);

my $tray = XApp::StatusIcon->new;
$tray->set_icon_name('shutter-panel');
$tray->set_secondary_menu($tray_menu);
$tray->signal_connect('activate', sub { ... });
$tray->set_visible(1);
Glib::Timeout->add(5000, sub {
    say $tray->get_state;
    return FALSE;
});

But it works with Plasma, in the fallback mode.

Ref shutter-project/shutter#331

@mtwebster
Copy link
Member

There's a new standard is StatusNotifier (https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/). AppIndicator is compatible (more or less) with this standard, though as you noted, it lacks activate.

XAppStatusIcon implements its own native interface to communicate with an XAppStatusIconMonitor (the display portion of this), and will fall back to GtkStatusIcon, which is not available under wayland. So unless someone adds support for XAppStatusIcon to gnome (highly unlikely for various reasons), you're out of luck.

QSystemTrayIcon (which I assume plasma uses?) has two modes - it implements StatusNotifierItem if it detects its availability, and will use its own equivalent of GtkStatusIcon if not.

The reason the xapp icon is working in plasma fallback is because plasma apparently still supports xembed (GtkStatusIcon).

To achieve what you're after, we'll have to implement StatusNotifierItem support in XAppStatusIcon. I'll see about doing this in the near future, it wouldn't be too difficult.

@DarthGandalf
Copy link
Author

I see, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants