diff -Nru gnome-screensaver-3.6.1/debian/changelog gnome-screensaver-3.6.1/debian/changelog --- gnome-screensaver-3.6.1/debian/changelog 2016-09-30 11:14:36.000000000 +0100 +++ gnome-screensaver-3.6.1/debian/changelog 2017-08-31 20:53:09.000000000 +0100 @@ -1,3 +1,11 @@ +gnome-screensaver (3.6.1-7ubuntu6) artful; urgency=medium + + * Add support for Budgie Desktop (LP: #1703690) + - enable support for gnome-control-center + - style the lock-screen using the "Unity" patch-work + + -- David Mohammed Thu, 31 Aug 2017 20:53:09 +0100 + gnome-screensaver (3.6.1-7ubuntu5) yakkety; urgency=medium [ Laurent Bigonville ] diff -Nru gnome-screensaver-3.6.1/debian/patches/0001-gs-lock-plug-Disconnect-signal-handler-from-right-ob.patch gnome-screensaver-3.6.1/debian/patches/0001-gs-lock-plug-Disconnect-signal-handler-from-right-ob.patch --- gnome-screensaver-3.6.1/debian/patches/0001-gs-lock-plug-Disconnect-signal-handler-from-right-ob.patch 2016-09-30 11:14:36.000000000 +0100 +++ gnome-screensaver-3.6.1/debian/patches/0001-gs-lock-plug-Disconnect-signal-handler-from-right-ob.patch 2017-08-31 15:39:03.000000000 +0100 @@ -10,11 +10,11 @@ src/gs-lock-plug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c -index 1e74d8f..ee4c0f3 100644 ---- a/src/gs-lock-plug.c -+++ b/src/gs-lock-plug.c -@@ -483,7 +483,7 @@ gs_lock_plug_run (GSLockPlug *plug) +Index: gnome-screensaver-3.6.1/src/gs-lock-plug.c +=================================================================== +--- gnome-screensaver-3.6.1.orig/src/gs-lock-plug.c ++++ gnome-screensaver-3.6.1/src/gs-lock-plug.c +@@ -522,7 +522,7 @@ gs_lock_plug_run (GSLockPlug *plug) g_signal_handler_disconnect (plug, unmap_handler); g_signal_handler_disconnect (plug, delete_handler); g_signal_handler_disconnect (plug, destroy_handler); @@ -23,6 +23,3 @@ } g_object_unref (plug); --- -2.1.4 - diff -Nru gnome-screensaver-3.6.1/debian/patches/33_budgie_support.patch gnome-screensaver-3.6.1/debian/patches/33_budgie_support.patch --- gnome-screensaver-3.6.1/debian/patches/33_budgie_support.patch 1970-01-01 01:00:00.000000000 +0100 +++ gnome-screensaver-3.6.1/debian/patches/33_budgie_support.patch 2017-08-31 20:44:59.000000000 +0100 @@ -0,0 +1,227 @@ +Description: Add support for the Budgie Desktop + Budgie Desktop uses gnome-screensaver. This patch adds support + for the gnome-control-center background lock screen dialog. + In addition, the lock screen is styled for Budgie using the "Unity" + style patches. +Author: David Mohammed +Date: Thu, 31 Aug 2017 12:28:19 +0100 +Index: gnome-screensaver-3.6.1/src/gs-manager.c +=================================================================== +--- gnome-screensaver-3.6.1.orig/src/gs-manager.c ++++ gnome-screensaver-3.6.1/src/gs-manager.c +@@ -36,6 +36,7 @@ + #include "gs-grab.h" + #include "gs-fade.h" + #include "gs-debug.h" ++#include "gs-common.h" + + static void gs_manager_class_init (GSManagerClass *klass); + static void gs_manager_init (GSManager *manager); +@@ -567,6 +568,13 @@ get_system_settings (void) + GSettings *settings; + + settings = g_settings_new ("org.gnome.desktop.background"); ++ if (in_desktop("Budgie")) { ++ settings = g_settings_new ("org.gnome.desktop.screensaver"); ++ g_settings_delay (settings); ++ } ++ else { ++ settings = g_settings_new ("org.gnome.desktop.background"); ++ } + + return settings; + } +Index: gnome-screensaver-3.6.1/src/gs-window-x11.c +=================================================================== +--- gnome-screensaver-3.6.1.orig/src/gs-window-x11.c ++++ gnome-screensaver-3.6.1/src/gs-window-x11.c +@@ -41,6 +41,7 @@ + #include "gs-marshal.h" + #include "subprocs.h" + #include "gs-debug.h" ++#include "gs-common.h" + + #ifdef HAVE_SHAPE_EXT + #include +@@ -2328,9 +2329,8 @@ gs_window_init (GSWindow *window) + gtk_widget_show (window->priv->vbox); + gtk_container_add (GTK_CONTAINER (window), window->priv->vbox); + +- /* Only display top bar if we're not running under Unity */ +- if (!g_getenv ("XDG_CURRENT_DESKTOP") || +- strcmp (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") != 0) { ++ /* Only display top bar if we're not running under Unity or Budgie */ ++ if (!in_desktop ("Unity") && !in_desktop ("Budgie")) { + window->priv->panel = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); + gtk_widget_show (window->priv->panel); + gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->priv->panel, FALSE, FALSE, 0); +Index: gnome-screensaver-3.6.1/src/gs-lock-plug.c +=================================================================== +--- gnome-screensaver-3.6.1.orig/src/gs-lock-plug.c ++++ gnome-screensaver-3.6.1/src/gs-lock-plug.c +@@ -40,6 +40,7 @@ + #include + + #include "gs-lock-plug.h" ++#include "gs-common.h" + + #include "gs-debug.h" + +@@ -1278,9 +1279,8 @@ gs_lock_plug_enable_prompt (GSLockPlug * + gtk_widget_show (plug->priv->auth_unlock_button); + gtk_widget_grab_default (plug->priv->auth_unlock_button); + +- /* Change appearance if we're running under Unity */ +- if (g_getenv ("XDG_CURRENT_DESKTOP") && +- strcmp (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0) { ++ /* Change appearance if we're running under Unity or Budgie*/ ++ if (in_desktop ("Unity") || in_desktop ("Budgie")) { + markup = g_strdup_printf ("%s", message); + } else { + markup = g_strdup_printf ("%s", message); +@@ -1534,8 +1534,8 @@ gs_lock_plug_init_input_sources (GSLockP + input_source->subscript = 1; + input_source->index = i; + +- if (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0) +- input_source->name[0] = g_ascii_toupper (input_source->name[0]); ++ if (in_desktop ("Unity") || in_desktop ("Budgie")) ++ input_source->name[0] = g_ascii_toupper (input_source->name[0]); + + for (j = plug->priv->input_sources->len - 1; j >= 0; j--) { + InputSource *input_source_j = g_ptr_array_index (plug->priv->input_sources, j); +@@ -1609,9 +1609,8 @@ create_page_one (GSLockPlug *plug) + gtk_box_pack_start (GTK_BOX (hbox), vbox2, TRUE, TRUE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox2), 10); + +- /* Change appearance if we're running under Unity */ +- if (g_getenv ("XDG_CURRENT_DESKTOP") && +- strcmp (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") == 0) { ++ /* Change appearance if we're running under Unity or Budgie*/ ++ if (in_desktop ("Unity") || in_desktop ("Budgie")) { + gtk_box_set_spacing (vbox2, 0); + gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_face_image), 0, 0.5); + plug->priv->auth_realname_label = gtk_label_new (NULL); +Index: gnome-screensaver-3.6.1/src/gs-common.c +=================================================================== +--- /dev/null ++++ gnome-screensaver-3.6.1/src/gs-common.c +@@ -0,0 +1,50 @@ ++/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8; tab-width: 8 -*- ++ * ++ * Copyright (C) 2017 David Mohammed ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++ * 02110-1301, USA. ++ * ++ * Authors: David Mohammed ++ * ++ */ ++ ++#include ++#include ++ ++#include "gs-common.h" ++#include "gs-debug.h" ++ ++gboolean ++in_desktop (const gchar *name) ++{ ++ const gchar *desktop_name_list; ++ gchar **names; ++ gboolean in_list = FALSE; ++ ++ desktop_name_list = g_getenv ("XDG_CURRENT_DESKTOP"); ++ if (!desktop_name_list) ++ return FALSE; ++ ++ names = g_strsplit (desktop_name_list, ":", -1); ++ ++ if (!names) ++ return FALSE; ++ ++ in_list = g_strv_contains ((const gchar * const *)names, name); ++ g_strfreev (names); ++ ++ return in_list; ++} +Index: gnome-screensaver-3.6.1/src/gs-common.h +=================================================================== +--- /dev/null ++++ gnome-screensaver-3.6.1/src/gs-common.h +@@ -0,0 +1,32 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2017 David Mohammed ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ * ++ * Authors: David Mohammed ++ * ++ */ ++ ++#ifndef __GS_COMMON_H ++#define __GS_COMMON_H ++ ++G_BEGIN_DECLS ++ ++gboolean in_desktop (const gchar *name); ++ ++G_END_DECLS ++ ++#endif +Index: gnome-screensaver-3.6.1/src/Makefile.am +=================================================================== +--- gnome-screensaver-3.6.1.orig/src/Makefile.am ++++ gnome-screensaver-3.6.1/src/Makefile.am +@@ -111,6 +111,8 @@ test_watcher_LDADD = \ + + test_window_SOURCES = \ + test-window.c \ ++ gs-common.h \ ++ gs-common.c \ + gs-window.h \ + gs-window-x11.c \ + gs-grab-x11.c \ +@@ -130,6 +132,8 @@ test_window_LDADD = \ + + gnome_screensaver_dialog_SOURCES = \ + gnome-screensaver-dialog.c \ ++ gs-common.h \ ++ gs-common.c \ + gs-lock-plug.c \ + gs-lock-plug.h \ + gs-debug.c \ +@@ -166,6 +170,8 @@ gnome_screensaver_SOURCES = \ + bus.h \ + gnome-screensaver.c \ + gnome-screensaver.h \ ++ gs-common.h \ ++ gs-common.c \ + gs-monitor.c \ + gs-monitor.h \ + gs-watcher-x11.c \ diff -Nru gnome-screensaver-3.6.1/debian/patches/series gnome-screensaver-3.6.1/debian/patches/series --- gnome-screensaver-3.6.1/debian/patches/series 2016-09-30 11:14:36.000000000 +0100 +++ gnome-screensaver-3.6.1/debian/patches/series 2017-08-31 10:28:42.000000000 +0100 @@ -21,3 +21,4 @@ allow-replacement libsystemd.patch 0001-gs-lock-plug-Disconnect-signal-handler-from-right-ob.patch +33_budgie_support.patch