[gnome-shell] magnifier: Invalidate content size when it changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] magnifier: Invalidate content size when it changes
- Date: Mon, 1 Apr 2019 20:46:27 +0000 (UTC)
commit 8146e9d52701ff8e2a1851ff507b329788518769
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Mar 11 16:40:45 2019 -0400
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
js/ui/magnifier.js | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index 3d05615ee..f6b0e9550 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -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();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]