Hazov
December 7, 2025, 8:51pm
1
If you pull the tab in photoshop, it will detach from the tray into a floating tray window from one document… Can you tell me if it is possible to manage photoshop tabs in a UXP application?
I need to make a method that can detach a tab from the tray to a floating window.
You will also need to find an unpinned window to attach documents from the shared tray to its tray.
Also a method that could minimize the window.
shuji
December 8, 2025, 1:43pm
2
I suppose managing windows is limited in UXP Plugin, but it’s partially possible.
Detaching a active document window from the tray and minimise a window.
const FLOATWINDOW_COMMAND = 5996;
const MINIMISE_WINDOW_COMMAND = 5932;
// detaching a window from the tray
await core.performMenuCommand({ commandID: FLOATWINDOW_COMMAND });
// minimise a window
await core.performMenuCommand({ commandID: MINIMISE_WINDOW_COMMAND });
atttaching a window on the tray, but forcefully, unit all tabs.
I’m not sure would you be satisfied with the result.
const ATTACH_COMMAND = 5931;
const UNITEALLTABS_COMMAND = 5998;
document.getElementById("unite").addEventListener("click", () => {
core.executeAsModal(async () => {
// menu -> Window -> arrange -> tile
await core.performMenuCommand({ commandID: ATTACH_COMMAND });
// menu -> WIndow -> arrange -> Consolidate All to tab
await core.performMenuCommand({ commandID: UNITEALLTABS_COMMAND });
}, {commandName: "unite window"});
});
Regarding detecting an unpinned window, I have no idea.