import gnome-control-center-3.28.2-19.el8

This commit is contained in:
CentOS Sources 2020-04-28 05:43:46 -04:00 committed by Andrew Lukoshko
parent 72e084edcf
commit a2a3c26d9f
14 changed files with 3044 additions and 1 deletions

View File

@ -0,0 +1,75 @@
From 6b34f996699a80c249d2cccfe369b3b61e70d4ce Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 10 Dec 2018 14:43:30 +1000
Subject: [PATCH] common: fix udev-based device removal
libgudev allocs a new GUdevDevice object for each event, so the pointer value
for the 'add' udev event differs from the one for the 'remove' event. If we
use the pointer value as hash table key, we'll never remove the device.
Switch to use the syspath of the device instead, that one is unique per
device.
Fixes #309
---
panels/common/gsd-device-manager-udev.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/panels/common/gsd-device-manager-udev.c b/panels/common/gsd-device-manager-udev.c
index aa9304232..105c8e987 100644
--- a/panels/common/gsd-device-manager-udev.c
+++ b/panels/common/gsd-device-manager-udev.c
@@ -122,6 +122,7 @@ add_device (GsdUdevDeviceManager *manager,
{
GUdevDevice *parent;
GsdDevice *device;
+ gchar *syspath;
parent = g_udev_device_get_parent (udev_device);
@@ -129,7 +130,8 @@ add_device (GsdUdevDeviceManager *manager,
return;
device = create_device (udev_device);
- g_hash_table_insert (manager->devices, g_object_ref (udev_device), device);
+ syspath = g_strdup (g_udev_device_get_sysfs_path (udev_device));
+ g_hash_table_insert (manager->devices, syspath, device);
g_signal_emit_by_name (manager, "device-added", device);
}
@@ -138,17 +140,19 @@ remove_device (GsdUdevDeviceManager *manager,
GUdevDevice *udev_device)
{
GsdDevice *device;
+ gchar *syspath;
- device = g_hash_table_lookup (manager->devices, udev_device);
+ syspath = g_strdup (g_udev_device_get_sysfs_path (udev_device));
+ device = g_hash_table_lookup (manager->devices, syspath);
if (!device)
return;
- g_hash_table_steal (manager->devices, udev_device);
+ g_hash_table_steal (manager->devices, syspath);
g_signal_emit_by_name (manager, "device-removed", device);
g_object_unref (device);
- g_object_unref (udev_device);
+ g_free (syspath);
}
static void
@@ -173,8 +177,8 @@ gsd_udev_device_manager_init (GsdUdevDeviceManager *manager)
const gchar *subsystems[] = { "input", NULL };
GList *devices, *l;
- manager->devices = g_hash_table_new_full (NULL, NULL,
- (GDestroyNotify) g_object_unref,
+ manager->devices = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
(GDestroyNotify) g_object_unref);
manager->udev_client = g_udev_client_new (subsystems);
--
2.24.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,46 @@
From 711afc3a83ba32b62ea813bb5bd79fb96207ef61 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 28 Nov 2019 16:38:03 +0100
Subject: [PATCH] network: Keep a ref on NetDeviceEthernet while a edition
dialog is open
Otherwise, invoking other panel (eg. through shell search, or CLI) and
closing the dialog will result in a crash, as the NetDeviceEthernet
object does no longer exist.
---
panels/network/net-device-ethernet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index a03fa8de3..b035ce81c 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -233,6 +233,7 @@ editor_done (NetConnectionEditor *editor,
{
g_object_unref (editor);
device_ethernet_refresh_ui (device);
+ g_object_unref (device);
}
static void
@@ -255,7 +256,7 @@ show_details (GtkButton *button, NetDeviceEthernet *device, const gchar *title)
editor = net_connection_editor_new (GTK_WINDOW (window), connection, nmdev, NULL, client);
if (title)
net_connection_editor_set_title (editor, title);
- g_signal_connect (editor, "done", G_CALLBACK (editor_done), device);
+ g_signal_connect (editor, "done", G_CALLBACK (editor_done), g_object_ref (device));
net_connection_editor_run (editor);
}
@@ -455,7 +456,7 @@ add_profile (GtkButton *button, NetDeviceEthernet *device)
nmdev = net_device_get_nm_device (NET_DEVICE (device));
editor = net_connection_editor_new (GTK_WINDOW (window), connection, nmdev, NULL, client);
- g_signal_connect (editor, "done", G_CALLBACK (editor_done), device);
+ g_signal_connect (editor, "done", G_CALLBACK (editor_done), g_object_ref (device));
net_connection_editor_run (editor);
}
--
2.24.0

View File

@ -0,0 +1,72 @@
From 0f7a591fa691bc826cee19ae01a6338145119aee Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 12 Dec 2019 16:20:57 +0100
Subject: [PATCH] network: Make IPv4/v6 pages drive the scrolledwindow
adjustments
Those 2 pages in the connection editor dialog are scrollable, but don't
hook focus changes so they drive the adjustments. Make them do so.
---
panels/network/connection-editor/ce-page-ip4.c | 3 +++
panels/network/connection-editor/ce-page-ip6.c | 3 +++
panels/network/connection-editor/ip4-page.ui | 2 +-
panels/network/connection-editor/ip6-page.ui | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/panels/network/connection-editor/ce-page-ip4.c b/panels/network/connection-editor/ce-page-ip4.c
index 400dc433d..d79e9a3dd 100644
--- a/panels/network/connection-editor/ce-page-ip4.c
+++ b/panels/network/connection-editor/ce-page-ip4.c
@@ -515,6 +515,9 @@ connect_ip4_page (CEPageIP4 *page)
gboolean disabled;
guint method, i;
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_builder_get_object (CE_PAGE (page)->builder, "main_box")),
+ gtk_scrolled_window_get_vadjustment (gtk_builder_get_object (CE_PAGE (page)->builder, "page")));
+
add_address_section (page);
add_dns_section (page);
add_routes_section (page);
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index 995197504..f7105cc5b 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -485,6 +485,9 @@ connect_ip6_page (CEPageIP6 *page)
gboolean disabled;
guint method, i;
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (gtk_builder_get_object (CE_PAGE (page)->builder, "main_box")),
+ gtk_scrolled_window_get_vadjustment (gtk_builder_get_object (CE_PAGE (page)->builder, "page")));
+
add_address_section (page);
add_dns_section (page);
add_routes_section (page);
diff --git a/panels/network/connection-editor/ip4-page.ui b/panels/network/connection-editor/ip4-page.ui
index fe5d407c9..597987d57 100644
--- a/panels/network/connection-editor/ip4-page.ui
+++ b/panels/network/connection-editor/ip4-page.ui
@@ -10,7 +10,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkGrid">
+ <object class="GtkGrid" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">24</property>
diff --git a/panels/network/connection-editor/ip6-page.ui b/panels/network/connection-editor/ip6-page.ui
index 6d39bd0ec..5164b1004 100644
--- a/panels/network/connection-editor/ip6-page.ui
+++ b/panels/network/connection-editor/ip6-page.ui
@@ -10,7 +10,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkGrid">
+ <object class="GtkGrid" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">24</property>
--
2.23.0

