code: def set_layout(wlayout, callback):
      '''set window layout'''
      global display_size
      global window_list
      global loaded_layout
      global pending_load
      global vehiclename
      #if not wlayout.name in window_list:
      #    print("layout %s" % wlayout)
      if not wlayout.name in window_list and loaded_layout is not None and wlayout.name in loaded_layout:
          callback(loaded_layout[wlayout.name])
      window_list[wlayout.name] = ManagedWindow(wlayout, callback)
      display_size = wlayout.dsize
      if pending_load:
          pending_load = False
          load_layout(vehiclenamef set_layout(wlayout, callback):
      '''set window layout'''
      global display_size
      global window_list
      global loaded_layout
      global pending_load
      global vehiclename
      #if not wlayout.name in window_list:
      #    print("layout %s" % wlayout)
      if not wlayout.name in window_list and loaded_layout is not None and wlayout.name in loaded_layout:
          callback(loaded_layout[wlayout.name])
      window_list[wlayout.name] = ManagedWindow(wlayout, callback)
      display_size = wlayout.dsize
      if pending_load:
          pending_load = False
          load_layout(vehiclename)
docs: set window layout