Skip to content

Commit

Permalink
#3070 make sure we also pre-load the menus from the proxy server (by …
Browse files Browse the repository at this point in the history
…doing it in server core)
  • Loading branch information
totaam committed Apr 29, 2021
1 parent 7a6d6ad commit fc97130
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion xpra/platform/xposix/xdg_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ def noicondata(d):

load_lock = Lock()
xdg_menu_data = None
def load_xdg_menu_data(force_reload=False):
def load_xdg_menu_data(force_reload=False, wait_for_lock=True):
global xdg_menu_data, large_icons
if not wait_for_lock and load_lock.locked():
return xdg_menu_data
with load_lock:
if not xdg_menu_data or force_reload:
large_icons = []
Expand Down
2 changes: 1 addition & 1 deletion xpra/server/menu_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def setup(self):
from xpra.platform.xposix.xdg_helper import load_xdg_menu_data
#start loading in a thread,
#so server startup can complete:
start_thread(load_xdg_menu_data, "load-xdg-menu-data", True)
start_thread(load_xdg_menu_data, "load-xdg-menu-data", True, (False, False))

def cleanup(self):
self.cancel_xdg_menu_reload()
Expand Down
1 change: 1 addition & 0 deletions xpra/server/server_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ def threaded_init(self):
log("threaded_init()", exc_info=True)
log.error("Error in initialization thread callback %s", cb)
log.error(" %s", e)
self.menu_provider.setup()
log("threaded_init() servercore end")

def after_threaded_init(self, callback):
Expand Down

0 comments on commit fc97130

Please sign in to comment.