View File

@ -0,0 +1,27 @@
From 5e0840c52fc5a3e2334ef3a50aa15e320f2f074e Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Fri, 29 Nov 2019 20:45:32 +0100
Subject: [PATCH] network: Make list in "new VPN" dialog fill up space
If we don't have much content on it (Due to lack of VPN NM modules),
the list will look oddly centered. Have it fill the available space.
---
panels/network/connection-editor/connection-editor.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/network/connection-editor/connection-editor.ui b/panels/network/connection-editor/connection-editor.ui
index 4495c728d..9214b6463 100644
--- a/panels/network/connection-editor/connection-editor.ui
+++ b/panels/network/connection-editor/connection-editor.ui
@@ -93,7 +93,7 @@
</object>
<packing>
<property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
--
2.24.0

View File

@ -0,0 +1,63 @@
From 3f089ddbd8cc304c563b4ed8cfbc59d27ffadc00 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 12 Dec 2019 22:43:15 +0100
Subject: [PATCH] network: Update VPN empty label status after removing VPN
connection
Being the VPN list actually a collection of listboxes, this function
ensures it looks alright in other places. However the case of removing
all VPN connections till we're back empty was missed.
---
panels/network/cc-network-panel.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 1a072a65a..f08d9b939 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -761,6 +761,33 @@ notify_connection_added_cb (NMClient *client,
add_connection (panel, NM_CONNECTION (connection));
}
+static void
+notify_connection_removed_cb (NMClient *client,
+ NMRemoteConnection *connection,
+ CcNetworkPanel *panel)
+{
+ guint i;
+
+ for (i = 0; i < panel->devices->len; i++) {
+ NetObject *object = g_ptr_array_index (panel->devices, i);
+ NMConnection *vpn_conn;
+ gboolean equal;
+
+ if (!NET_IS_VPN (object))
+ continue;
+
+ g_object_get (object, "connection", &vpn_conn, NULL);
+ equal = vpn_conn == NM_CONNECTION (connection);
+ g_object_unref (vpn_conn);
+
+ if (equal) {
+ g_ptr_array_remove (panel->devices, object);
+ update_vpn_section (panel);
+ return;
+ }
+ }
+}
+
static void
panel_check_network_manager_version (CcNetworkPanel *panel)
{
@@ -912,6 +939,8 @@ cc_network_panel_init (CcNetworkPanel *panel)
/* add remote settings such as VPN settings as virtual devices */
g_signal_connect (panel->client, NM_CLIENT_CONNECTION_ADDED,
G_CALLBACK (notify_connection_added_cb), panel);
+ g_signal_connect (panel->client, NM_CLIENT_CONNECTION_REMOVED,
+ G_CALLBACK (notify_connection_removed_cb), panel);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (panel));
g_signal_connect_after (toplevel, "map", G_CALLBACK (on_toplevel_map), panel);
--
2.23.0

