2025-02-09 23:08:39 +01:00
|
|
|
/**
|
2025-02-09 23:10:52 +01:00
|
|
|
* V-Shell (Vertical Workspaces)
|
2025-02-09 23:08:39 +01:00
|
|
|
* overview.js
|
|
|
|
*
|
|
|
|
* @author GdH <G-dH@github.com>
|
|
|
|
* @copyright 2022 - 2023
|
|
|
|
* @license GPL-3.0
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const Overview = imports.ui.overview;
|
|
|
|
|
|
|
|
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
2025-02-09 23:10:52 +01:00
|
|
|
const _Util = Me.imports.lib.util;
|
2025-02-09 23:08:39 +01:00
|
|
|
|
|
|
|
let _overrides;
|
|
|
|
let opt;
|
|
|
|
|
|
|
|
function update(reset = false) {
|
2025-02-09 23:10:52 +01:00
|
|
|
if (_overrides)
|
2025-02-09 23:08:39 +01:00
|
|
|
_overrides.removeAll();
|
2025-02-09 23:10:52 +01:00
|
|
|
|
2025-02-09 23:08:39 +01:00
|
|
|
|
|
|
|
if (reset) {
|
|
|
|
_overrides = null;
|
|
|
|
opt = null;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2025-02-09 23:10:52 +01:00
|
|
|
opt = Me.imports.lib.settings.opt;
|
2025-02-09 23:08:39 +01:00
|
|
|
_overrides = new _Util.Overrides();
|
|
|
|
|
|
|
|
_overrides.addOverride('Overview', Overview.Overview.prototype, OverviewCommon);
|
|
|
|
}
|
|
|
|
|
|
|
|
const OverviewCommon = {
|
2025-02-09 23:10:52 +01:00
|
|
|
_showDone() {
|
2025-02-09 23:08:39 +01:00
|
|
|
this._animationInProgress = false;
|
|
|
|
this._coverPane.hide();
|
2025-02-09 23:10:52 +01:00
|
|
|
|
2025-02-09 23:08:39 +01:00
|
|
|
this.emit('shown');
|
|
|
|
// Handle any calls to hide* while we were showing
|
|
|
|
if (!this._shown)
|
|
|
|
this._animateNotVisible();
|
2025-02-09 23:10:52 +01:00
|
|
|
|
2025-02-09 23:08:39 +01:00
|
|
|
this._syncGrab();
|
|
|
|
|
|
|
|
// if user activates overview during startup animation, transition needs to be shifted to the state 2 here
|
|
|
|
const controls = this._overview._controls;
|
|
|
|
if (controls._searchController._searchActive && controls._stateAdjustment.value === 1) {
|
2025-02-09 23:10:52 +01:00
|
|
|
if (opt.SEARCH_VIEW_ANIMATION)
|
2025-02-09 23:08:39 +01:00
|
|
|
controls._onSearchChanged();
|
2025-02-09 23:10:52 +01:00
|
|
|
else if (!opt.OVERVIEW_MODE2)
|
2025-02-09 23:08:39 +01:00
|
|
|
controls._stateAdjustment.value = 2;
|
|
|
|
}
|
2025-02-09 23:10:52 +01:00
|
|
|
},
|
|
|
|
};
|