gnome/extensions/dash-to-dock@micxgx.gmail.com/intellihide.js
// Optionally skip windows of other applications
Optionally skip windows of other applications
Optionally skip windows of other applications
_intellihideFilterInteresting(wa) {
        let meta_win = wa.get_meta_window();
        if (!this._handledWindow(wa))
            return false;
        let currentWorkspace = global.workspace_manager.get_active_workspace_index();
        let wksp = meta_win.get_workspace();
        let wksp_index = wksp.index();
        switch (Docking.DockManager.settings.get_enum('intellihide-mode')) {
            case IntellihideMode.ALL_WINDOWS:
                break;
            case IntellihideMode.FOCUS_APPLICATION_WINDOWS:
                if (this._focusApp) {
                    if (meta_win.get_wm_class() == 'DropDownTerminalWindow')
                        return true;
                    let currentApp = this._tracker.get_window_app(meta_win);
                    let focusWindow = global.display.get_focus_window()
                    if((currentApp != this._focusApp) && (currentApp != this._topApp)
                        && !((focusWindow && focusWindow.maximized_vertically && !focusWindow.maximized_horizontally)
                              && (meta_win.maximized_vertically && !meta_win.maximized_horizontally)
                              && meta_win.get_monitor() == focusWindow.get_monitor())
                        && !meta_win.is_above())
                        return false;
                }
                break;
            case IntellihideMode.MAXIMIZED_WINDOWS:
                if (!meta_win.maximized_vertically && !meta_win.maximized_horizontally)
                    return false;
                break;
        }
        if ( wksp_index == currentWorkspace && meta_win.showing_on_its_workspace() )
            return true;
        else
            return false;
    }
_intellihideFilterInteresting ( wa ) { let meta_win = wa . get_meta_window ( ) ; if ( ! this . _handledWindow ( wa ) ) return false ; let currentWorkspace = global . workspace_manager . get_active_workspace_index ( ) ; let wksp = meta_win . get_workspace ( ) ; let wksp_index = wksp . index ( ) ; switch ( Docking . DockManager . settings . get_enum ( 'intellihide-mode' ) ) { case IntellihideMode . ALL_WINDOWS : break ; case IntellihideMode . FOCUS_APPLICATION_WINDOWS : if ( this . _focusApp ) { if ( meta_win . get_wm_class ( ) == 'DropDownTerminalWindow' ) return true ; let currentApp = this . _tracker . get_window_app ( meta_win ) ; let focusWindow = global . display . get_focus_window ( ) if ( ( currentApp != this . _focusApp ) && ( currentApp != this . _topApp ) && ! ( ( focusWindow && focusWindow . maximized_vertically && ! focusWindow . maximized_horizontally ) && ( meta_win . maximized_vertically && ! meta_win . maximized_horizontally ) && meta_win . get_monitor ( ) == focusWindow . get_monitor ( ) ) && ! meta_win . is_above ( ) ) return false ; } break ; case IntellihideMode . MAXIMIZED_WINDOWS : if ( ! meta_win . maximized_vertically && ! meta_win . maximized_horizontally ) return false ; break ; } if ( wksp_index == currentWorkspace && meta_win . showing_on_its_workspace ( ) ) return true ; else return false ; }
Optionally skip windows of other applications
Optionally skip windows of other applications
// Depending on the intellihide mode, exclude non-relevent windows // Do nothing // Skip windows of other apps // The DropDownTerminal extension is not an application per se // so we match its window by wm class instead // Consider half maximized windows side by side // and windows which are alwayson top // Skip unmaximized windows