View File

@ -0,0 +1,40 @@
From 3f7c47e70915bb085d956d0b3c36d36e4c0da05b Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 16 Dec 2019 14:06:43 +0100
Subject: [PATCH] network: Use connect object on signals
This ensures the signals are disconnected on panel finalization.
---
panels/network/cc-network-panel.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 1a072a65a..deb4b967e 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -881,14 +881,14 @@ cc_network_panel_init (CcNetworkPanel *panel)
/* use NetworkManager client */
panel->client = nm_client_new (NULL, NULL);
- g_signal_connect (panel->client, "notify::nm-running" ,
- G_CALLBACK (manager_running), panel);
- g_signal_connect (panel->client, "notify::active-connections",
- G_CALLBACK (active_connections_changed), panel);
- g_signal_connect (panel->client, "device-added",
- G_CALLBACK (device_added_cb), panel);
- g_signal_connect (panel->client, "device-removed",
- G_CALLBACK (device_removed_cb), panel);
+ g_signal_connect_object (panel->client, "notify::nm-running" ,
+ G_CALLBACK (manager_running), panel, 0);
+ g_signal_connect_object (panel->client, "notify::active-connections",
+ G_CALLBACK (active_connections_changed), panel, 0);
+ g_signal_connect_object (panel->client, "device-added",
+ G_CALLBACK (device_added_cb), panel, 0);
+ g_signal_connect_object (panel->client, "device-removed",
+ G_CALLBACK (device_removed_cb), panel, 0);
/* Setup ModemManager client */
system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
--
2.24.0

View File

