mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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
1 changed files with 6 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue