Skip to content

Commit

Permalink
only send menus to clients that request them
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Aug 3, 2024
1 parent 871acc3 commit aca8ada
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion xpra/server/mixins/child_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ def send_xdg_menu_data(self, ss) -> None:
if ss.is_closed():
return
xdg_menu = self._get_xdg_menu_data() or {}
ss.send_setting_change("xdg-menu", xdg_menu)
if ss.xdg_menu:
ss.send_setting_change("xdg-menu", xdg_menu)
log(f"{len(xdg_menu)} menu data entries sent to {ss}")

def send_updated_menu(self, xdg_menu) -> None:
Expand Down
2 changes: 1 addition & 1 deletion xpra/server/source/client_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def parse_client_caps(self, c: typedict) -> None:
self.share = c.boolget("share")
self.lock = c.boolget("lock")
self.control_commands = c.strtupleget("control_commands")
self.xdg_menu = c.boolget("xdg-menu", True)
self.xdg_menu = c.boolget("xdg-menu", False)
bandwidth_limit = c.intget("bandwidth-limit", 0)
server_bandwidth_limit = self.server_bandwidth_limit
if self.server_bandwidth_limit is None:
Expand Down

0 comments on commit aca8ada

Please sign in to comment.