diff -Nru gnome-control-center-3.32.2/debian/changelog gnome-control-center-3.32.2/debian/changelog --- gnome-control-center-3.32.2/debian/changelog 2019-05-29 11:24:04.000000000 +0000 +++ gnome-control-center-3.32.2/debian/changelog 2019-06-26 11:33:00.000000000 +0000 @@ -1,3 +1,11 @@ +gnome-control-center (1:3.32.2-0ubuntu1.1) disco; urgency=medium + + * d/p/fix-broken-zoom-options.patch: + - Update dconf settings properly from the zoom options GUI + (LP: #1831144). + + -- Gunnar Hjalmarsson Wed, 26 Jun 2019 13:33:00 +0200 + gnome-control-center (1:3.32.2-0ubuntu1) disco; urgency=medium * New upstream stable version, based on the Debian update (lp: #1830884) diff -Nru gnome-control-center-3.32.2/debian/patches/fix-broken-zoom-options.patch gnome-control-center-3.32.2/debian/patches/fix-broken-zoom-options.patch --- gnome-control-center-3.32.2/debian/patches/fix-broken-zoom-options.patch 1970-01-01 00:00:00.000000000 +0000 +++ gnome-control-center-3.32.2/debian/patches/fix-broken-zoom-options.patch 2019-06-25 21:26:15.000000000 +0000 @@ -0,0 +1,191 @@ +Description: Fix zoom settings not applying (and leaks) +Origin: https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/487.diff +Bug-Ubuntu: https://launchpad.net/bugs/1831144 +Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/555 +Applied-Upstream: yes - commits: 9bc429ce, ffaeb56b, 3351e91e + +diff --git a/panels/universal-access/zoom-options.c b/panels/universal-access/zoom-options.c +index 7266aaab6bddce030dc29b00fcf1974006b14224..dcfaa44e4c9a8c342869c2359f6b93994c821e0b 100644 +--- a/panels/universal-access/zoom-options.c ++++ b/panels/universal-access/zoom-options.c +@@ -70,7 +70,6 @@ static gchar *contrast_keys[] = { + }; + + static void set_enable_screen_part_ui (GtkWidget *widget, ZoomOptions *self); +-static void mouse_tracking_notify_cb (GSettings *settings, const gchar *key, ZoomOptions *self); + static void scale_label (GtkBin *toggle, PangoAttrList *attrs); + static void xhairs_color_opacity_changed (GtkColorButton *button, ZoomOptions *self); + static void xhairs_length_add_marks (ZoomOptions *self, GtkScale *scale); +@@ -80,41 +79,37 @@ static void contrast_slider_notify_cb (GSettings *settings, const gchar *key, Zo + static void effects_slider_changed (GtkRange *slider, ZoomOptions *self); + + static void +-mouse_tracking_radio_toggled_cb (GtkWidget *widget, ZoomOptions *self) ++mouse_tracking_radio_toggled_cb (ZoomOptions *self, GtkWidget *widget) + { +- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) == TRUE) +- { +- g_settings_set_string (self->settings, "mouse-tracking", +- gtk_buildable_get_name (GTK_BUILDABLE (widget))); +- } ++ if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) ++ return; ++ ++ if (widget == self->centered_radio) ++ g_settings_set_string (self->settings, "mouse-tracking", "centered"); ++ else if (widget == self->proportional_radio) ++ g_settings_set_string (self->settings, "mouse-tracking", "proportional"); ++ else if (widget == self->push_radio) ++ g_settings_set_string (self->settings, "mouse-tracking", "push"); + } + + static void +-init_mouse_mode_radio_group (GSList *mode_group, ZoomOptions *self) ++mouse_tracking_notify_cb (ZoomOptions *self) + { +- gchar *mode; +- gchar *name; +- +- mode = g_settings_get_string (self->settings, "mouse-tracking"); +- for (; mode_group != NULL; mode_group = mode_group->next) +- { +- name = (gchar *) gtk_buildable_get_name (GTK_BUILDABLE (mode_group->data)); +- if (g_strcmp0 (name, mode) == 0) +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mode_group->data), TRUE); +- else +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mode_group->data), FALSE); +- +- g_signal_connect (G_OBJECT (mode_group->data), "toggled", +- G_CALLBACK(mouse_tracking_radio_toggled_cb), +- self); +- } ++ g_autofree gchar *tracking = NULL; ++ ++ tracking = g_settings_get_string (self->settings, "mouse-tracking"); ++ if (g_strcmp0 (tracking, "centered") == 0) ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->centered_radio), TRUE); ++ else if (g_strcmp0 (tracking, "proportional") == 0) ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->proportional_radio), TRUE); ++ else ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->push_radio), TRUE); + } + + static void + init_screen_part_section (ZoomOptions *self, PangoAttrList *pango_attrs) + { + gboolean lens_mode; +- GSList *mouse_mode_group; + + /* Scale the labels of the toggles */ + scale_label (GTK_BIN (self->follow_mouse_radio), pango_attrs); +@@ -128,8 +123,6 @@ init_screen_part_section (ZoomOptions *self, PangoAttrList *pango_attrs) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->follow_mouse_radio), lens_mode); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->screen_part_radio), !lens_mode); + +- mouse_mode_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (self->centered_radio)); +- init_mouse_mode_radio_group (mouse_mode_group, self); + set_enable_screen_part_ui (self->screen_part_radio, self); + + g_settings_bind (self->settings, "lens-mode", +@@ -143,8 +136,9 @@ init_screen_part_section (ZoomOptions *self, PangoAttrList *pango_attrs) + g_signal_connect (G_OBJECT (self->screen_part_radio), "toggled", + G_CALLBACK (set_enable_screen_part_ui), self); + +- g_signal_connect (G_OBJECT (self->settings), "changed::mouse-tracking", +- G_CALLBACK (mouse_tracking_notify_cb), self); ++ mouse_tracking_notify_cb (self); ++ g_signal_connect_object (G_OBJECT (self->settings), "changed::mouse-tracking", ++ G_CALLBACK (mouse_tracking_notify_cb), self, G_CONNECT_SWAPPED); + } + + static void +@@ -168,28 +162,6 @@ set_enable_screen_part_ui (GtkWidget *widget, ZoomOptions *self) + gtk_widget_set_sensitive (self->extend_beyond_checkbox, screen_part); + } + +-static void +-mouse_tracking_notify_cb (GSettings *settings, +- const gchar *key, +- ZoomOptions *self) +-{ +- gchar *tracking; +- +- tracking = g_settings_get_string (settings, key); +- if (g_strcmp0 (tracking, "proportional") == 0) +- { +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->proportional_radio), TRUE); +- } +- else if (g_strcmp0 (tracking, "centered") == 0) +- { +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->centered_radio), TRUE); +- } +- else +- { +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->push_radio), TRUE); +- } +-} +- + static void + scale_label (GtkBin *toggle, PangoAttrList *attrs) + { +@@ -222,13 +194,12 @@ screen_position_notify_cb (GSettings *settings, + const gchar *key, + ZoomOptions *self) + { +- gchar *position; ++ g_autofree gchar *position = NULL; + GtkTreeIter iter; + GtkTreeModel *model; + GtkComboBox *combobox; + gboolean valid; + +- position = g_settings_get_string (settings, key); + position = g_settings_get_string (self->settings, key); + combobox = GTK_COMBO_BOX (self->screen_position_combobox); + model = gtk_combo_box_get_model (combobox); +@@ -259,7 +230,7 @@ screen_position_notify_cb (GSettings *settings, + static void + init_xhairs_color_opacity (GtkColorButton *color_button, GSettings *settings) + { +- gchar *color_setting; ++ g_autofree gchar *color_setting = NULL; + GdkRGBA rgba; + + color_setting = g_settings_get_string (settings, "cross-hairs-color"); +@@ -550,6 +521,8 @@ zoom_options_class_init (ZoomOptionsClass *klass) + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, screen_part_radio); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, screen_position_combobox); + gtk_widget_class_bind_template_child (widget_class, ZoomOptions, seeing_zoom_switch); ++ ++ gtk_widget_class_bind_template_callback (widget_class, mouse_tracking_radio_toggled_cb); + } + + static void +diff --git a/panels/universal-access/zoom-options.ui b/panels/universal-access/zoom-options.ui +index b8a2ab986bd3acf04d973ee8c9db500937e60f5c..baeec2f6e9ea6502a09fbf037fab1cfc78ff91f3 100644 +--- a/panels/universal-access/zoom-options.ui ++++ b/panels/universal-access/zoom-options.ui +@@ -357,6 +357,7 @@ + True + True + True ++ + + + False +@@ -376,6 +377,7 @@ + True + centered_radio + True ++ + + + False +@@ -395,6 +397,7 @@ + True + centered_radio + True ++ + + + False diff -Nru gnome-control-center-3.32.2/debian/patches/series gnome-control-center-3.32.2/debian/patches/series --- gnome-control-center-3.32.2/debian/patches/series 2019-05-29 10:51:15.000000000 +0000 +++ gnome-control-center-3.32.2/debian/patches/series 2019-06-25 21:26:15.000000000 +0000 @@ -26,4 +26,4 @@ 0008-applications-Add-hack-detect-snaps-before-X-SnapInst.patch display-Support-UI-scaled-logical-monitor-mode.patch ubuntu_privacy_hide_buggy_controls.patch - +fix-broken-zoom-options.patch