Desktop already exists

I am loving the new system.gui.openDesktop feature. However, my customers like to open more than one client on a monitor. When I try to do that using system.gui.openDesktop, I get “Secondary desktop “1” already exists”. Is there a way around this or is it a known limitation?

You’ll have to check to see how many desktops are already opened and open additional ones with handles and/or titles that haven’t already been used.
Something like this.

handles = system.gui.getDesktopHandles()
idx = len(handles)
system.gui.openDesktop(screen = 1, windows = ['window to open'], handle  = idx+1)

Thanks for the tip. I’ll give it a try when I get back to my office.