diff options
| author | Khurshid Alam <sysadmin@grnconnect.com> | 2020-02-24 11:25:06 +0530 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-02-27 21:29:22 +0100 |
| commit | 1c04ffe3afc863f0f9a10f17729074cfc80b46b6 (patch) | |
| tree | 77b6c0a3280b533ccfe373c3e0b4f581f4b98e7e | |
| parent | 73be28749656fcbafe9154e80e9edcb11b315e6b (diff) | |
Drop libgnome-desktop for background drawing.
Use libunity-settings-daemon instead. LP: #1863584
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | debian/control | 2 | ||||
| -rw-r--r-- | lockscreen/BackgroundSettings.cpp | 20 | ||||
| -rw-r--r-- | lockscreen/BackgroundSettings.h | 4 |
5 files changed, 23 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 249b8fccd..e12a71a9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,6 +245,7 @@ set(UNITY_PLUGIN_SHARED_DEPS json-glib-1.0 libbamf3>=0.5.3 gnome-desktop-3.0 + libunity-settings-daemon libnotify libstartup-notification-1.0 nux-4.0>=4.0.5 diff --git a/debian/changelog b/debian/changelog index cdfd2b679..9525293eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +unity (7.5.0+20.04.20200211-0ubuntu2) UNRELEASED; urgency=medium + + [ Khurshid Alam ] + * Drop libgnome-desktop for background drawing. + Use libunity-settings-daemon instead. LP: #1863584 + + -- Sebastien Bacher <seb128@ubuntu.com> Thu, 27 Feb 2020 21:28:09 +0100 + unity (7.5.0+20.04.20200211-0ubuntu1) focal; urgency=medium [ Rik Mills ] diff --git a/debian/control b/debian/control index 05ea690b7..50188334f 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,8 @@ Build-Depends: cmake, libgl1-mesa-dri, libglib2.0-dev (>= 2.39.1), libgnome-desktop-3-dev, + libunity-settings-daemon-dev, + unity-settings-daemon-dev, libgtest-dev, libgtk-3-dev (>= 3.1), libido3-0.1-dev (>= 13.10.0), diff --git a/lockscreen/BackgroundSettings.cpp b/lockscreen/BackgroundSettings.cpp index 7ef4c6bee..896c03239 100644 --- a/lockscreen/BackgroundSettings.cpp +++ b/lockscreen/BackgroundSettings.cpp @@ -20,7 +20,7 @@ #include <Nux/Nux.h> #include "BackgroundSettings.h" -#include <libgnome-desktop/gnome-bg.h> +#include <libunity-settings-daemon/gsd-bg.h> #include "LockScreenSettings.h" #include "unity-shared/CairoTexture.h" @@ -40,10 +40,10 @@ inline int GetGridOffset(int size) { return (size % Settings::GRID_SIZE) / 2; } } BackgroundSettings::BackgroundSettings() - : gnome_bg_(gnome_bg_new()) + : gsd_bg_(gsd_bg_new()) { glib::Object<GSettings> settings(g_settings_new(SETTINGS_NAME.c_str())); - gnome_bg_load_from_preferences(gnome_bg_, settings); + gsd_bg_load_from_preferences(gsd_bg_, settings); } BaseTexturePtr BackgroundSettings::GetBackgroundTexture(int monitor) @@ -55,26 +55,26 @@ BaseTexturePtr BackgroundSettings::GetBackgroundTexture(int monitor) nux::CairoGraphics cairo_graphics(CAIRO_FORMAT_ARGB32, geo.width, geo.height); cairo_t* c = cairo_graphics.GetInternalContext(); - glib::Object<GnomeBG> gnome_bg; + glib::Object<GsdBG> gsd_bg; double s_width = geo.width / scale; double s_height = geo.height / scale; cairo_surface_t* bg_surface = nullptr; if (settings.use_user_background()) { - gnome_bg = gnome_bg_; + gsd_bg = gsd_bg_; } else if (!settings.background().empty()) { - gnome_bg = gnome_bg_new(); - gnome_bg_set_filename(gnome_bg, settings.background().c_str()); - gnome_bg_set_placement(gnome_bg, G_DESKTOP_BACKGROUND_STYLE_ZOOM); + gsd_bg = gsd_bg_new(); + gsd_bg_set_filename(gsd_bg, settings.background().c_str()); + gsd_bg_set_placement(gsd_bg, G_DESKTOP_BACKGROUND_STYLE_ZOOM); } - if (gnome_bg) + if (gsd_bg) { auto *root_window = gdk_get_default_root_window(); - bg_surface = gnome_bg_create_surface(gnome_bg, root_window, geo.width, geo.height, FALSE); + bg_surface = gsd_bg_create_surface(gsd_bg, root_window, geo.width, geo.height, FALSE); } auto const& bg_color = settings.background_color(); diff --git a/lockscreen/BackgroundSettings.h b/lockscreen/BackgroundSettings.h index 2176cb33a..161709f57 100644 --- a/lockscreen/BackgroundSettings.h +++ b/lockscreen/BackgroundSettings.h @@ -28,7 +28,7 @@ namespace nux class BaseTexture; } -class _GnomeBG; +class _GsdBG; namespace unity { @@ -45,7 +45,7 @@ public: BaseTexturePtr GetBackgroundTexture(int monitor); private: - glib::Object<_GnomeBG> gnome_bg_; + glib::Object<_GsdBG> gsd_bg_; }; } |
