_showWorkspaceSwitcher(display, window, binding) {
        let workspaceManager = this.wsManager;

        if (!Main.sessionMode.hasWorkspaces)
            return;

        if (workspaceManager.n_workspaces == 1)
            return;

        if (binding.get_name) {
            binding = binding.get_name();
        }

        let [action,,, target] = binding.split('-');
        let newWs;
        let direction;

        if (action == 'move') {
            // "Moving" a window to another workspace doesn't make sense when
            // it cannot be unstuck, and is potentially confusing if a new
            // workspaces is added at the start/end
            if (window.is_always_on_all_workspaces() ||
                (Meta.prefs_get_workspaces_only_on_primary() &&
                    window.get_monitor() != Main.layoutManager.primaryIndex))
                return;
        }

        if (target == 'last') {
            direction = Meta.MotionDirection.DOWN;
            newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
        } else if (target !== undefined && isNaN(target)) {
            direction = Meta.MotionDirection[target.toUpperCase()];
            newWs = this._getTargetWorkspace(direction);
        } else if ((target > 0) && (target <= workspaceManager.n_workspaces)) {
            target--;
            newWs = workspaceManager.get_workspace_by_index(target);

            if (workspaceManager.get_active_workspace().index() > target)
                direction = Meta.MotionDirection.UP;
            else
                direction = Meta.MotionDirection.DOWN;
        }

        if (newWs !== undefined) {
            if (action == 'switch')
                this.wm.actionMoveWorkspace(newWs);
            else
                this.wm.actionMoveWindow(window, newWs);
        }

        this._showWorkspaceSwitcherPopup(false);
    }
/*
     * This is Main.wm._showWorkspaceSwitcher but without ignoring the UP and DOWN
     * directions and using the WorkspaceSwitcherPopup (with constructor arguments)
     * provided by this extension.
     */
This is Main.wm._showWorkspaceSwitcher but without ignoring the UP and DOWN
directions and using the WorkspaceSwitcherPopup (with constructor arguments)
provided by this extension.
This is Main . wm . _showWorkspaceSwitcher but without ignoring the UP and DOWN directions and using the WorkspaceSwitcherPopup ( with constructor arguments ) provided by this extension .
_showWorkspaceSwitcher(display, window, binding) {
        let workspaceManager = this.wsManager;
        if (!Main.sessionMode.hasWorkspaces)
            return;
        if (workspaceManager.n_workspaces == 1)
            return;
        if (binding.get_name) {
            binding = binding.get_name();
        }
        let [action,,, target] = binding.split('-');
        let newWs;
        let direction;
        if (action == 'move') {
            if (window.is_always_on_all_workspaces() ||
                (Meta.prefs_get_workspaces_only_on_primary() &&
                    window.get_monitor() != Main.layoutManager.primaryIndex))
                return;
        }
        if (target == 'last') {
            direction = Meta.MotionDirection.DOWN;
            newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
        } else if (target !== undefined && isNaN(target)) {
            direction = Meta.MotionDirection[target.toUpperCase()];
            newWs = this._getTargetWorkspace(direction);
        } else if ((target > 0) && (target <= workspaceManager.n_workspaces)) {
            target--;
            newWs = workspaceManager.get_workspace_by_index(target);
            if (workspaceManager.get_active_workspace().index() > target)
                direction = Meta.MotionDirection.UP;
            else
                direction = Meta.MotionDirection.DOWN;
        }
        if (newWs !== undefined) {
            if (action == 'switch')
                this.wm.actionMoveWorkspace(newWs);
            else
                this.wm.actionMoveWindow(window, newWs);
        }
        this._showWorkspaceSwitcherPopup(false);
    }
_showWorkspaceSwitcher ( display , window , binding ) { let workspaceManager = this . wsManager ; if ( ! Main . sessionMode . hasWorkspaces ) return ; if ( workspaceManager . n_workspaces == 1 ) return ; if ( binding . get_name ) { binding = binding . get_name ( ) ; } let [ action , , , target ] = binding . split ( '-' ) ; let newWs ; let direction ; if ( action == 'move' ) { if ( window . is_always_on_all_workspaces ( ) || ( Meta . prefs_get_workspaces_only_on_primary ( ) && window . get_monitor ( ) != Main . layoutManager . primaryIndex ) ) return ; } if ( target == 'last' ) { direction = Meta . MotionDirection . DOWN ; newWs = workspaceManager . get_workspace_by_index ( workspaceManager . n_workspaces - 1 ) ; } else if ( target !== undefined && isNaN ( target ) ) { direction = Meta . MotionDirection [ target . toUpperCase ( ) ] ; newWs = this . _getTargetWorkspace ( direction ) ; } else if ( ( target > 0 ) && ( target <= workspaceManager . n_workspaces ) ) { target -- ; newWs = workspaceManager . get_workspace_by_index ( target ) ; if ( workspaceManager . get_active_workspace ( ) . index ( ) > target ) direction = Meta . MotionDirection . UP ; else direction = Meta . MotionDirection . DOWN ; } if ( newWs !== undefined ) { if ( action == 'switch' ) this . wm . actionMoveWorkspace ( newWs ) ; else this . wm . actionMoveWindow ( window , newWs ) ; } this . _showWorkspaceSwitcherPopup ( false ) ; }
This is Main.wm._showWorkspaceSwitcher but without ignoring the UP and DOWN
 directions and using the WorkspaceSwitcherPopup (with constructor arguments)
 provided by this extension.
This is Main . wm . _showWorkspaceSwitcher but without ignoring the UP and DOWN directions and using the WorkspaceSwitcherPopup ( with constructor arguments ) provided by this extension .
// "Moving" a window to another workspace doesn't make sense when // it cannot be unstuck, and is potentially confusing if a new // workspaces is added at the start/end