🪲 Fix some GNOME 3.36 issues
This commit is contained in:
@@ -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
|
// 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.
|
// 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
|
// The parameter 'forOpening' is set to true if this is called for a window-open
|
||||||
// window-close transition it is set to false. The modes can be set to any value from
|
// transition, for a window-close transition it is set to false. The modes can be set to
|
||||||
// here: https://gjs-docs.gnome.org/clutter8~8_api/clutter.animationmode. This also
|
// any value from here: https://gjs-docs.gnome.org/clutter8~8_api/clutter.animationmode.
|
||||||
// determines how the uProgress uniform value will progress in the shader.
|
// 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.
|
// For this effect, windows should neither be scaled nor faded.
|
||||||
static tweakTransition(actor, settings, forOpening) {
|
static tweakTransition(actor, settings, forOpening) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
+20
-17
@@ -100,22 +100,26 @@ class Extension {
|
|||||||
realWindow = params[0].get_compositor_private();
|
realWindow = params[0].get_compositor_private();
|
||||||
}
|
}
|
||||||
|
|
||||||
const xID = realWindow.connect('notify::scale-x', () => {
|
// Syncing the real window's scale with the scale of its clone only works on GNOME
|
||||||
if (realWindow.scale_x > 0) {
|
// Shell 3.38+. So effects cannot scale windows in the overview of GNOME 3.36...
|
||||||
clone.scale_x = realWindow.scale_x;
|
if (utils.shellVersionIsAtLeast(3, 38)) {
|
||||||
}
|
const xID = realWindow.connect('notify::scale-x', () => {
|
||||||
});
|
if (realWindow.scale_x > 0) {
|
||||||
|
clone.scale_x = realWindow.scale_x;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const yID = realWindow.connect('notify::scale-y', () => {
|
const yID = realWindow.connect('notify::scale-y', () => {
|
||||||
if (realWindow.scale_y > 0) {
|
if (realWindow.scale_y > 0) {
|
||||||
clone.scale_y = realWindow.scale_y;
|
clone.scale_y = realWindow.scale_y;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
clone.connect('destroy', () => {
|
clone.connect('destroy', () => {
|
||||||
realWindow.disconnect(xID);
|
realWindow.disconnect(xID);
|
||||||
realWindow.disconnect(yID);
|
realWindow.disconnect(yID);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// On GNOME 3.36, the window clone's 'destroy' handler only calls _removeWindowClone
|
// 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
|
// 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
|
// This class is only available in GNOME Shell 3.38+. So no overlay-hiding on
|
||||||
// GNOME Shell 3.36, but this is not used by any effect available there anyways for
|
// GNOME Shell 3.36 for now.
|
||||||
// now...
|
|
||||||
if (WindowPreview) {
|
if (WindowPreview) {
|
||||||
this._origDeleteAll = WindowPreview.prototype._deleteAll;
|
this._origDeleteAll = WindowPreview.prototype._deleteAll;
|
||||||
this._origRestack = WindowPreview.prototype._restack;
|
this._origRestack = WindowPreview.prototype._restack;
|
||||||
|
|||||||
Reference in New Issue
Block a user