[gnome-control-center/wip/jtojnar/x11-goa-helper: 2/2] online-accounts: Fix goa-helper on X11
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/jtojnar/x11-goa-helper: 2/2] online-accounts: Fix goa-helper on X11
- Date: Tue, 29 Mar 2022 12:33:15 +0000 (UTC)
commit 7fe322b9cedae313cd9af6f403eab9bfc6027674
Author: Jan Tojnar <jtojnar gmail com>
Date: Mon Mar 28 21:02:23 2022 +0200
online-accounts: Fix goa-helper on X11
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]