🔧 Attempt to fix occasionally corrupted windows

This commit is contained in:
Simon Schneegans
2022-01-29 13:30:34 +01:00
parent 531dfdb162
commit fa6c7b566a
+17 -7
View File
@@ -109,7 +109,16 @@ class Extension {
orig.apply(actor, params);
actor.ease = orig;
extensionThis._setupEffect(actor, true);
// There are cases where the ease() is called prior to mapping the actor. If
// the actor is not yet mapped, we defer the effect creation.
if (actor.mapped) {
extensionThis._setupEffect(actor, true);
} else {
const connectionID = actor.connect('notify::mapped', () => {
extensionThis._setupEffect(actor, true);
actor.disconnect(connectionID);
});
}
};
});
@@ -415,13 +424,14 @@ class Extension {
}
// Once the transitions are finished, we restore the original actor size.
const connectionID = actor.connect('transitions-completed', () => {
actor.scale_x = 1.0;
actor.scale_y = 1.0;
actor.opacity = forOpening ? 1.0 : 0.0;
if (forOpening) {
const connectionID = actor.connect('transitions-completed', () => {
actor.scale_x = 1.0;
actor.scale_y = 1.0;
actor.disconnect(connectionID);
});
}
actor.disconnect(connectionID);
});
// -------------------------------------------------------------------- add the shader