gnome/extensions/workspaces-to-dock@passingthru67.gmail.com/intellihide.js
// handler for when panel focus is grabbed (GS 38+)
handler for when panel focus is grabbed (GS 38+)
handler for when panel focus is grabbed ( GS 38 + )
_onPanelFocusGrabbed(source, event) {
        if (this._settings.get_boolean('ignore-top-panel')) return;
        let idx = source._grabStack.length - 1;
        let focusedActor = source._grabStack[idx].actor;
        let [rx, ry] = focusedActor.get_transformed_position();
        let [rw, rh] = focusedActor.get_size();
        let [dx, dy] = this._dock.actor.get_position();
        let [dw, dh] = this._dock.actor.get_size();
        let [dcx, dcy] = this._dock.actor.get_transformed_position();
        let [dcw, dch] = this._dock.actor.get_size();
        if (this._dock._isHorizontal) {
            dx = dcx;
            dw = dcw;
            let intellihideAction = this._settings.get_enum('intellihide-action');
            if (intellihideAction == IntellihideAction.SHOW_PARTIAL || intellihideAction == IntellihideAction.SHOW_PARTIAL_FIXED) {
                if (this._dock._slider.partialSlideoutSize)
                    dh = this._dock._slider.partialSlideoutSize;
            }
        } else {
            dy = dcy;
            dh = dch;
            let intellihideAction = this._settings.get_enum('intellihide-action');
            if (intellihideAction == intellihideAction.SHOW_PARTIAL || intellihideAction == IntellihideAction.SHOW_PARTIAL_FIXED) {
                if (this._dock._slider.partialSlideoutSize)
                    dw = this._dock._slider.partialSlideoutSize;
            }
        }
        let test;
        if (this._dock._position == St.Side.LEFT || this._dock._position == St.Side.TOP) {
            test = (rx < dx + dw) && (rx + rw > dx) && (ry < dy + dh) && (ry + rh > dy);
        } else if (this._dock._position == St.Side.RIGHT) {
            test = (rx < dx) && (rx + rw > dx - dw) && (ry < dy + dh) && (ry + rh > dy);
        } else if (this._dock._position == St.Side.BOTTOM) {
            test = (rx < dx + dw) && (rx + rw > dx) && (ry + rh > dy - dh) && (ry < dy);
        }
        if (test) {
            this._disableIntellihide = true;
            this._hide();
        }
    }
_onPanelFocusGrabbed ( source , event ) { if ( this . _settings . get_boolean ( 'ignore-top-panel' ) ) return ; let idx = source . _grabStack . length - 1 ; let focusedActor = source . _grabStack [ idx ] . actor ; let [ rx , ry ] = focusedActor . get_transformed_position ( ) ; let [ rw , rh ] = focusedActor . get_size ( ) ; let [ dx , dy ] = this . _dock . actor . get_position ( ) ; let [ dw , dh ] = this . _dock . actor . get_size ( ) ; let [ dcx , dcy ] = this . _dock . actor . get_transformed_position ( ) ; let [ dcw , dch ] = this . _dock . actor . get_size ( ) ; if ( this . _dock . _isHorizontal ) { dx = dcx ; dw = dcw ; let intellihideAction = this . _settings . get_enum ( 'intellihide-action' ) ; if ( intellihideAction == IntellihideAction . SHOW_PARTIAL || intellihideAction == IntellihideAction . SHOW_PARTIAL_FIXED ) { if ( this . _dock . _slider . partialSlideoutSize ) dh = this . _dock . _slider . partialSlideoutSize ; } } else { dy = dcy ; dh = dch ; let intellihideAction = this . _settings . get_enum ( 'intellihide-action' ) ; if ( intellihideAction == intellihideAction . SHOW_PARTIAL || intellihideAction == IntellihideAction . SHOW_PARTIAL_FIXED ) { if ( this . _dock . _slider . partialSlideoutSize ) dw = this . _dock . _slider . partialSlideoutSize ; } } let test ; if ( this . _dock . _position == St . Side . LEFT || this . _dock . _position == St . Side . TOP ) { test = ( rx < dx + dw ) && ( rx + rw > dx ) && ( ry < dy + dh ) && ( ry + rh > dy ) ; } else if ( this . _dock . _position == St . Side . RIGHT ) { test = ( rx < dx ) && ( rx + rw > dx - dw ) && ( ry < dy + dh ) && ( ry + rh > dy ) ; } else if ( this . _dock . _position == St . Side . BOTTOM ) { test = ( rx < dx + dw ) && ( rx + rw > dx ) && ( ry + rh > dy - dh ) && ( ry < dy ) ; } if ( test ) { this . _disableIntellihide = true ; this . _hide ( ) ; } }
handler for when panel focus is grabbed (GS 38+)
handler for when panel focus is grabbed ( GS 38 + )