gnome/extensions/workspaces-to-dock@passingthru67.gmail.com/dockedWorkspaces.js
// Update pressure barrier size (GS38+ only)
Update pressure barrier size (GS38+ only)
Update pressure barrier size ( GS38 + only )
_updateBarrier() {
        this._removeBarrier();
        if (this._pressureBarrier) {
            this._pressureBarrier._reset();
            this._pressureBarrier._isTriggered = false;
        }
        if (this.actor.visible && this._canUsePressure && this._settings.get_boolean('autohide')
                    && this._settings.get_boolean('require-pressure-to-show')
                    && !this._settings.get_boolean('dock-fixed')) {
            let x1, x2, y1, y2, direction;
            if(this._position==St.Side.LEFT){
                x1 = this._monitor.x;
                x2 = this._monitor.x;
                y1 = this.actor.y;
                y2 = this.actor.y + this.actor.height;
                direction = Meta.BarrierDirection.POSITIVE_X;
            } else if(this._position==St.Side.RIGHT) {
                x1 = this._monitor.x + this._monitor.width;
                x2 = this._monitor.x + this._monitor.width;
                y1 = this.actor.y;
                y2 = this.actor.y + this.actor.height;
                direction = Meta.BarrierDirection.NEGATIVE_X;
            } else if(this._position==St.Side.TOP) {
                let hotCornerPadding = 1;
                x1 = this.actor.x + hotCornerPadding;
                x2 = this.actor.x + hotCornerPadding + this.actor.width;
                y1 = this._monitor.y;
                y2 = this._monitor.y;
                direction = Meta.BarrierDirection.POSITIVE_Y;
            } else if (this._position==St.Side.BOTTOM) {
                x1 = this.actor.x;
                x2 = this.actor.x + this.actor.width;
                y1 = this._monitor.y + this._monitor.height;
                y2 = this._monitor.y + this._monitor.height;
                direction = Meta.BarrierDirection.NEGATIVE_Y;
            }
            this._barrier = new Meta.Barrier({display: global.display,
                                x1: x1, x2: x2,
                                y1: y1, y2: y2,
                                directions: direction});
            if (this._pressureBarrier) {
                this._pressureBarrier.addBarrier(this._barrier);
            }
        }
        if (!this._isHovering() && this._dockState != DockState.SHOWN) {
            this._pressureSensed = false;
            this._updateTriggerWidth();
        }
    }
_updateBarrier ( ) { this . _removeBarrier ( ) ; if ( this . _pressureBarrier ) { this . _pressureBarrier . _reset ( ) ; this . _pressureBarrier . _isTriggered = false ; } if ( this . actor . visible && this . _canUsePressure && this . _settings . get_boolean ( 'autohide' ) && this . _settings . get_boolean ( 'require-pressure-to-show' ) && ! this . _settings . get_boolean ( 'dock-fixed' ) ) { let x1 , x2 , y1 , y2 , direction ; if ( this . _position == St . Side . LEFT ) { x1 = this . _monitor . x ; x2 = this . _monitor . x ; y1 = this . actor . y ; y2 = this . actor . y + this . actor . height ; direction = Meta . BarrierDirection . POSITIVE_X ; } else if ( this . _position == St . Side . RIGHT ) { x1 = this . _monitor . x + this . _monitor . width ; x2 = this . _monitor . x + this . _monitor . width ; y1 = this . actor . y ; y2 = this . actor . y + this . actor . height ; direction = Meta . BarrierDirection . NEGATIVE_X ; } else if ( this . _position == St . Side . TOP ) { let hotCornerPadding = 1 ; x1 = this . actor . x + hotCornerPadding ; x2 = this . actor . x + hotCornerPadding + this . actor . width ; y1 = this . _monitor . y ; y2 = this . _monitor . y ; direction = Meta . BarrierDirection . POSITIVE_Y ; } else if ( this . _position == St . Side . BOTTOM ) { x1 = this . actor . x ; x2 = this . actor . x + this . actor . width ; y1 = this . _monitor . y + this . _monitor . height ; y2 = this . _monitor . y + this . _monitor . height ; direction = Meta . BarrierDirection . NEGATIVE_Y ; } this . _barrier = new Meta . Barrier ( { display : global . display , x1 : x1 , x2 : x2 , y1 : y1 , y2 : y2 , directions : direction } ) ; if ( this . _pressureBarrier ) { this . _pressureBarrier . addBarrier ( this . _barrier ) ; } } if ( ! this . _isHovering ( ) && this . _dockState != DockState . SHOWN ) { this . _pressureSensed = false ; this . _updateTriggerWidth ( ) ; } }
Update pressure barrier size (GS38+ only)
Update pressure barrier size ( GS38 + only )
// Remove existing barrier // Manually reset pressure barrier // This is necessary because we remove the pressure barrier when it is triggered to show the dock // Create new barrier // Note: dock in fixed possition doesn't use pressure barrier // Reset pressureSensed flag