[gnome-shell] workspace: Unbreak reposition animation
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Unbreak reposition animation
- Date: Sun, 14 Jun 2020 21:31:40 +0000 (UTC)
commit b2c35e4fb0fdf0d0c692e3eee0aa18547f05a8c2
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Jun 14 01:02:52 2020 +0200
workspace: Unbreak reposition animation
Commit 1ea22a5281c broke the window reposition animation when it
based the ::size-changed signal on the layout manager's bounding box
instead of the MetaWindow::size-changed signal.
That's happening because of the combination of:
1. we adjust to window size changes immediately without animations
2. closing a window triggers a change to a 0x0 bounding box which
is not treated as a size change
Fix this by addressing the 2nd factor, and don't treat a change to
a 0x0 bounding box as size change.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2901
js/ui/workspace.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 3367f4d8d9..9d8f8db7a2 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -236,7 +236,11 @@ var WindowClone = GObject.registerClass({
this._stackAbove = null;
this._windowContainer.layout_manager.connect(
- 'notify::bounding-box', () => this.emit('size-changed'));
+ 'notify::bounding-box', layout => {
+ // A bounding box of 0x0 means all windows were removed
+ if (layout.bounding_box.get_area() > 0)
+ this.emit('size-changed');
+ });
this._windowDestroyId =
this.realWindow.connect('destroy', () => this.destroy());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]