Multi-monitor tab strip navigation

I’ve got a mutli-monitor application that is working well. I’m just trying to iron out the last few little annoyances with navigation and I’ve run into something I can’t seem to solve.

I’m opening a unique main window on each desktop, and a common navigation window on each. So the navigation window is docked on the left side of each desktop.

The tabs trip performs as expected. Clicking on the tab opens the proper window in the desktop. The issue is startup of the client and setting up of the desktops. I would like the tab strip to show the proper selected window on startup. I can’t seem to figure out how to make that happen. I’ve tried this script:

def startupWindow():
	from com.inductiveautomation.factorypmi.application import VisionDesktop
	window = system.nav.desktop(VisionDesktop.CURRENT_DESKTOP.get()).getCurrentWindow()
	system.gui.getParentWindow(event).getComponentForPath('Root Container.Tab Strip').selectedTab = window
	print window
	
system.util.invokeLater(startupWindow,1000)

However both the navigation windows are showing the same window has been opened even though there are different windows open on each desktop.

Is the navigation window reporting the same window because I’m using the same navigation window on each desktop?

So, the tab strip has the wrong selected tab? Is there still a binding from selectedTab to the System/Client/Current Window tag?

I removed that binding so when the navigation window with the tab strip starts up no tab is selected. I’m trying to make that tab selected based on the window that is open in the desktop. I “think” this should only be an issue when the window is first opened up and not subsequently as the user will click on the tabs which should stay in sync.

I’m wondering if this isn’t doing what it should be. Are you sure that this is returning an accurate value? What if you use system.gui.getCurrentDesktop in place of the VisionDesktop import?

That didn’t change anything either.

When the navigation window open with the tab strip that window is reporting as “primary” and it doesn’t matter which desktop it is opened on it reports primary.

Should it be reporting the desktop even if the exact same window is opened on both desktops?