ArtWindow.prototype.override({
    initialize: function($super, parentEl, params) {
		$super(parentEl, params);               
        if (!isMainWindow) {
            let mw = app.dialogs.getMainWindow();
            let mainWindowBody = mw.getValue('document').body;
            let artWindow = qe(mainWindowBody, '[data-control-class=ArtWindow]');            
            setInterval(() => {
                if (artWindow && artWindow.controlClass && this.selectedTrack != artWindow.controlClass.selectedTrack) {
                    this.selectedTrack = artWindow.controlClass.selectedTrack;
                    if (this.mode == 'selectedTrack')
                        this.trackChangeRegister();
                }
            }, 1000);
       }
	},
    _getMenuArray: function ($super) {
        let menuArray = $super();
        if (isMainWindow) {
            menuArray.push({
                action: window.actions.undockPreview,
                order: 999,
                grouporder: 999
            });
        }
        return menuArray;
    }
});