From d264937ac9678795669a4c236e6371ed72cb48a3 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 30 Mar 2022 15:19:35 -0700 Subject: [PATCH] Backport MR #1272 to fix GOA helper window (#2064462) --- ...nline-accounts-Fix-goa-helper-on-X11.patch | 32 +++++++++++++++++++ gnome-control-center.spec | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 0001-online-accounts-Fix-goa-helper-on-X11.patch diff --git a/0001-online-accounts-Fix-goa-helper-on-X11.patch b/0001-online-accounts-Fix-goa-helper-on-X11.patch new file mode 100644 index 0000000..dfa56ea --- /dev/null +++ b/0001-online-accounts-Fix-goa-helper-on-X11.patch @@ -0,0 +1,32 @@ +From 7fe322b9cedae313cd9af6f403eab9bfc6027674 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar +Date: Mon, 28 Mar 2022 21:02:23 +0200 +Subject: [PATCH] online-accounts: Fix goa-helper on X11 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The handle_str contains the “x11:” prefix so strtol would return 0. +We need to pass it the numeric substring. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1651 +--- + panels/online-accounts/gnome-control-center-goa-helper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panels/online-accounts/gnome-control-center-goa-helper.c b/panels/online-accounts/gnome-control-center-goa-helper.c +index 56513147e..533609cbc 100644 +--- a/panels/online-accounts/gnome-control-center-goa-helper.c ++++ b/panels/online-accounts/gnome-control-center-goa-helper.c +@@ -129,7 +129,7 @@ set_external_parent_from_handle (GtkApplication *application, + int xid; + + errno = 0; +- xid = strtol (handle_str, NULL, 16); ++ xid = strtol (handle_str + strlen (x11_prefix), NULL, 16); + if (errno != 0) + { + g_warning ("Failed to reference external X11 window, invalid XID %s", handle_str); +-- +2.35.1 + diff --git a/gnome-control-center.spec b/gnome-control-center.spec index a4fb860..e0a936c 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -24,6 +24,10 @@ Source0: https://download.gnome.org/sources/gnome-control-center/42/gnome Patch0: distro-logo.patch # https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1144 Patch1: prettify-info.patch +# https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1272 +# Fixes GOA helper window: +# https://bugzilla.redhat.com/show_bug.cgi?id=2064462 +Patch2: 0001-online-accounts-Fix-goa-helper-on-X11.patch BuildRequires: chrpath BuildRequires: cups-devel