[gnome-shell/gbsneto/icon-grid-dnd-fixes: 11/14] appDisplay: Don't change opacity on destruction
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-dnd-fixes: 11/14] appDisplay: Don't change opacity on destruction
- Date: Thu, 24 Sep 2020 23:28:11 +0000 (UTC)
commit e05cbf2f93d52061044bb653c499e7816ffe5303
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Sep 24 15:57:12 2020 -0300
appDisplay: Don't change opacity on destruction
At the end of BaseAppView._clearAnimateLater(), the '_grid' actor's opacity is
set to 255. As it turns out, _clearAnimateLater() is called, among others, by
vfunc_unmap(). However, unmapping is part of the destruction process, and at
the time it is called, '_grid' is already destroying, which makes GJS complain
about accessing an invalid object.
Don't change opacity on BaseAppView._clearAnimateLater(), and instead move it
to the couple of places outside vfunc_unmap() that call it.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1447
js/ui/appDisplay.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index f2e2ceb1a8..525a864a6d 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -651,7 +651,6 @@ var BaseAppView = GObject.registerClass({
this.disconnect(this._viewLoadedHandlerId);
this._viewLoadedHandlerId = 0;
}
- this._grid.opacity = 255;
}
animate(animationDirection, onComplete) {
@@ -663,6 +662,7 @@ var BaseAppView = GObject.registerClass({
}
this._clearAnimateLater();
+ this._grid.opacity = 255;
if (animationDirection == IconGrid.AnimationDirection.IN) {
const doSpringAnimationLater = laterType => {
@@ -681,6 +681,7 @@ var BaseAppView = GObject.registerClass({
this._viewLoadedHandlerId = this.connect('view-loaded',
() => {
this._clearAnimateLater();
+ this._grid.opacity = 255;
doSpringAnimationLater(Meta.LaterType.BEFORE_REDRAW);
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]