Skip to content

Commit

Permalink
Fix wayland missing onComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesg99 committed Mar 9, 2023
1 parent 294b223 commit b455394
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions appIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,6 @@ var TaskbarAppIcon = GObject.registerClass({
} else {
this._focusedDots = new St.DrawingArea(),
this._unfocusedDots = new St.DrawingArea();
this._focusedDots._tweeningToSize = null,
this._unfocusedDots._tweeningToSize = null;

this._focusedDots.connect('repaint', () => {
if (!this._dashItemContainer.animatingOut)
Expand Down Expand Up @@ -521,7 +519,6 @@ var TaskbarAppIcon = GObject.registerClass({
[, this._containerSize] = this._container[`get_preferred_${sizeProp}`](-1);

[this._focusedDots, this._unfocusedDots].forEach(d => {
d._tweeningToSize = null;
d.set_size(-1, -1);
d.x_expand = d.y_expand = false;

Expand Down Expand Up @@ -762,25 +759,23 @@ var TaskbarAppIcon = GObject.registerClass({
}

_animateDotDisplay(dots, newSize, otherDots, newOtherOpacity, sizeProp, duration) {
if(dots._tweeningToSize !== newSize) {
let tweenOpts = {
time: duration,
transition: 'easeInOutCubic',
onComplete: () => {
if(newOtherOpacity > 0)
otherDots.opacity = newOtherOpacity;
dots._tweeningToSize = null;
}
};
Utils.stopAnimations(dots)

let tweenOpts = {
time: duration,
transition: 'easeInOutCubic',
onComplete: () => {
if(newOtherOpacity > 0)
otherDots.opacity = newOtherOpacity;
}
};

if(newOtherOpacity == 0)
otherDots.opacity = newOtherOpacity;
if(newOtherOpacity == 0)
otherDots.opacity = newOtherOpacity;

tweenOpts[sizeProp] = newSize;
dots._tweeningToSize = newSize;
tweenOpts[sizeProp] = newSize;

Utils.animate(dots, tweenOpts);
}
Utils.animate(dots, tweenOpts);
}

_isFocusedWindow() {
Expand Down

0 comments on commit b455394

Please sign in to comment.