gnome/extensions/workspaces-to-dock@passingthru67.gmail.com/intellihide.js
// Consider all windows visible on the current workspace.
Consider all windows visible on the current workspace.
Consider all windows visible on the current workspace .
_intellihideFilterInteresting(wa, edge) {
        let workspaceManager = global.workspace_manager;
        let currentWorkspace = workspaceManager.get_active_workspace_index();
        let meta_win = wa.get_meta_window();
        if (!meta_win) { 
            return false;
        }
        if (!this._handledWindowType(meta_win))
            return false;
        let wksp = meta_win.get_workspace();
        if (!wksp)
            return false;
        let wksp_index = wksp.index();
        if (this._settings.get_int('intellihide-option') == 1) {
            if (meta_win.get_window_type() != Meta.WindowType.POPUP_MENU) {
                if (this._focusedWin.get_wm_class() != meta_win.get_wm_class())
                    return false;
            }
        }
        if (this._settings.get_int('intellihide-option') == 2) {
            if (meta_win.get_window_type() != Meta.WindowType.POPUP_MENU) {
                if (this._focusedWin.get_wm_class() != meta_win.get_wm_class())
                    return false;
                if (this._focusedWin.get_window_type() == Meta.WindowType.NORMAL) {
                    if (meta_win.get_window_type() == Meta.WindowType.NORMAL) {
                        if (this._focusedWin != meta_win)
                            return false;
                    }
                }
                if (meta_win.get_window_type() == Meta.WindowType.TOOLTIP) {
                    let pointer = Gdk.Display.get_default().get_device_manager().get_client_pointer();
                    let [scr,x,y] = pointer.get_position();
                    let rect = this._focusedWin.get_frame_rect();
                    let overlap = ((x > rect.x) && (x < rect.x+rect.width) && (y > rect.y) && (y < rect.y+rect.height));
                    if (!overlap)
                        return false;
                }
            }
        }
        if (wksp_index == currentWorkspace && meta_win.showing_on_its_workspace()) {
            return true;
        } else {
            return false;
        }
    }
_intellihideFilterInteresting ( wa , edge ) { let workspaceManager = global . workspace_manager ; let currentWorkspace = workspaceManager . get_active_workspace_index ( ) ; let meta_win = wa . get_meta_window ( ) ; if ( ! meta_win ) { return false ; } if ( ! this . _handledWindowType ( meta_win ) ) return false ; let wksp = meta_win . get_workspace ( ) ; if ( ! wksp ) return false ; let wksp_index = wksp . index ( ) ; if ( this . _settings . get_int ( 'intellihide-option' ) == 1 ) { if ( meta_win . get_window_type ( ) != Meta . WindowType . POPUP_MENU ) { if ( this . _focusedWin . get_wm_class ( ) != meta_win . get_wm_class ( ) ) return false ; } } if ( this . _settings . get_int ( 'intellihide-option' ) == 2 ) { if ( meta_win . get_window_type ( ) != Meta . WindowType . POPUP_MENU ) { if ( this . _focusedWin . get_wm_class ( ) != meta_win . get_wm_class ( ) ) return false ; if ( this . _focusedWin . get_window_type ( ) == Meta . WindowType . NORMAL ) { if ( meta_win . get_window_type ( ) == Meta . WindowType . NORMAL ) { if ( this . _focusedWin != meta_win ) return false ; } } if ( meta_win . get_window_type ( ) == Meta . WindowType . TOOLTIP ) { let pointer = Gdk . Display . get_default ( ) . get_device_manager ( ) . get_client_pointer ( ) ; let [ scr , x , y ] = pointer . get_position ( ) ; let rect = this . _focusedWin . get_frame_rect ( ) ; let overlap = ( ( x > rect . x ) && ( x < rect . x + rect . width ) && ( y > rect . y ) && ( y < rect . y + rect . height ) ) ; if ( ! overlap ) return false ; } } } if ( wksp_index == currentWorkspace && meta_win . showing_on_its_workspace ( ) ) { return true ; } else { return false ; } }
Consider all windows visible on the current workspace.
Consider all windows visible on the current workspace .
//TODO michele: why? What does it mean? // check intellihide-option for windows of focused app // TEST1: ignore if meta_win is a popup window // TEST2: ignore if meta_win is not same class as the focused window (not same app) // check intellihide-option for top-level windows of  focused app // TEST1: ignore if meta_win is a popup window // TEST2: ignore if meta_win is not same class as the focused window (not same app) // same app .. but is it top-level window? // TEST3: ignore if meta_win is not the focused window and both are normal windows // TEST4: ignore if meta_win is tooltip but mouse pointer is not over focused window