@ -0,0 +1,55 @@
From 06b1f439c05a20b790cebb850d8ba514249583c4 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 3 Dec 2019 16:56:59 +0100
Subject: [PATCH] network: Use g_signal_connect_object() when dealing with
NMClient
We may get signal emissions and property changes during NMClient
destruction, triggered from CcWifiPanel destruction. This triggers
callbacks that were not meant to trigger on panel destruction.
---
panels/network/cc-wifi-panel.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c
index 2c1cd17b7..7dd182e59 100644
--- a/panels/network/cc-wifi-panel.c
+++ b/panels/network/cc-wifi-panel.c
@@ -621,20 +621,20 @@ cc_wifi_panel_init (CcWifiPanel *self)
/* Load NetworkManager */
self->client = nm_client_new (NULL, NULL);
- g_signal_connect (self->client,
- "device-added",
- G_CALLBACK (device_added_cb),
- self);
-
- g_signal_connect (self->client,
- "device-removed",
- G_CALLBACK (device_removed_cb),
- self);
-
- g_signal_connect (self->client,
- "notify::wireless-enabled",
- G_CALLBACK (wireless_enabled_cb),
- self);
+ g_signal_connect_object (self->client,
+ "device-added",
+ G_CALLBACK (device_added_cb),
+ self, 0);
+
+ g_signal_connect_object (self->client,
+ "device-removed",
+ G_CALLBACK (device_removed_cb),
+ self, 0);
+
+ g_signal_connect_object (self->client,
+ "notify::wireless-enabled",
+ G_CALLBACK (wireless_enabled_cb),
+ self, 0);
/* Load Wi-Fi devices */
load_wifi_devices (self);
--
2.24.0

View File

