gnome/extensions/workspaces-to-dock@passingthru67.gmail.com/thumbnailCaption.js
// windows visible on all workspaces are moved to active workspace
windows visible on all workspaces are moved to active workspace
windows visible on all workspaces are moved to active workspace
activeWorkspaceChanged() {
        let windows = global.get_window_actors();
        let workspaceManager = global.workspace_manager;
        let activeWorkspace = workspaceManager.get_active_workspace();
        for (let i = 0; i < windows.length; i++) {
            let metaWin = windows[i].get_meta_window();
            if (!metaWin)
                continue;
            if ((this._isMyWindow(windows[i]) && this._isOverviewWindow(windows[i])) ||
                (this._isMyWindow(windows[i]) && this._isMinimizedWindow(windows[i])) ||
                this._showWindowAppOnThisWorkspace(windows[i])) {
                let index = -1;
                for (let i = 0; i < this._taskBar.length; i++) {
                    if (this._taskBar[i].metaWin == metaWin) {
                        index = i;
                        if (this._taskBarBox) {
                            let buttonActor = this._taskBarBox.get_child_at_index(index);
                            buttonActor.visible = true;
                        }
                        break;
                    }
                }
                if (index > -1)
                    continue;
            } else {
                let index = -1;
                for (let i = 0; i < this._taskBar.length; i++) {
                    if (this._taskBar[i].metaWin == metaWin) {
                        index = i;
                        if (this._taskBarBox) {
                            let buttonActor = this._taskBarBox.get_child_at_index(index);
                            buttonActor.visible = false;
                        }
                        break;
                    }
                }
            }
        }
        this._updateWindowCount();
    }
activeWorkspaceChanged ( ) { let windows = global . get_window_actors ( ) ; let workspaceManager = global . workspace_manager ; let activeWorkspace = workspaceManager . get_active_workspace ( ) ; for ( let i = 0 ; i < windows . length ; i ++ ) { let metaWin = windows [ i ] . get_meta_window ( ) ; if ( ! metaWin ) continue ; if ( ( this . _isMyWindow ( windows [ i ] ) && this . _isOverviewWindow ( windows [ i ] ) ) || ( this . _isMyWindow ( windows [ i ] ) && this . _isMinimizedWindow ( windows [ i ] ) ) || this . _showWindowAppOnThisWorkspace ( windows [ i ] ) ) { let index = - 1 ; for ( let i = 0 ; i < this . _taskBar . length ; i ++ ) { if ( this . _taskBar [ i ] . metaWin == metaWin ) { index = i ; if ( this . _taskBarBox ) { let buttonActor = this . _taskBarBox . get_child_at_index ( index ) ; buttonActor . visible = true ; } break ; } } if ( index > - 1 ) continue ; } else { let index = - 1 ; for ( let i = 0 ; i < this . _taskBar . length ; i ++ ) { if ( this . _taskBar [ i ] . metaWin == metaWin ) { index = i ; if ( this . _taskBarBox ) { let buttonActor = this . _taskBarBox . get_child_at_index ( index ) ; buttonActor . visible = false ; } break ; } } } } this . _updateWindowCount ( ) ; }
windows visible on all workspaces are moved to active workspace
windows visible on all workspaces are moved to active workspace
// Show taskbar icon if already present // Hide taskbar icon // Update window count