overview: Remove desktop fade logic
It existed to fade out/in `nautilus-desktop` for the overview, but it only ever worked for X11 sessions (`Meta.WindowType.DESKTOP`) and `nautilus-desktop` no longer exists anyway. While I had suggested extending it in the past (!1395), that work was never finished and since then the DING extension has implemented its own visibility toggling. There seems little value in keeping the old fade logic around in gnome-shell. Removing it actually fixes a bug with DING (https://launchpad.net/bugs/1965072). Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2244>
This commit is contained in:
parent
c5f6482705
commit
2127222b39
@ -1,5 +1,5 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported Overview */
|
/* exported Overview, ANIMATION_TIME */
|
||||||
|
|
||||||
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
|
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
@ -145,9 +145,6 @@ var Overview = class {
|
|||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._desktopFade = new St.Widget();
|
|
||||||
Main.layoutManager.overviewGroup.add_child(this._desktopFade);
|
|
||||||
|
|
||||||
this._activationTime = 0;
|
this._activationTime = 0;
|
||||||
|
|
||||||
this._visible = false; // animating to overview, in overview, animating out
|
this._visible = false; // animating to overview, in overview, animating out
|
||||||
@ -325,24 +322,6 @@ var Overview = class {
|
|||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_getDesktopClone() {
|
|
||||||
let windows = global.get_window_actors().filter(
|
|
||||||
w => w.meta_window.get_window_type() === Meta.WindowType.DESKTOP);
|
|
||||||
if (windows.length == 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
let window = windows[0];
|
|
||||||
const clone = new Clutter.Clone({
|
|
||||||
source: window,
|
|
||||||
x: window.x,
|
|
||||||
y: window.y,
|
|
||||||
});
|
|
||||||
clone.source.connect('destroy', () => {
|
|
||||||
clone.destroy();
|
|
||||||
});
|
|
||||||
return clone;
|
|
||||||
}
|
|
||||||
|
|
||||||
_relayout() {
|
_relayout() {
|
||||||
// To avoid updating the position and size of the workspaces
|
// To avoid updating the position and size of the workspaces
|
||||||
// we just hide the overview. The positions will be updated
|
// we just hide the overview. The positions will be updated
|
||||||
@ -442,34 +421,6 @@ var Overview = class {
|
|||||||
this._overview.searchEntry.grab_key_focus();
|
this._overview.searchEntry.grab_key_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
fadeInDesktop() {
|
|
||||||
this._desktopFade.opacity = 0;
|
|
||||||
this._desktopFade.show();
|
|
||||||
this._desktopFade.ease({
|
|
||||||
opacity: 255,
|
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
|
||||||
duration: ANIMATION_TIME,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
fadeOutDesktop() {
|
|
||||||
if (!this._desktopFade.get_n_children()) {
|
|
||||||
let clone = this._getDesktopClone();
|
|
||||||
if (!clone)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._desktopFade.add_child(clone);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._desktopFade.opacity = 255;
|
|
||||||
this._desktopFade.show();
|
|
||||||
this._desktopFade.ease({
|
|
||||||
opacity: 0,
|
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
|
||||||
duration: ANIMATION_TIME,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Checks if the Activities button is currently sensitive to
|
// Checks if the Activities button is currently sensitive to
|
||||||
// clicks. The first call to this function within the
|
// clicks. The first call to this function within the
|
||||||
// OVERVIEW_ACTIVATION_TIMEOUT time of the hot corner being
|
// OVERVIEW_ACTIVATION_TIMEOUT time of the hot corner being
|
||||||
@ -561,7 +512,6 @@ var Overview = class {
|
|||||||
|
|
||||||
_showDone() {
|
_showDone() {
|
||||||
this._animationInProgress = false;
|
this._animationInProgress = false;
|
||||||
this._desktopFade.hide();
|
|
||||||
this._coverPane.hide();
|
this._coverPane.hide();
|
||||||
|
|
||||||
this.emit('shown');
|
this.emit('shown');
|
||||||
@ -617,7 +567,6 @@ var Overview = class {
|
|||||||
// Re-enable unredirection
|
// Re-enable unredirection
|
||||||
Meta.enable_unredirect_for_display(global.display);
|
Meta.enable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
this._desktopFade.hide();
|
|
||||||
this._coverPane.hide();
|
this._coverPane.hide();
|
||||||
|
|
||||||
this._visible = false;
|
this._visible = false;
|
||||||
|
@ -708,8 +708,6 @@ class ControlsManager extends St.Widget {
|
|||||||
|
|
||||||
this._searchController.prepareToEnterOverview();
|
this._searchController.prepareToEnterOverview();
|
||||||
this._workspacesDisplay.prepareToEnterOverview();
|
this._workspacesDisplay.prepareToEnterOverview();
|
||||||
if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
|
|
||||||
Main.overview.fadeOutDesktop();
|
|
||||||
|
|
||||||
this._stateAdjustment.value = ControlsState.HIDDEN;
|
this._stateAdjustment.value = ControlsState.HIDDEN;
|
||||||
this._stateAdjustment.ease(state, {
|
this._stateAdjustment.ease(state, {
|
||||||
@ -731,8 +729,6 @@ class ControlsManager extends St.Widget {
|
|||||||
this._ignoreShowAppsButtonToggle = true;
|
this._ignoreShowAppsButtonToggle = true;
|
||||||
|
|
||||||
this._workspacesDisplay.prepareToLeaveOverview();
|
this._workspacesDisplay.prepareToLeaveOverview();
|
||||||
if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
|
|
||||||
Main.overview.fadeInDesktop();
|
|
||||||
|
|
||||||
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
||||||
duration: Overview.ANIMATION_TIME,
|
duration: Overview.ANIMATION_TIME,
|
||||||
|
Loading…
Reference in New Issue
Block a user