[gnome-shell] windowManager: Clean up starting of size-change animations a bit
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowManager: Clean up starting of size-change animations a bit
- Date: Mon, 15 Jun 2020 13:20:52 +0000 (UTC)
commit d7185d71c6c5b51749cbd4e92b3730c60ee259f9
Author: Jonas Dreßler <verdre v0yd nl>
Date: Tue May 12 12:22:52 2020 +0200
windowManager: Clean up starting of size-change animations a bit
We can do without having two calls to shellwm.completed_size_change() in
there, so use an early return for all cases.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1251
js/ui/windowManager.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 3dacca2eca..e05c02305a 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1278,13 +1278,13 @@ var WindowManager = class {
}
_sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, _oldBufferRect) {
- let types = [Meta.WindowType.NORMAL];
- if (!this._shouldAnimateActor(actor, types)) {
- shellwm.completed_size_change(actor);
- return;
- }
+ const types = [Meta.WindowType.NORMAL];
+ const shouldAnimate =
+ this._shouldAnimateActor(actor, types) &&
+ oldFrameRect.width > 0 &&
+ oldFrameRect.height > 0;
- if (oldFrameRect.width > 0 && oldFrameRect.height > 0)
+ if (shouldAnimate)
this._prepareAnimationInfo(shellwm, actor, oldFrameRect, whichChange);
else
shellwm.completed_size_change(actor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]