@ -0,0 +1,30 @@
From 5502611f0cfe7083c2b2a650385ea4554cb73ac9 Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell@canonical.com>
Date: Mon, 15 Oct 2018 11:49:19 +1300
Subject: [PATCH 3/4] sharing: Fix warning when disabling sharing
The warning is:
(gnome-control-center:29760): Gtk-CRITICAL **: 11:45:48.076: gtk_widget_is_visible: assertion 'GTK_IS_WIDGET (widget)' failed
This is due to the code trying to disable switches that only exist if support
for that feature is available.
---
panels/sharing/cc-sharing-panel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 8b35c9a31..98f2d69ef 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -91,7 +91,7 @@ struct _CcSharingPanelPrivate
guint remote_desktop_name_watch;
};
-#define OFF_IF_VISIBLE(x) { if (gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); }
+#define OFF_IF_VISIBLE(x) { if ((x) != NULL && gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); }
static void
cc_sharing_panel_master_switch_notify (GtkSwitch *gtkswitch,
--
2.24.0

View File

@ -0,0 +1,66 @@
From 718426652881a9e0cb1ddffb0af0f58128396a23 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 11 Feb 2020 19:10:15 +0100
Subject: [PATCH] sharing: Remember the password on remote desktop sharing
If we are going through mutter's RemoteDesktop interface, we don't
seemingly remember the password set. Add support for reading it
from secrets and change the entry password on dialog construction,
to bring it on par with our vino handling.
---
panels/sharing/cc-gnome-remote-desktop.c | 16 ++++++++++++++++
panels/sharing/cc-gnome-remote-desktop.h | 2 ++
panels/sharing/cc-sharing-panel.c | 2 ++
3 files changed, 20 insertions(+)
diff --git a/panels/sharing/cc-gnome-remote-desktop.c b/panels/sharing/cc-gnome-remote-desktop.c
index 8420fddca..599467fb4 100644
--- a/panels/sharing/cc-gnome-remote-desktop.c
+++ b/panels/sharing/cc-gnome-remote-desktop.c
@@ -169,3 +169,19 @@ cc_grd_on_vnc_password_entry_notify_text (GtkEntry *entry,
cancellable, on_password_stored, entry,
NULL);
}
+
+void
+cc_grd_update_password_entry (GtkEntry *entry)
+{
+ g_autoptr(GError) error = NULL;
+ g_autofree gchar *password = NULL;
+
+ password = secret_password_lookup_sync (CC_GRD_VNC_PASSWORD_SCHEMA,
+ NULL, &error,
+ NULL);
+ if (error)
+ g_critical ("Failed to get password: %s", error->message);
+
+ if (password)
+ gtk_entry_set_text (entry, password);
+}
diff --git a/panels/sharing/cc-gnome-remote-desktop.h b/panels/sharing/cc-gnome-remote-desktop.h
index 2a4819986..1f83e2dd6 100644
--- a/panels/sharing/cc-gnome-remote-desktop.h
+++ b/panels/sharing/cc-gnome-remote-desktop.h
@@ -46,4 +46,6 @@ void cc_grd_on_vnc_password_entry_notify_text (GtkEntry *entry,
GParamSpec *pspec,
gpointer user_data);
+void cc_grd_update_password_entry (GtkEntry *entry);
+
#endif /* CC_GNOME_REMOTE_DESKTOP_H */
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index ab22f5df8..17ecdb11a 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -1106,6 +1106,8 @@ cc_sharing_panel_setup_screen_sharing_dialog_gnome_remote_desktop (CcSharingPane
g_signal_connect (priv->screen_sharing_dialog, "hide",
G_CALLBACK (screen_sharing_hide_cb), self);
+ cc_grd_update_password_entry (WID ("remote-control-password-entry"));
+
/* accept at most 8 bytes in password entry */
g_signal_connect (WID ("remote-control-password-entry"), "insert-text",
G_CALLBACK (screen_sharing_password_insert_text_cb), self);
--
2.24.1

View File

@ -0,0 +1,102 @@
From 533811deef3155abe71dbace6960feee0aa8a35a Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Wed, 31 Jul 2019 19:09:17 +0200
Subject: [PATCH] user: Support devices with more than 5 enroll steps
We are currently adding support for Synaptics devices that require 8
steps. Add another row for images which brings us to up to 10
supportable steps for now.
---
.../user-accounts/data/account-fingerprint.ui | 62 +++++++++++++++++++
panels/user-accounts/um-fingerprint-dialog.c | 2 +-
2 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/panels/user-accounts/data/account-fingerprint.ui b/panels/user-accounts/data/account-fingerprint.ui
index e352e6de1..969f7ca30 100644
--- a/panels/user-accounts/data/account-fingerprint.ui
+++ b/panels/user-accounts/data/account-fingerprint.ui
@@ -243,6 +243,68 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkHBox" id="enroll2_hbox">
+ <property name="visible">True</property>
+ <property name="margin-top">24</property>
+ <property name="margin-bottom">24</property>
+ <child>
+ <object class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="stock">gtk-no</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="image7">
+ <property name="visible">True</property>
+ <property name="stock">gtk-no</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="image8">
+ <property name="visible">True</property>
+ <property name="stock">gtk-no</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="image9">
+ <property name="visible">True</property>
+ <property name="stock">gtk-no</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="image10">
+ <property name="visible">True</property>
+ <property name="stock">gtk-no</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
<child>
<object class="GtkLabel" id="status-label">
<property name="visible">True</property>
diff --git a/panels/user-accounts/um-fingerprint-dialog.c b/panels/user-accounts/um-fingerprint-dialog.c
index 48b12dcf3..f5dee5b95 100644
--- a/panels/user-accounts/um-fingerprint-dialog.c
+++ b/panels/user-accounts/um-fingerprint-dialog.c
@@ -32,7 +32,7 @@
#include "fingerprint-strings.h"
/* This must match the number of images on the 2nd page in the UI file */
-#define MAX_ENROLL_STAGES 5
+#define MAX_ENROLL_STAGES 10
static GDBusProxy *manager = NULL;
static GDBusConnection *connection = NULL;
--
2.24.1

View File

@ -0,0 +1,31 @@
From 520411840b6cd1b9b72e4a2fd19701aad7145f4f Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 13 Feb 2020 20:28:29 +0100
Subject: [PATCH] wacom: Pick libwacom's Generic Pen stylus if tool ID is 0
We generally use tool ID 0 if the ID is actually unknown, libwacom however
assigns 0xfffff to such device. Make it sure we find the "Generic Pen"
stylus description in that case.
---
panels/wacom/cc-wacom-tool.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/panels/wacom/cc-wacom-tool.c b/panels/wacom/cc-wacom-tool.c
index 1316fa5d6..d54de6160 100644
--- a/panels/wacom/cc-wacom-tool.c
+++ b/panels/wacom/cc-wacom-tool.c
@@ -165,7 +165,10 @@ cc_wacom_tool_initable_init (GInitable *initable,
tool->id = ids[0];
}
- tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
+ if (tool->id == 0)
+ tool->wstylus = libwacom_stylus_get_for_id (wacom_db, 0xfffff);
+ else
+ tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
if (!tool->wstylus) {
g_set_error (error, 0, 0, "Stylus description not found");
--
2.25.0

View File

@ -0,0 +1,102 @@
From 6d01e7277f8589a1f0076acbf9e08b45a5a96d0d Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 13 Dec 2018 14:32:33 +1000
Subject: [PATCH 1/2] wacom: Map wacom-driver-specific generic IDs to 0
The xf86-input-wacom driver doesn't use 0 for tools that do not have an id or
serials. Serials default to 1, and the tool id is either 0x2 for stylus or 0xa
for eraser, see xf86WacomDefs.h, the defines for STYLUS_DEVICE_ID and
ERASER_DEVICE_ID.
libwacom uses 0xfffff and 0xffffe for the generic pens and all the lookup code
we have in the panel is designed for a serial/tool id of 0. So let's just map
the wacom driver IDs to 0 at the only transition point between Gdk and our
panel.
No devices with serials 0 or hw ids 2/10 exist, so this shouldn't have side
effects. This only affects X + xf86-input-wacom.
---
panels/wacom/cc-wacom-panel.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index e4f3ca7..8748876 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -354,6 +354,14 @@ update_current_tool (CcWacomPanel *panel,
/* Check whether we already know this tool, nothing to do then */
serial = gdk_device_tool_get_serial (tool);
+
+ /* The wacom driver sends serial-less tools with a serial of
+ * 1, libinput uses 0. No device exists with serial 1, let's reset
+ * it here so everything else works as expected.
+ */
+ if (serial == 1)
+ serial = 0;
+
stylus = cc_tablet_tool_map_lookup_tool (priv->tablet_tool_map,
wacom_device, serial);
@@ -361,6 +369,15 @@ update_current_tool (CcWacomPanel *panel,
gboolean added;
id = gdk_device_tool_get_hardware_id (tool);
+
+ /* The wacom driver sends a hw id of 0x2 for stylus and 0xa
+ * for eraser for devices that don't have a true HW id.
+ * Reset those to 0 so we can use the same code-paths
+ * libinput uses.
+ */
+ if (id == 0x2 || id == 0xa)
+ id = 0;
+
stylus = cc_wacom_tool_new (serial, id, wacom_device);
if (!stylus)
return;
--
2.24.1
From 6974aaeb20a5146f95de9c40cd0b3b5967b317a6 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 14 Dec 2018 16:14:30 +1000
Subject: [PATCH 2/2] wacom: ignore the wacom driver's touch tool type
When the wacom driver handles the touch device, we get a tool id of 0x3. Let's
ignore that because we don't need a tool for the touch node.
Ideally we should be able to rely on the GDK tool type but that one is always
GDK_DEVICE_TOOL_TYPE_UNKNOWN see
https://gitlab.gnome.org/GNOME/gtk/merge_requests/453
A GTK bug (also fixed in that MR) prevents the tool id from updating.
Until that GTK bug is fixed the pen will only be detected if it is the first
event from this physical device. If the touch node sends an event before the
pen, the pen won't be detected.
---
panels/wacom/cc-wacom-panel.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index 8748876..985ddf5 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -374,9 +374,14 @@ update_current_tool (CcWacomPanel *panel,
* for eraser for devices that don't have a true HW id.
* Reset those to 0 so we can use the same code-paths
* libinput uses.
+ * The touch ID is 0x3, let's ignore that because we don't
+ * have a touch tool and it only happens when the wacom
+ * driver handles the touch device.
*/
if (id == 0x2 || id == 0xa)
id = 0;
+ else if (id == 0x3)
+ return;
stylus = cc_wacom_tool_new (serial, id, wacom_device);
if (!stylus)
--
2.24.1

View File

@ -10,7 +10,7 @@
Name: gnome-control-center
Version: 3.28.2
Release: 5%{?dist}
Release: 19%{?dist}
Summary: Utilities to configure the GNOME desktop
License: GPLv2+ and CC-BY-SA
@ -32,6 +32,24 @@ Patch5: 0001-sharing-Enable-settings-widget-for-gnome-remote-desk.patch
Patch6: 0001-wacom-Update-Test-your-settings-button-sensitivity-o.patch
Patch7: 0001-wacom-Update-to-newer-output-setting.patch
# Subscription management
Patch8: 0001-info-Add-subscription-manager-integration.patch
Patch9: 0001-sharing-Fix-warning-when-disabling-sharing.patch
Patch10: 0001-network-Use-g_signal_connect_object-when-dealing-wit.patch
Patch11: 0001-common-fix-udev-based-device-removal.patch
Patch12: 0001-network-Keep-a-ref-on-NetDeviceEthernet-while-a-edit.patch
Patch13: 0001-network-Make-list-in-new-VPN-dialog-fill-up-space.patch
Patch14: 0001-network-Make-IPv4-v6-pages-drive-the-scrolledwindow-.patch
Patch15: 0001-network-Update-VPN-empty-label-status-after-removing.patch
Patch16: 0001-network-Use-connect-object-on-signals.patch
Patch17: 0001-sharing-Remember-the-password-on-remote-desktop-shar.patch
Patch18: 0001-wacom-Pick-libwacom-s-Generic-Pen-stylus-if-tool-ID-.patch
Patch20: 0001-user-Support-devices-with-more-than-5-enroll-steps.patch
Patch21: backport-wacom-tool-id-fixes.patch
BuildRequires: chrpath
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
@ -84,6 +102,8 @@ Requires: glib2%{?_isa} >= %{glib2_version}
Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version}
Requires: gnome-online-accounts%{?_isa} >= %{gnome_online_accounts_version}
Requires: gnome-settings-daemon%{?_isa} >= %{gsd_version}
# For g-s-d subscription manager patches
Requires: gnome-settings-daemon%{?_isa} >= 3.32.0-7
Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version}
Requires: gtk3%{?_isa} >= %{gtk3_version}
Requires: upower%{?_isa} >= %{upower_version}
@ -202,6 +222,62 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%dir %{_datadir}/gnome/wm-properties
%changelog
* Fri Feb 21 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-19
- Backport tool serial/ID detection fixes
- Resolves: #1782517
* Thu Feb 13 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-18
- Pick "Generic Pen" correctly on unknown tool IDs
- Resolves: #1782517
* Thu Feb 13 2020 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-17
- Restore remote desktop password on wayland
- Resolves: #1763207
* Mon Jan 20 2020 Benjamin Berg <bberg@redhat.com> - 3.28.2-16
- Add patch to support more than 5 enroll steps
- Resolves: #1789474
* Mon Dec 16 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-15
- Fix another crash changing panel with Ethernet dialog opened
- Resolves: #1692299
* Fri Dec 13 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-14
- Restore placeholder label after removing last VPN connection
- Resolves: #1782425
* Fri Dec 13 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-13
- Make IPv4/v6 configuration pages scroll to focus
- Resolves: #1671709
* Fri Dec 13 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-12
- Fix spacing in "new VPN" dialog
- Resolves: #1656988
* Wed Dec 04 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-11
- Fix crash when changing panel with Ethernet dialog opened
- Resolves: #1692299
* Wed Dec 04 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-10
- Fix Wacom tablet removal on wayland session
- Resolves: #1658001
* Tue Dec 03 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-9
- Fix possible crash when closing the wifi panel
- Resolves: #1778668
* Mon Dec 01 2019 Tomas Pelka <tpelka@redhat.com> - 3.28.2-8
- Need rebuild in correct build target
- Resolves: #1749372
* Fri Nov 29 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-7
- Fix warning when disabling sharing
- Resolves: #1749372
* Mon Nov 18 2019 Kalev Lember <klember@redhat.com> - 3.28.2-6
- Add subscription manager integration
- Resolves: #1720251
* Tue Jul 23 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-5
- Update wacom panel to newer "output" setting
- Resolves: #1718133