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()
log.info('Not supported on Wayland')
return
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()
log.info('Use AppIndicator3 backend') log.info('Use AppIndicator3 backend')
elif app.is_display(Display.WAYLAND):
self._backend = NoneBackend()
log.info('libappindicator not found or disabled')
else: else:
app.settings.connect_signal('trayicon', self._on_setting_changed)
self._backend = GtkStatusIcon() self._backend = GtkStatusIcon()
log.info('Use GtkStatusIcon backend') log.info('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