magnifier: Invalidate content size when it changes

In case the content size changes we need to invalidate its size in order to
trigger a full actor relayout.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/443
This commit is contained in:
Marco Trevisan (Treviño) 2019-03-11 16:40:45 -04:00
parent 4247251020
commit 8146e9d527

View File

@ -84,8 +84,14 @@ var MouseSpriteContent = GObject.registerClass({
if (this._texture == coglTexture)
return;
let oldTexture = this._texture;
this._texture = coglTexture;
this.invalidate();
if (!oldTexture ||
oldTexture.get_width() != coglTexture.get_width() ||
oldTexture.get_height() != coglTexture.get_height())
this.invalidate_size();
}
});