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
This commit is contained in:
parent
522ecba180
commit
d7185d71c6
@ -1278,13 +1278,13 @@ var WindowManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, _oldBufferRect) {
|
_sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, _oldBufferRect) {
|
||||||
let types = [Meta.WindowType.NORMAL];
|
const types = [Meta.WindowType.NORMAL];
|
||||||
if (!this._shouldAnimateActor(actor, types)) {
|
const shouldAnimate =
|
||||||
shellwm.completed_size_change(actor);
|
this._shouldAnimateActor(actor, types) &&
|
||||||
return;
|
oldFrameRect.width > 0 &&
|
||||||
}
|
oldFrameRect.height > 0;
|
||||||
|
|
||||||
if (oldFrameRect.width > 0 && oldFrameRect.height > 0)
|
if (shouldAnimate)
|
||||||
this._prepareAnimationInfo(shellwm, actor, oldFrameRect, whichChange);
|
this._prepareAnimationInfo(shellwm, actor, oldFrameRect, whichChange);
|
||||||
else
|
else
|
||||||
shellwm.completed_size_change(actor);
|
shellwm.completed_size_change(actor);
|
||||||
|
Loading…
Reference in New Issue
Block a user