Commit 2bbd9664 authored by André's avatar André Committed by Philipp Hörist
Browse files

feat: Use AppIndicator for tray icon on Wayland if available

parent 9e23bf80
...@@ -58,18 +58,15 @@ ...@@ -58,18 +58,15 @@
class StatusIcon: class StatusIcon:
def __init__(self) -> None: def __init__(self) -> None:
if app.is_display(Display.WAYLAND):
self._backend = NoneBackend()'Not supported on Wayland')
app.settings.connect_signal('trayicon', self._on_setting_changed)
if self._can_use_libindicator(): if self._can_use_libindicator():
app.settings.connect_signal('trayicon', self._on_setting_changed)
self._backend = AppIndicator() self._backend = AppIndicator()'Use AppIndicator3 backend')'Use AppIndicator3 backend')
elif app.is_display(Display.WAYLAND):
self._backend = NoneBackend()'libappindicator not found or disabled')
else: else:
app.settings.connect_signal('trayicon', self._on_setting_changed)
self._backend = GtkStatusIcon() self._backend = GtkStatusIcon()'Use GtkStatusIcon backend')'Use GtkStatusIcon backend')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment