Skip to content

Commit

Permalink
don't try to use Gtk.StatusIcon on wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 25, 2023
1 parent 0a1819f commit 55608da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xpra/client/gtk_base/gtk_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,14 +794,16 @@ def get_window_frame_sizes(self):


def _add_statusicon_tray(self, tray_list):
#add Gtk.StatusIcon tray:
try:
from xpra.client.gtk_base.statusicon_tray import GTKStatusIconTray
tray_list.append(GTKStatusIconTray)
except Exception as e:
log.warn("failed to load StatusIcon tray: %s" % e)
#add Gtk.StatusIcon tray, but not under wayland:
if not is_Wayland():
try:
from xpra.client.gtk_base.statusicon_tray import GTKStatusIconTray
tray_list.append(GTKStatusIconTray)
except Exception as e:
log.warn("failed to load StatusIcon tray: %s" % e)
return tray_list


def get_tray_classes(self):
from xpra.client.mixins.tray import TrayClient
return self._add_statusicon_tray(TrayClient.get_tray_classes(self))
Expand Down

0 comments on commit 55608da

Please sign in to comment.