From 7eee0e0ed6a6c027645fbc7a6cf629b73da3a7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 11 Mar 2019 20:36:55 +0000 Subject: [PATCH] magnifier: Return all parameters on sprite content preferred size ClutterContent's get_preferred_size should return a boolean weather the preferred size is valid, so in javascript we've to return this state value before out width and height. Since this was not happening, clutter was considering the width as the state (converting the non-zero value to true), the height as the width, while ignoring the returned height (that was then defaulted to 0) Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1020 --- js/ui/magnifier.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index ba7227d67..4a21b71e5 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -56,9 +56,9 @@ var MouseSpriteContent = GObject.registerClass({ vfunc_get_preferred_size() { if (!this._texture) - return [0, 0]; + return [false, 0, 0]; - return [this._texture.get_width(), this._texture.get_height()]; + return [true, this._texture.get_width(), this._texture.get_height()]; } vfunc_paint_content(actor, node) {