🪲 Fix some GNOME 3.36 issues

This commit is contained in:
Simon Schneegans
2022-01-27 05:31:38 +01:00
parent bf95e349da
commit f5e58b100f
+8 -6
View File
@@ -85,17 +85,19 @@ class Extension {
this._origDialogTime = imports.ui.windowManager.DIALOG_DESTROY_WINDOW_ANIMATION_TIME; this._origDialogTime = imports.ui.windowManager.DIALOG_DESTROY_WINDOW_ANIMATION_TIME;
Workspace.prototype._addWindowClone = function(...params) { Workspace.prototype._addWindowClone = function(...params) {
const result = extensionThis._origAddWindowClone.apply(this, params); const result = extensionThis._origAddWindowClone.apply(this, params);
const realWindow = params[0].get_compositor_private();
let clone; let realWindow, clone;
if (utils.shellVersionIs(3, 36)) { if (utils.shellVersionIs(3, 36)) {
clone = result[0]; clone = result[0];
realWindow = clone.realWindow;
} else if (utils.shellVersionIs(3, 38)) { } else if (utils.shellVersionIs(3, 38)) {
clone = result._windowContainer; clone = result._windowContainer;
realWindow = params[0].get_compositor_private();
} else { } else {
clone = result.window_container; clone = result.window_container;
realWindow = params[0].get_compositor_private();
} }
const xID = realWindow.connect('notify::scale-x', () => { const xID = realWindow.connect('notify::scale-x', () => {