commit beea4d182e82754ffe02636460c68a78d0df770f Author: CentOS Sources Date: Tue Mar 1 06:18:54 2022 -0500 import gnome-shell-extension-background-logo-40.0~rc-3.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78a131f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/background-logo-extension-40.rc.tar.xz diff --git a/.gnome-shell-extension-background-logo.metadata b/.gnome-shell-extension-background-logo.metadata new file mode 100644 index 0000000..5c878b4 --- /dev/null +++ b/.gnome-shell-extension-background-logo.metadata @@ -0,0 +1 @@ +9fd1c98a8e561a7f316619d251e23cfbd6229668 SOURCES/background-logo-extension-40.rc.tar.xz diff --git a/SOURCES/0001-Support-positioning-at-the-top.patch b/SOURCES/0001-Support-positioning-at-the-top.patch new file mode 100644 index 0000000..0374b36 --- /dev/null +++ b/SOURCES/0001-Support-positioning-at-the-top.patch @@ -0,0 +1,135 @@ +From ff01583cb7eb00cbe012011b3de34298243787bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 8 Feb 2022 13:41:18 +0100 +Subject: [PATCH] Support positioning at the top + +Fedora has always placed the logo at the bottom, but for RHEL the +placement will likely be at the top. +--- + extension.js | 30 ++++++++----------- + prefs.js | 30 +++++++++---------- + ...sted.background-logo-extension.gschema.xml | 6 +++- + 3 files changed, 33 insertions(+), 33 deletions(-) + +diff --git a/extension.js b/extension.js +index d1bf35b..8255617 100644 +--- a/extension.js ++++ b/extension.js +@@ -166,26 +166,22 @@ class BackgroundLogo extends St.Widget { + + _updatePosition() { + let xAlign, yAlign; +- switch (this._settings.get_string('logo-position')) { +- case 'center': +- xAlign = Clutter.ActorAlign.CENTER; +- yAlign = Clutter.ActorAlign.CENTER; +- break; +- case 'bottom-left': ++ const position = this._settings.get_string('logo-position'); ++ if (position.endsWith('left')) + xAlign = Clutter.ActorAlign.START; +- yAlign = Clutter.ActorAlign.END; +- break; +- case 'bottom-center': +- xAlign = Clutter.ActorAlign.CENTER; +- yAlign = Clutter.ActorAlign.END; +- break; +- case 'bottom-right': ++ else if (position.endsWith('right')) + xAlign = Clutter.ActorAlign.END; ++ else ++ xAlign = Clutter.ActorAlign.CENTER; ++ ++ if (position.startsWith('top')) ++ yAlign = Clutter.ActorAlign.START; ++ else if (position.startsWith('bottom')) + yAlign = Clutter.ActorAlign.END; +- break; +- } +- this._bin.x_align = xAlign; +- this._bin.y_align = yAlign; ++ else ++ yAlign = Clutter.ActorAlign.CENTER; ++ ++ this._bin.set({ xAlign, yAlign }); + } + + _updateBorder() { +diff --git a/prefs.js b/prefs.js +index a2ce27a..c8d5903 100644 +--- a/prefs.js ++++ b/prefs.js +@@ -76,6 +76,9 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid { + comboBox.append('bottom-left', 'Bottom left'); + comboBox.append('bottom-center', 'Bottom center'); + comboBox.append('bottom-right', 'Bottom right'); ++ comboBox.append('top-left', 'Top left'); ++ comboBox.append('top-center', 'Top center'); ++ comboBox.append('top-right', 'Top right'); + this._settings.bind('logo-position', + comboBox, 'active-id', + Gio.SettingsBindFlags.DEFAULT); +@@ -196,24 +199,21 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid { + _getLogoPosition(width, height) { + let scaledBorder = this._settings.get_uint('logo-border'); + let x, y; +- switch (this._settings.get_string('logo-position')) { +- case 'center': +- x = (width - this._logo.get_width()) / 2; +- y = (height - this._logo.get_height()) / 2; +- break; +- case 'bottom-left': ++ const position = this._settings.get_string('logo-position'); ++ if (position.endsWith('left')) + x = scaledBorder; +- y = height - this._logo.get_height() - scaledBorder; +- break; +- case 'bottom-center': ++ else if (position.endsWith('right')) ++ x = (width - this._logo.get_width() - scaledBorder); ++ else + x = (width - this._logo.get_width()) / 2; ++ ++ if (position.startsWith('top')) ++ y = scaledBorder; ++ else if (position.startsWith('bottom')) + y = height - this._logo.get_height() - scaledBorder; +- break; +- case 'bottom-right': +- x = width - this._logo.get_width() - scaledBorder; +- y = height - this._logo.get_height() - scaledBorder; +- break; +- } ++ else ++ y = (height - this._logo.get_height()) / 2; ++ + return [x, y]; + } + +diff --git a/schemas/org.fedorahosted.background-logo-extension.gschema.xml b/schemas/org.fedorahosted.background-logo-extension.gschema.xml +index abacefb..74bc3a8 100644 +--- a/schemas/org.fedorahosted.background-logo-extension.gschema.xml ++++ b/schemas/org.fedorahosted.background-logo-extension.gschema.xml +@@ -5,6 +5,9 @@ + + + ++ ++ ++ + + + Logo position + + The position logo of the logo; valid values are 'center', +- 'bottom-left', 'bottom-center' and 'bottom-right' ++ 'bottom-left', 'bottom-center', 'bottom-right', ++ 'top-left', 'top-center' and 'top-right' + + + +-- +2.33.1 + diff --git a/SOURCES/0001-prefs-Scale-preview-border.patch b/SOURCES/0001-prefs-Scale-preview-border.patch new file mode 100644 index 0000000..05cbd59 --- /dev/null +++ b/SOURCES/0001-prefs-Scale-preview-border.patch @@ -0,0 +1,40 @@ +From ab86a3469bca9246ba5a6039d0cce8c6afae1fc9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 15 Feb 2022 15:25:43 +0100 +Subject: [PATCH] prefs: Scale preview border + +We currently pick up the settings value directly, which is the +border that is used on the actual (i.e. monitor-sized) background. + +That's way too big when applied as-is on the preview, so assume a +common monitor size and compute an appropriate scale from that. +--- + prefs.js | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/prefs.js b/prefs.js +index c8d5903..ba78322 100644 +--- a/prefs.js ++++ b/prefs.js +@@ -13,6 +13,7 @@ const ExtensionUtils = imports.misc.extensionUtils; + + const BACKGROUND_SCHEMA = 'org.gnome.desktop.background'; + ++const MONITOR_WIDTH = 1920; + const PREVIEW_WIDTH = 400; + + let BackgroundLogoPrefsWidget = GObject.registerClass( +@@ -197,7 +198,9 @@ class BackgroundLogoPrefsWidget extends Gtk.Grid { + } + + _getLogoPosition(width, height) { +- let scaledBorder = this._settings.get_uint('logo-border'); ++ const previewScale = PREVIEW_WIDTH / MONITOR_WIDTH; ++ const scaledBorder = ++ previewScale * this._settings.get_uint('logo-border'); + let x, y; + const position = this._settings.get_string('logo-position'); + if (position.endsWith('left')) +-- +2.33.1 + diff --git a/SOURCES/32.patch b/SOURCES/32.patch new file mode 100644 index 0000000..d1d4dfc --- /dev/null +++ b/SOURCES/32.patch @@ -0,0 +1,33 @@ +From 423119599c7a98dc51dda6e5260c992e21438d60 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Mar 31 2021 16:40:10 +0000 +Subject: extension: Do not relayout on scale changes + + +This makes the background logo position flicker as we enter the +overview. This actor is part of the BackgroundActor actor hierarchy, +and can be left to scale neatly with it. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1943938 + +--- + +diff --git a/extension.js b/extension.js +index d1bf35b..edf2868 100644 +--- a/extension.js ++++ b/extension.js +@@ -25,13 +25,6 @@ var IconContainer = GObject.registerClass( + class IconContainer extends St.Widget { + _init(params) { + super._init(params); +- +- this.connect('notify::scale-x', () => { +- this.queue_relayout(); +- }); +- this.connect('notify::scale-y', () => { +- this.queue_relayout(); +- }); + } + + vfunc_get_preferred_width(forHeight) { + diff --git a/SPECS/gnome-shell-extension-background-logo.spec b/SPECS/gnome-shell-extension-background-logo.spec new file mode 100644 index 0000000..eefcb81 --- /dev/null +++ b/SPECS/gnome-shell-extension-background-logo.spec @@ -0,0 +1,207 @@ +%global shell_version 40.rc +%global upstream_version 40.rc + +Name: gnome-shell-extension-background-logo +Version: 40.0~rc +Release: 3%{?dist} +Summary: Background logo extension for GNOME Shell + +License: GPLv2+ +URL: https://pagure.io/background-logo-extension +Source0: https://releases.pagure.org/background-logo-extension/background-logo-extension-%{upstream_version}.tar.xz +BuildArch: noarch + +BuildRequires: meson +BuildRequires: glib2-devel +BuildRequires: git + +Requires: gnome-shell >= %{shell_version} + +# https://pagure.io/background-logo-extension/pull-request/32 +Patch0: 32.patch + +Patch1: 0001-Support-positioning-at-the-top.patch +Patch2: 0001-prefs-Scale-preview-border.patch + +%description +Show your pride! Display the Fedora logo (or any other graphic) in the corner of your desktop. + +%prep +%autosetup -n background-logo-extension-%{upstream_version} -S git + +%build +%meson +%meson_build + +%install +%meson_install + +%files +%license COPYING +%{_datadir}/glib-2.0/schemas/org.fedorahosted.background-logo-extension.gschema.xml +%{_datadir}/gnome-shell/extensions/background-logo@fedorahosted.org/ + +%changelog +* Tue Feb 22 2022 Florian Müllner - 40.0~rc-3 +- Backport support for top positioning in RHEL + Related: #2052594 + +* Wed Mar 31 2021 Michael Catanzaro - 40.0~rc-2 +- Fix logo flickering + +* Tue Mar 16 2021 Florian Müllner - 40.0~rc-1 +- Update to 40.rc + +* Tue Feb 23 2021 Florian Müllner - 40.0~beta-1 +- Update to 40.beta + +* Tue Feb 02 2021 Florian Müllner - 3.37.3-4.20210574ed73 +- Build snapshot from current upstream + +* Tue Jan 26 2021 Fedora Release Engineering - 3.37.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.37.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 15 2020 Florian Müllner - 3.37.3-1 +- Update to 3.37.3 + +* Sat Mar 07 2020 Florian Müllner - 3.36.0-1 +- Update to 3.36.0 + +* Thu Feb 20 2020 Florian Müllner - 3.34.0-3 +- Adjust to gnome-shell changes + shut up some warnings + +* Tue Jan 28 2020 Fedora Release Engineering - 3.34.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Sep 06 2019 Florian Müllner - 3.34.0-1 +- Update to 3.34.0 + +* Thu Jul 25 2019 Fedora Release Engineering - 3.32.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Mar 12 2019 Florian Müllner - 3.32.0-1 +- Update to 3.32.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 3.24.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 3.24.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 3.24.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Feb 04 2018 Matthew Miller - 3.24.0-4 +- make description descriptive + +* Sat Jan 06 2018 Igor Gnatenko - 3.24.0-3 +- Remove obsolete scriptlets + +* Wed Jul 26 2017 Fedora Release Engineering - 3.24.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jun 01 2017 Florian Müllner - 3.24.0-1 +- Update to 3.24.0 + +* Fri Feb 10 2017 Fedora Release Engineering - 3.22.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Sep 20 2016 Florian Müllner - 3.22.0-1 +- Update to 3.22.0 + +* Tue Sep 13 2016 Florian Müllner - 3.21.92-1 +- Update to 3.21.92 + +* Tue Aug 30 2016 Florian Müllner - 3.21.91-1 +- Update to 3.21.91 + +* Tue Jun 21 2016 Florian Müllner - 3.21.3-1 +- Update to 3.21.3 + +* Fri May 27 2016 Florian Müllner . 3-21-2-1 +- Update to 3.21.2 + +* Tue Mar 22 2016 Florian Müllner - 3.20.0-1 +- Update to 3.20.0 + +* Wed Mar 16 2016 Florian Müllner - 3.19.92-1 +- Update to 3.19.92 + +* Thu Mar 03 2016 Florian Müllner - 3.19.91-1 +- Update to 3.19.91 + +* Fri Feb 19 2016 Florian Müllner - 3.19.90-1 +- Update to 3.19.90 + +* Wed Feb 03 2016 Fedora Release Engineering - 3.19.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 21 2016 Florian Müllner - 3.19.4-1 +- Update to 3.19.4 + +* Thu Dec 17 2015 Florian Müllner - 3.19.3-1 +- Update to 3.19.3 + +* Wed Nov 25 2015 Florian Müllner - 3.19.2-1 +- Update to 3.19.2 + +* Thu Oct 29 2015 Florian Müllner - 3.19.1-1 +- Update to 3.19.1 + +* Mon Sep 21 2015 Florian Müllner - 3.18.0-1 +- Update to 3.18.0 + +* Wed Sep 16 2015 Florian Müllner - 3.17.92-1 +- Update to 3.17.92 + +* Thu Sep 03 2015 Florian Müllner - 3.17.91-1 +- Update to 3.17.91 + +* Thu Aug 20 2015 Florian Müllner - 3.17.90-1 +- Update to 3.17.90 + +* Wed Aug 19 2015 Kalev Lember - 3.17.3-2 +- Don't own /usr/share/gnome-shell/extensions directory: now part of + gnome-shell package + +* Thu Jul 02 2015 Florian Müllner - 3.17.3-1 +- Update to 3.17.3 + +* Wed Jun 17 2015 Fedora Release Engineering - 3.17.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed May 27 2015 Florian Müllner - 3.17.2-1 +- Update to 3.17.2 + +* Thu Apr 30 2015 Florian Müllner - 3.17.1-1 +- Update to 3.17.1 + +* Thu Apr 16 2015 Florian Müllner - 3.16.1-1 +- Update to 3.16.1 + +* Mon Mar 23 2015 Florian Müllner - 3.16.0-1 +- Update to 3.16.0 + +* Tue Mar 17 2015 Florian Müllner - 3.15.92-1 +- Update to 3.15.92 + +* Thu Mar 05 2015 Florian Müllner - 3.15.91-1 +- Update to 3.15.91 + +* Fri Feb 20 2015 Florian Müllner - 3.15.90-1 +- Update to 3.15.90 + +* Fri Dec 19 2014 Florian Müllner - 3.15.3-1 +- Update to 3.15.3 + +* Thu Nov 27 2014 Florian Müllner - 3.15.2-1 +- Update to 3.15.2 + +* Thu Nov 20 2014 Kalev Lember - 3.15.1-1 +- Update to 3.15.1 + +* Fri Nov 07 2014 Kalev Lember - 3.14.0-1 +- Initial Fedora packaging