Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 458731e391 | |||
| 5c0d6afddc | |||
| 69bec85d76 | |||
| 3d9b0b7560 | |||
| e0f1e13e9c | |||
| b8db5daa12 | |||
| c21313dd34 | |||
| 0c0547f4dd | |||
| 6c73574edc | |||
| afae41694c |
+10
-1
@@ -1,8 +1,17 @@
|
|||||||
# Changelog of the Burn-My-Windows Extension
|
# Changelog of the Burn-My-Windows Extension
|
||||||
|
|
||||||
|
## [Burn My Window 9](https://github.com/schneegans/Burn-My-Windows/releases/tag/v9)
|
||||||
|
|
||||||
|
**Release Date:** 2022-01-18
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
* Improved compatibility with [Show Application View When Workspace Empty ](https://extensions.gnome.org/extension/2036/show-application-view-when-workspace-empty/) (#54).
|
||||||
|
* Fixed a crash which happened when the window-close icon in the overview was clicked twice (#49).
|
||||||
|
|
||||||
## [Burn My Window 8](https://github.com/schneegans/Burn-My-Windows/releases/tag/v8)
|
## [Burn My Window 8](https://github.com/schneegans/Burn-My-Windows/releases/tag/v8)
|
||||||
|
|
||||||
**Release Date:** TBD
|
**Release Date:** 2022-01-17
|
||||||
|
|
||||||
#### New Features
|
#### New Features
|
||||||
|
|
||||||
|
|||||||
+52
-6
@@ -15,9 +15,16 @@
|
|||||||
|
|
||||||
const {Clutter, Gio, Meta} = imports.gi;
|
const {Clutter, Gio, Meta} = imports.gi;
|
||||||
|
|
||||||
const Workspace = imports.ui.workspace.Workspace;
|
const Workspace = imports.ui.workspace.Workspace;
|
||||||
const WindowManager = imports.ui.windowManager.WindowManager;
|
const WindowManager = imports.ui.windowManager.WindowManager;
|
||||||
const WINDOW_REPOSITIONING_DELAY = imports.ui.workspace.WINDOW_REPOSITIONING_DELAY;
|
|
||||||
|
// The WindowPreview class is only available on GNOME Shell 3.38+;
|
||||||
|
let WindowPreview = null;
|
||||||
|
try {
|
||||||
|
WindowPreview = imports.ui.windowPreview.WindowPreview;
|
||||||
|
} catch (error) {
|
||||||
|
// Nothing to be done, we are on GNOME Shell 3.36.
|
||||||
|
}
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||||
@@ -65,10 +72,26 @@ class Extension {
|
|||||||
this._origAddWindowClone = Workspace.prototype._addWindowClone;
|
this._origAddWindowClone = Workspace.prototype._addWindowClone;
|
||||||
this._origShouldAnimateActor = WindowManager.prototype._shouldAnimateActor;
|
this._origShouldAnimateActor = WindowManager.prototype._shouldAnimateActor;
|
||||||
|
|
||||||
|
// We will also override these animation times.
|
||||||
|
this._origWindowTime = imports.ui.windowManager.DESTROY_WINDOW_ANIMATION_TIME;
|
||||||
|
this._origDialogTime = imports.ui.windowManager.DIALOG_DESTROY_WINDOW_ANIMATION_TIME;
|
||||||
|
|
||||||
// We will use extensionThis to refer to the extension inside the patched methods of
|
// We will use extensionThis to refer to the extension inside the patched methods of
|
||||||
// the WorkspacesView.
|
// the WorkspacesView.
|
||||||
const extensionThis = this;
|
const extensionThis = this;
|
||||||
|
|
||||||
|
// Do not attempt to close windows twice. Due to the animation in the overview, the
|
||||||
|
// close button can be clicked twice which normally would lead to a crash.
|
||||||
|
if (WindowPreview) {
|
||||||
|
this._origDeleteAll = WindowPreview.prototype._deleteAll;
|
||||||
|
|
||||||
|
WindowPreview.prototype._deleteAll = function() {
|
||||||
|
if (!this._closeRequested) {
|
||||||
|
extensionThis._origDeleteAll.apply(this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// 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 the
|
// but not _doRemoveWindow. The latter is required to trigger the repositioning of the
|
||||||
// overview window layout. Therefore we call this method in addition.
|
// overview window layout. Therefore we call this method in addition.
|
||||||
@@ -133,9 +156,11 @@ class Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We do nothing if a dialog got closed and we should not burn them.
|
// We do nothing if a dialog got closed and we should not burn them.
|
||||||
if (!this._settings.get_boolean('destroy-dialogs') &&
|
const isDialogWindow =
|
||||||
(actor.meta_window.window_type == Meta.WindowType.MODAL_DIALOG ||
|
actor.meta_window.window_type == Meta.WindowType.MODAL_DIALOG ||
|
||||||
actor.meta_window.window_type == Meta.WindowType.DIALOG)) {
|
actor.meta_window.window_type == Meta.WindowType.DIALOG;
|
||||||
|
|
||||||
|
if (!this._settings.get_boolean('destroy-dialogs') && isDialogWindow) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,6 +194,20 @@ class Extension {
|
|||||||
shader.set_uniform_value('uSizeY', actor.height);
|
shader.set_uniform_value('uSizeY', actor.height);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The code below is not necessary for Burn-My-Windows to function. However, there
|
||||||
|
// are some extensions such as "Show Application View When Workspace Empty"
|
||||||
|
// https://extensions.gnome.org/extension/2036/show-application-view-when-workspace-empty/
|
||||||
|
// which do something *after* a window was closed. As the window-close animation
|
||||||
|
// duration depends on the used effect, this may vary each time a window is closed.
|
||||||
|
// We set the currently used time here, so that others can get an idea how long this
|
||||||
|
// will take...
|
||||||
|
const duration = transition.get_duration();
|
||||||
|
if (isDialogWindow) {
|
||||||
|
imports.ui.windowManager.DIALOG_DESTROY_WINDOW_ANIMATION_TIME = duration;
|
||||||
|
} else {
|
||||||
|
imports.ui.windowManager.DESTROY_WINDOW_ANIMATION_TIME = duration;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,6 +226,13 @@ class Extension {
|
|||||||
Workspace.prototype._addWindowClone = this._origAddWindowClone;
|
Workspace.prototype._addWindowClone = this._origAddWindowClone;
|
||||||
WindowManager.prototype._shouldAnimateActor = this._origShouldAnimateActor;
|
WindowManager.prototype._shouldAnimateActor = this._origShouldAnimateActor;
|
||||||
|
|
||||||
|
imports.ui.windowManager.DESTROY_WINDOW_ANIMATION_TIME = this._origWindowTime;
|
||||||
|
imports.ui.windowManager.DIALOG_DESTROY_WINDOW_ANIMATION_TIME = this._origDialogTime;
|
||||||
|
|
||||||
|
if (WindowPreview) {
|
||||||
|
WindowPreview.prototype._deleteAll = this._origDeleteAll;
|
||||||
|
}
|
||||||
|
|
||||||
this._settings = null;
|
this._settings = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,5 +11,5 @@
|
|||||||
"41"
|
"41"
|
||||||
],
|
],
|
||||||
"url": "https://github.com/Schneegans/Burn-My-Windows",
|
"url": "https://github.com/Schneegans/Burn-My-Windows",
|
||||||
"version": 8
|
"version": 9
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user