🪲 Fix some GNOME 3.36 issues

This commit is contained in:
Simon Schneegans
2022-01-27 05:46:10 +01:00
parent f5e58b100f
commit c107083cde
2 changed files with 25 additions and 21 deletions
+5 -4
View File
@@ -152,10 +152,11 @@ var SimpleFade = class SimpleFade {
// This is also called from extension.js. It is used to tweak a window's open / close
// transitions - usually windows are faded in / out and scaled up / down by GNOME Shell.
// forOpening is set to true if this is called for a window-open transition, for a
// window-close transition it is set to false. The modes can be set to any value from
// here: https://gjs-docs.gnome.org/clutter8~8_api/clutter.animationmode. This also
// determines how the uProgress uniform value will progress in the shader.
// The parameter 'forOpening' is set to true if this is called for a window-open
// transition, for a window-close transition it is set to false. The modes can be set to
// any value from here: https://gjs-docs.gnome.org/clutter8~8_api/clutter.animationmode.
// This also determines how the uProgress uniform value will progress in the shader.
// Tweaking the actor's scale during the transition only works properly for GNOME 3.38+.
// For this effect, windows should neither be scaled nor faded.
static tweakTransition(actor, settings, forOpening) {
return {
+6 -3
View File
@@ -100,6 +100,9 @@ class Extension {
realWindow = params[0].get_compositor_private();
}
// Syncing the real window's scale with the scale of its clone only works on GNOME
// Shell 3.38+. So effects cannot scale windows in the overview of GNOME 3.36...
if (utils.shellVersionIsAtLeast(3, 38)) {
const xID = realWindow.connect('notify::scale-x', () => {
if (realWindow.scale_x > 0) {
clone.scale_x = realWindow.scale_x;
@@ -116,6 +119,7 @@ class Extension {
realWindow.disconnect(xID);
realWindow.disconnect(yID);
});
}
// On GNOME 3.36, the window clone's 'destroy' handler only calls _removeWindowClone
// but not _doRemoveWindow. The latter is required to trigger the repositioning of
@@ -155,9 +159,8 @@ class Extension {
// This class is only available in GNOME Shell 3.38+. So no transition tweaking in
// GNOME Shell 3.36, but this is not used by any effect available there anyways for
// now...
// This class is only available in GNOME Shell 3.38+. So no overlay-hiding on
// GNOME Shell 3.36 for now.
if (WindowPreview) {
this._origDeleteAll = WindowPreview.prototype._deleteAll;
this._origRestack = WindowPreview.prototype._restack;