diff --git a/SOURCES/0001-keyboard-Make-it-possible-to-stop-watching-for-WM-ch.patch b/SOURCES/0001-keyboard-Make-it-possible-to-stop-watching-for-WM-ch.patch new file mode 100644 index 0000000..e89bbb4 --- /dev/null +++ b/SOURCES/0001-keyboard-Make-it-possible-to-stop-watching-for-WM-ch.patch @@ -0,0 +1,63 @@ +From df246cc8e75cac9054aed0e3f6004bd421088e5b Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 5 Sep 2014 12:49:00 +0200 +Subject: [PATCH 1/2] keyboard: Make it possible to stop watching for WM + changes + +As we don't want to be doing that anymore if we're not in the keyboard +panel anymore. + +https://bugzilla.gnome.org/show_bug.cgi?id=736117 +--- + panels/keyboard/wm-common.c | 11 ++++++++++- + panels/keyboard/wm-common.h | 5 +++-- + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/panels/keyboard/wm-common.c b/panels/keyboard/wm-common.c +index 203dec9..c7270d1 100644 +--- a/panels/keyboard/wm-common.c ++++ b/panels/keyboard/wm-common.c +@@ -162,7 +162,7 @@ wm_window_event_filter (GdkXEvent *xev, + return GDK_FILTER_CONTINUE; + } + +-void ++gpointer + wm_common_register_window_manager_change (GFunc func, + gpointer data) + { +@@ -179,6 +179,15 @@ wm_common_register_window_manager_change (GFunc func, + + XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), GDK_ROOT_WINDOW (), PropertyChangeMask); + XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False); ++ ++ return ncb_data; + } + ++void ++wm_common_unregister_window_manager_change (gpointer id) ++{ ++ g_return_if_fail (id != NULL); + ++ gdk_window_remove_filter (NULL, wm_window_event_filter, id); ++ g_free (id); ++} +diff --git a/panels/keyboard/wm-common.h b/panels/keyboard/wm-common.h +index 4da0d28..8e4f2c4 100644 +--- a/panels/keyboard/wm-common.h ++++ b/panels/keyboard/wm-common.h +@@ -10,8 +10,9 @@ gchar *wm_common_get_current_window_manager (void); + * using _GNOME_WM_KEYBINDINGS if available, _NET_WM_NAME otherwise. */ + char **wm_common_get_current_keybindings (void); + +-void wm_common_register_window_manager_change (GFunc func, +- gpointer data); ++gpointer wm_common_register_window_manager_change (GFunc func, ++ gpointer data); ++void wm_common_unregister_window_manager_change (gpointer id); + + #endif /* WM_COMMON_H */ + +-- +2.1.0 + diff --git a/SOURCES/0001-network-Also-work-with-NM-1.0.patch b/SOURCES/0001-network-Also-work-with-NM-1.0.patch new file mode 100644 index 0000000..691cc8c --- /dev/null +++ b/SOURCES/0001-network-Also-work-with-NM-1.0.patch @@ -0,0 +1,64 @@ +From 5dd32166fd83552901187615431b544e06de58fe Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 18 Dec 2014 08:04:00 +0100 +Subject: [PATCH] network: Also work with NM 1.0 + +Remove the NetworkManager version checking altogether. The code was made +to check for now very old versions of NetworkManager, and anything newer +than ancient should degrade gracefully if we support newer features. + +https://bugzilla.gnome.org/show_bug.cgi?id=741661 +--- + panels/network/cc-network-panel.c | 19 +++---------------- + 1 file changed, 3 insertions(+), 16 deletions(-) + +diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c +index 0352195..352a361 100644 +--- a/panels/network/cc-network-panel.c ++++ b/panels/network/cc-network-panel.c +@@ -1248,30 +1248,17 @@ static gboolean + panel_check_network_manager_version (CcNetworkPanel *panel) + { + const gchar *version; +- gchar **split = NULL; +- guint major = 0; +- guint micro = 0; +- guint minor = 0; + gboolean ret = TRUE; + + /* parse running version */ + version = nm_client_get_version (panel->priv->client); +- if (version != NULL) { +- split = g_strsplit (version, ".", -1); +- major = atoi (split[0]); +- minor = atoi (split[1]); +- micro = atoi (split[2]); +- } +- +- /* is it too new or old */ +- if (major > 0 || minor > 9 || (minor <= 8 && micro < 992)) { ++ if (version == NULL) { + ret = FALSE; + + /* do modal dialog in idle so we don't block startup */ + panel->priv->nm_warning_idle = g_idle_add ((GSourceFunc)display_version_warning_idle, panel); + } + +- g_strfreev (split); + return ret; + } + +@@ -1318,8 +1305,8 @@ on_toplevel_map (GtkWidget *widget, + { + gboolean ret; + +- /* is the user compiling against a new version, but running an +- * old daemon version? */ ++ /* is the user compiling against a new version, but not running ++ * the daemon? */ + ret = panel_check_network_manager_version (panel); + if (ret) { + manager_running (panel->priv->client, NULL, panel); +-- +2.1.0 + diff --git a/SOURCES/0001-network-Fix-typo-in-NetworkManager-version-checking.patch b/SOURCES/0001-network-Fix-typo-in-NetworkManager-version-checking.patch new file mode 100644 index 0000000..2b43d0d --- /dev/null +++ b/SOURCES/0001-network-Fix-typo-in-NetworkManager-version-checking.patch @@ -0,0 +1,28 @@ +From cd2db84aa8939a8e46fdf0a68e09175ddbf82e92 Mon Sep 17 00:00:00 2001 +From: Felix Zhang +Date: Thu, 17 Jul 2014 18:56:28 +0800 +Subject: [PATCH] network: Fix typo in NetworkManager version checking + +The code is meant to work with NetworkManager of version 0.9.0+ or 0.8.992+ + +https://bugzilla.gnome.org/show_bug.cgi?id=733309 +--- + panels/network/cc-network-panel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c +index 3c17897..0352195 100644 +--- a/panels/network/cc-network-panel.c ++++ b/panels/network/cc-network-panel.c +@@ -1264,7 +1264,7 @@ panel_check_network_manager_version (CcNetworkPanel *panel) + } + + /* is it too new or old */ +- if (major > 0 || major > 9 || (minor <= 8 && micro < 992)) { ++ if (major > 0 || minor > 9 || (minor <= 8 && micro < 992)) { + ret = FALSE; + + /* do modal dialog in idle so we don't block startup */ +-- +2.1.0 + diff --git a/SOURCES/0002-keyboard-Fix-a-crash-if-the-WM-changes-or-restarts.patch b/SOURCES/0002-keyboard-Fix-a-crash-if-the-WM-changes-or-restarts.patch new file mode 100644 index 0000000..0ffb473 --- /dev/null +++ b/SOURCES/0002-keyboard-Fix-a-crash-if-the-WM-changes-or-restarts.patch @@ -0,0 +1,64 @@ +From 9f5bbc676cbf712c42a3ad0554cc832c28380981 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Fri, 5 Sep 2014 12:49:41 +0200 +Subject: [PATCH 2/2] keyboard: Fix a crash if the WM changes (or restarts) + +By stopping watching for WM changes when leaving the shortcuts panel. + + #0 reload_sections + #1 wm_window_event_filter + #2 gdk_event_apply_filters at gdkeventsource.c:81 + #3 gdk_event_source_translate_event at gdkeventsource.c:195 + #4 _gdk_x11_display_queue_events at gdkeventsource.c:338 + #5 gdk_display_get_event at gdkdisplay.c:313 + #10 g_main_context_iteration at gmain.c:3766 + #11 g_application_run at gapplication.c:1623 + +See https://bugzilla.redhat.com/show_bug.cgi?id=1094480 + +https://bugzilla.gnome.org/show_bug.cgi?id=736117 + +Conflicts: + panels/keyboard/keyboard-shortcuts.c +--- + panels/keyboard/keyboard-shortcuts.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c +index 0dd7539..3b05fdd 100644 +--- a/panels/keyboard/keyboard-shortcuts.c ++++ b/panels/keyboard/keyboard-shortcuts.c +@@ -87,6 +87,7 @@ static GtkWidget *custom_shortcut_command_entry = NULL; + static GHashTable *kb_system_sections = NULL; + static GHashTable *kb_apps_sections = NULL; + static GHashTable *kb_user_sections = NULL; ++static gpointer wm_changed_id = NULL; + + static void + free_key_array (GPtrArray *keys) +@@ -1844,8 +1845,8 @@ void + keyboard_shortcuts_init (CcPanel *panel, GtkBuilder *builder) + { + g_object_set_data (G_OBJECT (panel), "builder", builder); +- wm_common_register_window_manager_change ((GFunc) on_window_manager_change, +- panel); ++ wm_changed_id = wm_common_register_window_manager_change ((GFunc) on_window_manager_change, ++ panel); + pictures_regex = g_regex_new ("\\$PICTURES", 0, 0, NULL); + setup_dialog (panel, builder); + reload_sections (panel); +@@ -1927,5 +1928,11 @@ keyboard_shortcuts_dispose (CcPanel *panel) + + g_clear_object (&binding_settings); + ++ if (wm_changed_id) ++ { ++ wm_common_unregister_window_manager_change (wm_changed_id); ++ wm_changed_id = NULL; ++ } ++ + cc_keyboard_option_clear_all (); + } +-- +2.1.0 + diff --git a/SPECS/control-center.spec b/SPECS/control-center.spec index 40407dd..28d0a93 100644 --- a/SPECS/control-center.spec +++ b/SPECS/control-center.spec @@ -12,7 +12,7 @@ Summary: Utilities to configure the GNOME desktop Name: control-center Version: 3.8.6 -Release: 15%{?dist} +Release: 18%{?dist} Epoch: 1 License: GPLv2+ and GFDL #VCS: git:git://git.gnome.org/gnome-control-center @@ -49,6 +49,14 @@ Patch12: more-translations.patch # https://bugzilla.redhat.com/show_bug.cgi?id=840913 Patch13: 0001-display-Make-the-Apply-button-insensitive-for-invali.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1094480 +Patch14: 0001-keyboard-Make-it-possible-to-stop-watching-for-WM-ch.patch +Patch15: 0002-keyboard-Fix-a-crash-if-the-WM-changes-or-restarts.patch + +# https://bugzilla.gnome.org/show_bug.cgi?id=741661 +Patch16: 0001-network-Fix-typo-in-NetworkManager-version-checking.patch +Patch17: 0001-network-Also-work-with-NM-1.0.patch + Requires: gnome-settings-daemon >= %{gsd_version} Requires: redhat-menus >= %{redhat_menus_version} Requires: gnome-icon-theme @@ -175,6 +183,10 @@ utilities. %patch11 -p1 %patch12 -p2 %patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 %build %configure \ @@ -261,6 +273,17 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jan 15 2015 Bastien Nocera 3.8.6-18 +- Make network panel work with NetworkManager 1.0 +Resolves: #1175499 + +* Thu Oct 09 2014 David King - 3.8.6-17 +- Rebuild for libgtop2 soversion bump (#1151155) + +* Fri Sep 05 2014 Bastien Nocera 3.8.6-16 +- Fix possible crasher after visiting keyboard panel +Resolves: #1094480 + * Thu Mar 27 2014 Debarshi Ray 3.8.6-15 - Disable the apply button if the display can not be applied Resolves: #840913