[gnome-shell] magnifier: Return all parameters on sprite content preferred size
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] magnifier: Return all parameters on sprite content preferred size
- Date: Mon, 1 Apr 2019 20:46:17 +0000 (UTC)
commit 7eee0e0ed6a6c027645fbc7a6cf629b73da3a7a5
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Mar 11 20:36:55 2019 +0000
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]