From 365ad8acb5acdfce694492701f9348da39aadddc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 31 2020 09:33:32 +0000 Subject: import control-center-3.28.1-6.el7 --- diff --git a/SOURCES/0001-Calculate-better-extents-for-the-configured-displays.patch b/SOURCES/0001-Calculate-better-extents-for-the-configured-displays.patch new file mode 100644 index 0000000..1001e4a --- /dev/null +++ b/SOURCES/0001-Calculate-better-extents-for-the-configured-displays.patch @@ -0,0 +1,59 @@ +From 9921b90dc1a91ff040e021a78dcf539df42f5952 Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Thu, 8 Aug 2019 20:32:10 +0200 +Subject: [PATCH] Calculate better extents for the configured displays + arrangement + +Find out the bottommost and rightmost outputs in the arranged space, so +the represented outputs in the arrangement widget use as much space as +possible, instead of allocating enough space to allow any kind of +configuration beforehand. +--- + panels/display/cc-display-panel.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c +index 0b4fa19..a3db5f6 100644 +--- a/panels/display/cc-display-panel.c ++++ b/panels/display/cc-display-panel.c +@@ -2137,6 +2137,7 @@ static void + get_total_size (CcDisplayPanel *self, int *total_w, int *total_h) + { + GList *outputs, *l; ++ int max_w = 0, max_h = 0; + + *total_w = 0; + *total_h = 0; +@@ -2145,12 +2146,12 @@ get_total_size (CcDisplayPanel *self, int *total_w, int *total_h) + for (l = outputs; l != NULL; l = l->next) + { + CcDisplayMonitor *output = l->data; +- int w, h; ++ int w, h, x, y; + + if (!is_output_useful (output)) + continue; + +- get_geometry (output, NULL, NULL, &w, &h); ++ get_geometry (output, &x, &y, &w, &h); + + if (cc_display_config_is_layout_logical (self->priv->current_config)) + { +@@ -2159,9 +2160,12 @@ get_total_size (CcDisplayPanel *self, int *total_w, int *total_h) + h /= scale; + } + +- *total_w += w; +- *total_h += h; ++ max_w = MAX (max_w, x + w); ++ max_h = MAX (max_h, y + h); + } ++ ++ *total_w = max_w; ++ *total_h = max_h; + } + + static double +-- +2.23.0.rc1 + diff --git a/SOURCES/0001-thunderbolt-fix-double-free-in-bolt-client.patch b/SOURCES/0001-thunderbolt-fix-double-free-in-bolt-client.patch new file mode 100644 index 0000000..861bcfb --- /dev/null +++ b/SOURCES/0001-thunderbolt-fix-double-free-in-bolt-client.patch @@ -0,0 +1,56 @@ +From 06894e020a75b9ea670ed524a02b6bf939dc4e9c Mon Sep 17 00:00:00 2001 +From: Christian Kellner +Date: Tue, 8 Jan 2019 17:22:41 +0100 +Subject: [PATCH] thunderbolt: fix double free in bolt client + +In the async version of the client creation, i.e. when a new client +is created via bolt_client_new_async and an error happens it will be +passed to g_task_return_error which takes ownership of it but the very +same error will also be free'd via g_autoptr; remove the latter. + +This is a port of bolt commit e96f8bd47587b167ae46c8ac9347003f69f931dd +--- + panels/thunderbolt/bolt-client.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/panels/thunderbolt/bolt-client.c b/panels/thunderbolt/bolt-client.c +index 0ebc360b1..00038bd7b 100644 +--- a/panels/thunderbolt/bolt-client.c ++++ b/panels/thunderbolt/bolt-client.c +@@ -219,7 +219,7 @@ got_the_client (GObject *source, + GAsyncResult *res, + gpointer user_data) + { +- g_autoptr(GError) error = NULL; ++ GError *error = NULL; + GTask *task = user_data; + GObject *obj; + +@@ -227,6 +227,7 @@ got_the_client (GObject *source, + + if (obj == NULL) + { ++ /* error ownership gets transferred to the task */ + g_task_return_error (task, error); + return; + } +@@ -240,7 +241,7 @@ got_the_bus (GObject *source, + GAsyncResult *res, + gpointer user_data) + { +- g_autoptr(GError) error = NULL; ++ GError *error = NULL; + GTask *task = user_data; + GCancellable *cancellable; + GDBusConnection *bus; +@@ -249,6 +250,7 @@ got_the_bus (GObject *source, + if (bus == NULL) + { + g_prefix_error (&error, "could not connect to D-Bus: "); ++ /* error ownership gets transferred to the task */ + g_task_return_error (task, error); + return; + } +-- +2.23.0.rc1 + diff --git a/SPECS/control-center.spec b/SPECS/control-center.spec index 541d7cd..1962906 100644 --- a/SPECS/control-center.spec +++ b/SPECS/control-center.spec @@ -11,7 +11,7 @@ Name: control-center Epoch: 1 Version: 3.28.1 -Release: 4%{?dist} +Release: 6%{?dist} Summary: Utilities to configure the GNOME desktop License: GPLv2+ and CC-BY-SA @@ -27,6 +27,8 @@ Patch5: control-center-python3.patch Patch6: thunderbolt-panel.patch Patch7: gnuc99-standard.patch Patch8: 0001-po-Remove-soft-hyphens-from-japanese-translation.patch +Patch9: 0001-thunderbolt-fix-double-free-in-bolt-client.patch +Patch10: 0001-Calculate-better-extents-for-the-configured-displays.patch BuildRequires: chrpath BuildRequires: cups-devel @@ -210,6 +212,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %dir %{_datadir}/gnome/wm-properties %changelog +* Thu Aug 08 2019 Carlos Garnacho - 3.28.1-6 +- Calculate better extents for the configured displays arrangement + Resolves: #1591643 + +* Wed Aug 07 2019 Carlos Garnacho - 3.28.1-5 +- Fix crash in thunderbolt panel + Resolves: #1672289 + * Tue Sep 04 2018 Kalev Lember - 3.28.1-4 - Backport two additional upstream patches for thunderbolt panel - Resolves: #1594880