gnome-shell/gnome-shell-Get-resource-scale-by-get_resource_scale.patch
Dominique Leuenberger 7096b32a58 Accepting request 797796 from home:xiaoguang_wang:branches:GNOME:Factory
- Add gnome-shell-Get-resource-scale-by-get_resource_scale.patch:
  To remove 'Getting invalid resource scale property' warnings in
  the log(bsc#1169845 glgo#GNOME/gnome-shell!1206).

OBS-URL: https://build.opensuse.org/request/show/797796
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=428
2020-04-27 17:40:20 +00:00

36 lines
1.4 KiB
Diff

From be12c71534199a1a1fd0a334d046ddb85c6f165e Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang <xwang@suse.com>
Date: Tue, 21 Apr 2020 16:17:09 +0800
Subject: [PATCH] loginDialog: Get resource scale by get_resource_scale
To shut up 'Getting invalid resource scale property' warnings in the log.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1206
---
js/gdm/loginDialog.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 16a7536ce..0ee51e637 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -810,12 +810,13 @@ var LoginDialog = GObject.registerClass({
return;
this._logoBin.destroy_all_children();
- if (this._logoFile && this._logoBin.resource_scale > 0) {
+ const [valid, resourceScale] = this._logoBin.get_resource_scale();
+ if (this._logoFile && valid) {
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
-1, -1,
scaleFactor,
- this._logoBin.resource_scale));
+ resourceScale));
}
}
--
2.26.0