Hello community, here is the log from the commit of package cinnamon-settings-daemon for openSUSE:Factory checked in at 2020-09-17 14:47:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cinnamon-settings-daemon (Old) and /work/SRC/openSUSE:Factory/.cinnamon-settings-daemon.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon-settings-daemon" Thu Sep 17 14:47:46 2020 rev:23 rq:834950 version:4.6.4 Changes: -------- --- /work/SRC/openSUSE:Factory/cinnamon-settings-daemon/cinnamon-settings-daemon.changes 2020-03-17 13:10:59.985838331 +0100 +++ /work/SRC/openSUSE:Factory/.cinnamon-settings-daemon.new.4249/cinnamon-settings-daemon.changes 2020-09-17 14:50:54.647914432 +0200 @@ -1,0 +2,6 @@ +Sun Sep 13 19:39:07 UTC 2020 - andy great <andythe_gr...@pm.me> + +- Update to version 4.6.4. + * csd-automount-manager.c: Add a small delay to folder opening. + +------------------------------------------------------------------- Old: ---- cinnamon-settings-daemon-4.4.0.tar.gz New: ---- cinnamon-settings-daemon-4.6.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cinnamon-settings-daemon.spec ++++++ --- /var/tmp/diff_new_pack.feCtTB/_old 2020-09-17 14:50:56.823916509 +0200 +++ /var/tmp/diff_new_pack.feCtTB/_new 2020-09-17 14:50:56.827916513 +0200 @@ -1,7 +1,7 @@ # # spec file for package cinnamon-settings-daemon # -# Copyright (c) 2020 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: cinnamon-settings-daemon -Version: 4.4.0 +Version: 4.6.4 Release: 0 Summary: The settings Daemon for the Cinnamon Desktop License: GPL-2.0-or-later AND LGPL-2.1-only @@ -109,7 +109,7 @@ %files %license COPYING* %doc AUTHORS README.rst debian/changelog -%config %{_sysconfdir}/dbus-1/system.d/org.cinnamon.SettingsDaemon.DateTimeMechanism.conf +%config %{_datadir}/dbus-1/system.d/org.cinnamon.SettingsDaemon.DateTimeMechanism.conf %{_sysconfdir}/xdg/autostart/%{name}-*.desktop %{_libdir}/%{name}-3.0/ %{_datadir}/%{name}-3.0/ ++++++ cinnamon-settings-daemon-4.4.0.tar.gz -> cinnamon-settings-daemon-4.6.4.tar.gz ++++++ ++++ 1629 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/.circleci/config.yml new/cinnamon-settings-daemon-4.6.4/.circleci/config.yml --- old/cinnamon-settings-daemon-4.4.0/.circleci/config.yml 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/.circleci/config.yml 2020-06-21 14:36:49.000000000 +0200 @@ -46,19 +46,19 @@ fi jobs: - "mint19": + "mint20": <<: *shared docker: - - image: linuxmintd/mint19-amd64 + - image: linuxmintd/mint20-amd64 - "lmde3": + "lmde4": <<: *shared docker: - - image: linuxmintd/lmde3-amd64 + - image: linuxmintd/lmde4-amd64 workflows: version: 2 build: jobs: - - "mint19" - - "lmde3" + - "mint20" + - "lmde4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/cinnamon-settings-daemon/cinnamon-settings-session.c new/cinnamon-settings-daemon-4.6.4/cinnamon-settings-daemon/cinnamon-settings-session.c --- old/cinnamon-settings-daemon-4.4.0/cinnamon-settings-daemon/cinnamon-settings-session.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/cinnamon-settings-daemon/cinnamon-settings-session.c 2020-06-21 14:36:49.000000000 +0200 @@ -378,7 +378,7 @@ session->priv = CINNAMON_SETTINGS_SESSION_GET_PRIVATE (session); #ifdef HAVE_LOGIND - if (access("/run/systemd/system/", F_OK) == 0) { // sd_booted () + if (access("/run/systemd/seats/", F_OK) == 0) { // sd_booted () sd_pid_get_session (getpid(), &session->priv->session_id); session->priv->sd_source = sd_source_new (); g_source_set_callback (session->priv->sd_source, sessions_changed, session, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/configure.ac new/cinnamon-settings-daemon-4.6.4/configure.ac --- old/cinnamon-settings-daemon-4.4.0/configure.ac 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/configure.ac 2020-06-21 14:36:49.000000000 +0200 @@ -1,7 +1,7 @@ AC_PREREQ([2.60]) AC_INIT([cinnamon-settings-daemon], - [4.4.0], + [4.6.4], [https://github.com/linuxmint/cinnamon-settings-daemon/issues]) AC_CONFIG_MACRO_DIR([m4]) @@ -136,16 +136,23 @@ AC_ARG_WITH(dbus-sys, [AC_HELP_STRING([--with-dbus-sys=<dir>], [where D-BUS system.d directory is])]) -AC_ARG_WITH(dbus-services, - [AC_HELP_STRING([--with-dbus-services=<dir>], - [where D-BUS services directory is])]) if ! test -z "$with_dbus_sys" ; then DBUS_SYS_DIR="$with_dbus_sys" else - DBUS_SYS_DIR='${sysconfdir}/dbus-1/system.d' + DBUS_SYS_DIR='${datadir}/dbus-1/system.d' fi AC_SUBST(DBUS_SYS_DIR) +AC_ARG_WITH(dbus-services, + [AC_HELP_STRING([--with-dbus-services=<dir>], + [where D-BUS services directory is])]) +if ! test -z "$with_dbus_services" ; then + DBUS_SERVICES_DIR="$with_dbus_services" +else + DBUS_SERVICES_DIR='${datadir}/dbus-1/system-services' +fi +AC_SUBST(DBUS_SERVICES_DIR) + dnl --------------------------------------------------------------------------- dnl - GUdev integration (default enabled) dnl --------------------------------------------------------------------------- @@ -200,7 +207,7 @@ dnl - xsettings dnl --------------------------------------------------------------------------- -PKG_CHECK_MODULES(XSETTINGS, fontconfig) +PKG_CHECK_MODULES(XSETTINGS, fontconfig cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION) dnl --------------------------------------------------------------------------- dnl - Keyboard plugin stuff @@ -255,14 +262,34 @@ dnl - color dnl --------------------------------------------------------------------------- -PKG_CHECK_MODULES(COLOR, [colord >= 0.1.27 cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION libcanberra-gtk3]) +AC_ARG_ENABLE(color, + AS_HELP_STRING([--disable-color], [disable Colord support (default: enabled)]),, + enable_color=yes) +build_color=false +if test x"$enable_color" != x"no" ; then + PKG_CHECK_MODULES(COLOR, [colord >= 0.1.27 cinnamon-desktop >= $CINNAMON_DESKTOP_REQUIRED_VERSION libcanberra-gtk3]) + build_color=true +fi + +AM_CONDITIONAL(BUILD_COLOR, [test "x$build_color" = "xtrue"]) dnl --------------------------------------------------------------------------- dnl - wacom dnl --------------------------------------------------------------------------- +AC_ARG_ENABLE(wacom, + AS_HELP_STRING([--disable-wacom], [disable Wacom support (default: auto)]),, + enable_wacom=auto) build_wacom=false -PKG_CHECK_MODULES(WACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION x11 xi xtst gudev-1.0 cinnamon-desktop xorg-wacom librsvg-2.0 >= $LIBRSVG_REQUIRED_VERSION gtk+-3.0 >= 3.8.0], - [build_wacom="true" AC_DEFINE(HAVE_WACOM, 1, [Define if wacom is being build])], [build_wacom="false"]) +if test x"$enable_wacom" != x"no" ; then + PKG_CHECK_MODULES(WACOM, [libwacom >= $LIBWACOM_REQUIRED_VERSION x11 xi xtst gudev-1.0 cinnamon-desktop xorg-wacom librsvg-2.0 >= $LIBRSVG_REQUIRED_VERSION gtk+-3.0 >= 3.8.0], + [build_wacom="true" AC_DEFINE(HAVE_WACOM, 1, [Define if wacom is being build])], [build_wacom="false"]) +fi + +if test x$enable_wacom = xyes; then + if test x$build_wacom = xfalse; then + AC_MSG_ERROR(Wacom support requested but required dependencies not found) + fi +fi AM_CONDITIONAL(BUILD_WACOM, test "x$build_wacom" = "xtrue") @@ -280,12 +307,12 @@ esac], [WANT_SMARTCARD_SUPPORT=yes]) +have_smartcard_support=false if test x$WANT_SMARTCARD_SUPPORT = xyes ; then NSS_REQUIRED_VERSION=3.11.2 - PKG_CHECK_MODULES(NSS, nss >= $NSS_REQUIRED_VERSION, - [have_smartcard_support=true - AC_DEFINE(SMARTCARD_SUPPORT, 1, [Define if smartcard support should be enabled])], - [have_smartcard_support=false]) + PKG_CHECK_MODULES(NSS, [nss >= $NSS_REQUIRED_VERSION]) + have_smartcard_support=true + AC_DEFINE(SMARTCARD_SUPPORT, 1, [Define if smartcard support should be enabled]) fi AM_CONDITIONAL(SMARTCARD_SUPPORT, test "x$have_smartcard_support" = "xtrue") @@ -311,24 +338,6 @@ AC_SUBST(NSS_DATABASE) -dnl --------------------------------------------------------------------------- -dnl - Check for D-Bus -dnl --------------------------------------------------------------------------- - -dnl - Are we specifying a different dbus root ? -AC_ARG_WITH(dbus-sys, - [AC_HELP_STRING([--with-dbus-sys=<dir>], - [where D-BUS system.d directory is])]) -AC_ARG_WITH(dbus-services, - [AC_HELP_STRING([--with-dbus-services=<dir>], - [where D-BUS services directory is])]) -if ! test -z "$with_dbus_sys" ; then - DBUS_SYS_DIR="$with_dbus_sys" -else - DBUS_SYS_DIR='${sysconfdir}/dbus-1/system.d' -fi -AC_SUBST(DBUS_SYS_DIR) - # --------------------------------------------------------------------------- # PolicyKit for the date & time mechanism # --------------------------------------------------------------------------- @@ -368,12 +377,26 @@ dnl Check for logind dnl ==================================================================== -PKG_CHECK_MODULES(LOGIND, [libsystemd-login], [have_logind=yes], [ - PKG_CHECK_MODULES(LOGIND, [libsystemd], [have_logind=yes], [have_logind=no]) -]) +AC_ARG_ENABLE([logind], + AS_HELP_STRING([--disable-logind], [Do not check for logind]), + [enable_logind=$enableval], + [enable_logind=auto]) + +have_logind=no +if test x$enable_logind != xno ; then + PKG_CHECK_MODULES(LOGIND, [libsystemd-login], [have_logind=yes], [ + PKG_CHECK_MODULES(LOGIND, [libsystemd], [have_logind=yes], [ + PKG_CHECK_MODULES(LOGIND, [libelogind], [have_logind=yes], [have_logind=no]) + ]) + ]) +fi if test x$have_logind = xyes; then AC_DEFINE(HAVE_LOGIND, 1, [Define if logind is supported]) +else + if test x$enable_logind = xyes; then + AC_MSG_ERROR([logind support requested but neither systemd or elogind were not found]) + fi fi AC_SUBST(LOGIND_CFLAGS) @@ -534,6 +557,7 @@ LCMS DICT support: ${have_new_lcms} Libnotify support: ${have_libnotify} + Colord support: ${build_color} Wacom support: ${build_wacom} Smartcard support: ${have_smartcard_support} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/data/Makefile.am new/cinnamon-settings-daemon-4.6.4/data/Makefile.am --- old/cinnamon-settings-daemon-4.4.0/data/Makefile.am 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/data/Makefile.am 2020-06-21 14:36:49.000000000 +0200 @@ -26,8 +26,6 @@ @INTLTOOL_XML_NOMERGE_RULE@ -dbusservice_in_files = org.freedesktop.IBus.service.in - EXTRA_DIST = \ $(man_MANS) \ $(convert_DATA) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/data/org.freedesktop.IBus.service.in new/cinnamon-settings-daemon-4.6.4/data/org.freedesktop.IBus.service.in --- old/cinnamon-settings-daemon-4.4.0/data/org.freedesktop.IBus.service.in 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/data/org.freedesktop.IBus.service.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.freedesktop.IBus -Exec=@bindir@/ibus-daemon --replace --xim --panel disable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/debian/changelog new/cinnamon-settings-daemon-4.6.4/debian/changelog --- old/cinnamon-settings-daemon-4.4.0/debian/changelog 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/debian/changelog 2020-06-21 14:36:49.000000000 +0200 @@ -1,3 +1,61 @@ +cinnamon-settings-daemon (4.6.4) ulyana; urgency=medium + + [ Michael Webster ] + * csd-automount-manager.c: Add a small delay to folder opening after (#290) + + -- Clement Lefebvre <r...@linuxmint.com> Sun, 21 Jun 2020 13:36:11 +0100 + +cinnamon-settings-daemon (4.6.3) ulyana; urgency=medium + + * l10n: Fix missing i18n in wacom and print-notifications plugins + + -- Clement Lefebvre <r...@linuxmint.com> Wed, 17 Jun 2020 15:37:00 +0100 + +cinnamon-settings-daemon (4.6.2) ulyana; urgency=medium + + [ Michael Webster ] + * debian/cinnamon-settings-daemon.links: Fix typo. + + [ Clement Lefebvre ] + * CI: Target Mint 20 and LMDE 4 + + -- Clement Lefebvre <r...@linuxmint.com> Wed, 10 Jun 2020 13:03:17 +0100 + +cinnamon-settings-daemon (4.6.1) ulyana; urgency=medium + + [ Garry Filakhtov ] + * Fix the build in highly-concurrent scenarios + + -- Clement Lefebvre <r...@linuxmint.com> Wed, 27 May 2020 12:39:02 +0100 + +cinnamon-settings-daemon (4.6.0) ulyana; urgency=medium + + [ Leigh Scott ] + * Restore old check for logind + + [ Markus Teich ] + * Handle a custom screensaver command + + [ Eli Schwartz ] + * Fix up the configure check for dbus directories. + * Remove old ibus files from the tree. + + [ Michael Webster ] + * csd-xrandr-manager.c: Check if we were given laptop info before trying to use it (fixes a warning usually at startup). + + [ Clement Lefebvre ] + * Update project URL + + [ Michael Webster ] + * csd-xrandr-manager.c: Update for new cinnamon-desktop api to use legacy monitor.xml files. + * xrandr/xsettings: Make global scale factor a monitor-configuration value. + * csd-xrandr: Fix misleading message when no existing configurations are found. + + [ Garry Filakhtov ] + * Modify build system to make some dependencies optional and fix some required dependencies (#285) + + -- Clement Lefebvre <r...@linuxmint.com> Tue, 12 May 2020 14:42:34 +0100 + cinnamon-settings-daemon (4.4.0) tricia; urgency=medium [ Michael Webster ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/debian/cinnamon-settings-daemon.install new/cinnamon-settings-daemon-4.6.4/debian/cinnamon-settings-daemon.install --- old/cinnamon-settings-daemon-4.4.0/debian/cinnamon-settings-daemon.install 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/debian/cinnamon-settings-daemon.install 2020-06-21 14:36:49.000000000 +0200 @@ -1,5 +1,4 @@ debian/source_cinnamon-settings-daemon.py /usr/share/apport/package-hooks -etc/dbus-1/system.d/org.cinnamon.SettingsDaemon.DateTimeMechanism.conf etc/xdg/autostart/* usr/lib/*/cinnamon-settings-daemon*/*.so usr/lib/*/cinnamon-settings-daemon/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/debian/cinnamon-settings-daemon.links.in new/cinnamon-settings-daemon-4.6.4/debian/cinnamon-settings-daemon.links.in --- old/cinnamon-settings-daemon-4.4.0/debian/cinnamon-settings-daemon.links.in 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/debian/cinnamon-settings-daemon.links.in 2020-06-21 14:36:49.000000000 +0200 @@ -1,4 +1,4 @@ -usr/lib/@DEB_HOST_MULTIARCH@/cinnamon-settings-daemon/csd-a11y-keyboard usr/bin/csd-a11-keyboard +usr/lib/@DEB_HOST_MULTIARCH@/cinnamon-settings-daemon/csd-a11y-keyboard usr/bin/csd-a11y-keyboard usr/lib/@DEB_HOST_MULTIARCH@/cinnamon-settings-daemon/csd-a11y-settings usr/bin/csd-a11y-settings usr/lib/@DEB_HOST_MULTIARCH@/cinnamon-settings-daemon/csd-automount usr/bin/csd-automount usr/lib/@DEB_HOST_MULTIARCH@/cinnamon-settings-daemon/csd-background usr/bin/csd-background diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/debian/cinnamon-settings-daemon.maintscript new/cinnamon-settings-daemon-4.6.4/debian/cinnamon-settings-daemon.maintscript --- old/cinnamon-settings-daemon-4.4.0/debian/cinnamon-settings-daemon.maintscript 1970-01-01 01:00:00.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/debian/cinnamon-settings-daemon.maintscript 2020-06-21 14:36:49.000000000 +0200 @@ -0,0 +1 @@ +rm_conffile /etc/dbus-1/system.d/org.cinnamon.SettingsDaemon.DateTimeMechanism.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/debian/control new/cinnamon-settings-daemon-4.6.4/debian/control --- old/cinnamon-settings-daemon-4.4.0/debian/control 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/debian/control 2020-06-21 14:36:49.000000000 +0200 @@ -37,7 +37,6 @@ xserver-xorg-input-wacom [!s390x !hurd-any !kfreebsd-any], xsltproc, Standards-Version: 3.9.8 -Homepage: http://cinnamon.linuxmint.com Package: cinnamon-settings-daemon Architecture: any diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/Makefile.am new/cinnamon-settings-daemon-4.6.4/plugins/Makefile.am --- old/cinnamon-settings-daemon-4.4.0/plugins/Makefile.am 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/Makefile.am 2020-06-21 14:36:49.000000000 +0200 @@ -6,7 +6,6 @@ automount \ background \ clipboard \ - color \ cursor \ dummy \ datetime \ @@ -24,6 +23,12 @@ disabled_plugins = $(NULL) +if BUILD_COLOR +enabled_plugins += color +else +disabled_plugins += color +endif + if BUILD_WACOM enabled_plugins += wacom else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/automount/csd-automount-manager.c new/cinnamon-settings-daemon-4.6.4/plugins/automount/csd-automount-manager.c --- old/cinnamon-settings-daemon-4.4.0/plugins/automount/csd-automount-manager.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/automount/csd-automount-manager.c 2020-06-21 14:36:49.000000000 +0200 @@ -38,6 +38,7 @@ struct CsdAutomountManagerPrivate { GSettings *settings; + GSettings *settings_screensaver; GVolumeMonitor *volume_monitor; unsigned int automount_idle_id; @@ -243,9 +244,11 @@ } } -static void -autorun_show_window (GMount *mount, gpointer user_data) +static gboolean +delayed_show_window (gpointer data) { + GMount *mount = G_MOUNT (data); + GFile *location; char *uri; GError *error; @@ -284,6 +287,14 @@ g_free (uri); g_object_unref (location); + + return G_SOURCE_REMOVE; +} + +static void +autorun_show_window (GMount *mount, gpointer user_data) +{ + g_timeout_add_seconds (1, (GSourceFunc) delayed_show_window, mount); } static void @@ -482,7 +493,15 @@ setup_automounter (CsdAutomountManager *manager) { do_initialize_session (manager); - do_initialize_screensaver (manager); + + gchar *custom_saver = g_settings_get_string (manager->priv->settings_screensaver, + "custom-screensaver-command"); + + /* if we fail to get the gsettings entry, or if the user did not select + * a custom screen saver, default to cinnamon-screensaver */ + if (NULL == custom_saver || g_strcmp0 (custom_saver, "") == 0) + do_initialize_screensaver (manager); + g_free (custom_saver); manager->priv->volume_monitor = g_volume_monitor_get (); g_signal_connect_object (manager->priv->volume_monitor, "mount-added", @@ -506,6 +525,7 @@ cinnamon_settings_profile_start (NULL); manager->priv->settings = g_settings_new ("org.cinnamon.desktop.media-handling"); + manager->priv->settings_screensaver = g_settings_new ("org.cinnamon.desktop.screensaver"); setup_automounter (manager); cinnamon_settings_profile_end (NULL); @@ -535,6 +555,11 @@ p->settings = NULL; } + if (p->settings_screensaver != NULL) { + g_object_unref (p->settings_screensaver); + p->settings_screensaver = NULL; + } + if (p->ss_proxy != NULL) { g_object_unref (p->ss_proxy); p->ss_proxy = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/common/csd-power-helper.c new/cinnamon-settings-daemon-4.6.4/plugins/common/csd-power-helper.c --- old/cinnamon-settings-daemon-4.4.0/plugins/common/csd-power-helper.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/common/csd-power-helper.c 2020-06-21 14:36:49.000000000 +0200 @@ -41,7 +41,7 @@ static gsize once_init_value = 0; if (g_once_init_enter (&once_init_value)) { - should_use_logind = access("/run/systemd/system/", F_OK) == 0; // sd_booted () + should_use_logind = access("/run/systemd/seats/", F_OK) == 0; // sd_booted () g_once_init_leave (&once_init_value, 1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/datetime/Makefile.am new/cinnamon-settings-daemon-4.6.4/plugins/datetime/Makefile.am --- old/cinnamon-settings-daemon-4.4.0/plugins/datetime/Makefile.am 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/datetime/Makefile.am 2020-06-21 14:36:49.000000000 +0200 @@ -1,7 +1,7 @@ plugin_name = datetime -dbus_servicesdir = $(datadir)/dbus-1/system-services -dbus_confdir = $(sysconfdir)/dbus-1/system.d +dbus_servicesdir = @DBUS_SERVICES_DIR@ +dbus_confdir = @DBUS_SYS_DIR@ polkitdir = $(datadir)/polkit-1/actions dbus_services_in_files = org.cinnamon.SettingsDaemon.DateTimeMechanism.service.in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/datetime/org.cinnamon.settingsdaemon.datetimemechanism.policy.in new/cinnamon-settings-daemon-4.6.4/plugins/datetime/org.cinnamon.settingsdaemon.datetimemechanism.policy.in --- old/cinnamon-settings-daemon-4.4.0/plugins/datetime/org.cinnamon.settingsdaemon.datetimemechanism.policy.in 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/datetime/org.cinnamon.settingsdaemon.datetimemechanism.policy.in 2020-06-21 14:36:49.000000000 +0200 @@ -5,7 +5,7 @@ <policyconfig> <vendor>Cinnamon</vendor> - <vendor_url>http://cinnamon.linuxmint.com/</vendor_url> + <vendor_url>https://projects.linuxmint.com/cinnamon/</vendor_url> <icon_name>gnome-panel-clock</icon_name> <action id="org.cinnamon.settingsdaemon.datetimemechanism.configure"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/power/Makefile.am new/cinnamon-settings-daemon-4.6.4/plugins/power/Makefile.am --- old/cinnamon-settings-daemon-4.4.0/plugins/power/Makefile.am 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/power/Makefile.am 2020-06-21 14:36:49.000000000 +0200 @@ -41,6 +41,8 @@ $(NULL) csd-power-keyboard-proxy.c : csd-power-keyboard-proxy.h +csd-power-manager.c : csd-power-proxy.h csd-power-screen-proxy.h csd-power-keyboard-proxy.h + libexec_PROGRAMS = csd-power csd_power_SOURCES = \ gpm-common.c \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/power/csd-power-manager.c new/cinnamon-settings-daemon-4.6.4/plugins/power/csd-power-manager.c --- old/cinnamon-settings-daemon-4.4.0/plugins/power/csd-power-manager.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/power/csd-power-manager.c 2020-06-21 14:36:49.000000000 +0200 @@ -22,9 +22,11 @@ #include "config.h" +#include <fcntl.h> #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <unistd.h> #include <sys/wait.h> #include <glib/gi18n.h> #include <gdk/gdkx.h> @@ -63,6 +65,7 @@ #define CSD_POWER_SETTINGS_SCHEMA "org.cinnamon.settings-daemon.plugins.power" #define CSD_XRANDR_SETTINGS_SCHEMA "org.cinnamon.settings-daemon.plugins.xrandr" +#define CSD_SAVER_SETTINGS_SCHEMA "org.cinnamon.desktop.screensaver" #define CSD_SESSION_SETTINGS_SCHEMA "org.cinnamon.desktop.session" #define CSD_CINNAMON_SESSION_SCHEMA "org.cinnamon.SessionManager" @@ -94,6 +97,7 @@ enum { CSD_POWER_IDLETIME_NULL_ID, CSD_POWER_IDLETIME_DIM_ID, + CSD_POWER_IDLETIME_LOCK_ID, CSD_POWER_IDLETIME_BLANK_ID, CSD_POWER_IDLETIME_SLEEP_ID }; @@ -176,6 +180,7 @@ GtkStatusIcon *status_icon; guint xscreensaver_watchdog_timer_id; gboolean is_virtual_machine; + gint fd_close_loop_end; /* logind stuff */ GDBusProxy *logind_proxy; @@ -203,6 +208,8 @@ static void do_lid_closed_action (CsdPowerManager *manager); static void inhibit_lid_switch (CsdPowerManager *manager); static void uninhibit_lid_switch (CsdPowerManager *manager); +static void setup_locker_process (gpointer user_data); +static void lock_screen_with_custom_saver (CsdPowerManager *manager, gchar *custom_saver, gboolean idle_lock); static void lock_screensaver (CsdPowerManager *manager); static void kill_lid_close_safety_timer (CsdPowerManager *manager); @@ -3358,6 +3365,7 @@ { gboolean is_idle_inhibited; guint current_idle_time; + guint timeout_lock; guint timeout_blank; guint timeout_sleep; gboolean on_battery; @@ -3370,6 +3378,8 @@ idle_set_mode (manager, CSD_POWER_IDLE_MODE_NORMAL); gpm_idletime_alarm_remove (manager->priv->idletime, + CSD_POWER_IDLETIME_LOCK_ID); + gpm_idletime_alarm_remove (manager->priv->idletime, CSD_POWER_IDLETIME_BLANK_ID); gpm_idletime_alarm_remove (manager->priv->idletime, CSD_POWER_IDLETIME_SLEEP_ID); @@ -3390,6 +3400,25 @@ timeout_blank = g_settings_get_int (manager->priv->settings, "sleep-display-ac"); } + + /* set up custom screensaver lock after idle time trigger */ + timeout_lock = g_settings_get_uint (manager->priv->settings_desktop_session, + "idle-delay"); + if (timeout_lock != 0) { + if (timeout_blank != 0 && timeout_lock > timeout_blank) { + g_debug ("reducing lock timeout to match blank timeout"); + timeout_lock = timeout_blank; + } + g_debug ("setting up lock callback for %is", timeout_lock); + + gpm_idletime_alarm_set (manager->priv->idletime, + CSD_POWER_IDLETIME_LOCK_ID, + idle_adjust_timeout (current_idle_time, timeout_lock) * 1000); + } else { + gpm_idletime_alarm_remove (manager->priv->idletime, + CSD_POWER_IDLETIME_LOCK_ID); + } + if (timeout_blank != 0) { g_debug ("setting up blank callback for %is", timeout_blank); @@ -3448,13 +3477,113 @@ } static void +setup_locker_process (gpointer user_data) +{ + /* This function should only contain signal safe code, as it is invoked + * between fork and exec. See signal-safety(7) for more information. */ + CsdPowerManager *manager = user_data; + + /* close all FDs except stdin, stdout, stderr and the inhibition fd */ + for (gint fd = 3; fd < manager->priv->fd_close_loop_end; fd++) + if (fd != manager->priv->inhibit_suspend_fd) + close (fd); + + /* make sure the inhibit fd does not get closed on exec, as it's options + * are not specified in the logind inhibitor interface documentation. */ + if (-1 != manager->priv->inhibit_suspend_fd) + fcntl (manager->priv->inhibit_suspend_fd, + F_SETFD, + ~FD_CLOEXEC & fcntl (manager->priv->inhibit_suspend_fd, F_GETFD)); +} + +static void +lock_screen_with_custom_saver (CsdPowerManager *manager, + gchar *custom_saver, + gboolean idle_lock) +{ + gboolean res; + gchar *fd = NULL; + gchar **argv = NULL; + gchar **env = NULL; + GError *error = NULL; + + /* environment setup */ + fd = g_strdup_printf ("%d", manager->priv->inhibit_suspend_fd); + if (!fd) { + g_warning ("failed to printf inhibit_suspend_fd"); + goto quit; + } + if (!(env = g_get_environ ())) { + g_warning ("failed to get environment"); + goto quit; + } + env = g_environ_setenv (env, "XSS_SLEEP_LOCK_FD", fd, FALSE); + if (!env) { + g_warning ("failed to set XSS_SLEEP_LOCK_FD"); + goto quit; + } + env = g_environ_setenv (env, + "LOCKED_BY_SESSION_IDLE", + idle_lock ? "true" : "false", + TRUE); + if (!env) { + g_warning ("failed to set LOCKED_BY_SESSION_IDLE"); + goto quit; + } + + /* argv setup */ + res = g_shell_parse_argv (custom_saver, NULL, &argv, &error); + if (!res) { + g_warning ("failed to parse custom saver cmd '%s': %s", + custom_saver, + error->message); + goto quit; + } + + /* get the max number of open file descriptors */ + manager->priv->fd_close_loop_end = sysconf (_SC_OPEN_MAX); + if (-1 == manager->priv->fd_close_loop_end) + /* use some sane default */ + manager->priv->fd_close_loop_end = 32768; + + /* spawn the custom screen locker */ + res = g_spawn_async (NULL, + argv, + env, + G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_SEARCH_PATH, + &setup_locker_process, + manager, + NULL, + &error); + if (!res) + g_warning ("failed to run custom screensaver '%s': %s", + custom_saver, + error->message); + +quit: + g_free (fd); + g_strfreev (argv); + g_strfreev (env); + g_clear_error (&error); +} + +static void lock_screensaver (CsdPowerManager *manager) { GError *error; gboolean ret; + gchar *custom_saver = g_settings_get_string (manager->priv->settings_screensaver, + "custom-screensaver-command"); g_debug ("Locking screen before sleep/hibernate"); + if (custom_saver && g_strcmp0 (custom_saver, "") != 0) { + lock_screen_with_custom_saver (manager, custom_saver, FALSE); + goto quit; + } + + /* if we fail to get the gsettings entry, or if the user did not select + * a custom screen saver, default to invoking cinnamon-screensaver */ /* do this sync to ensure it's on the screen when we start suspending */ error = NULL; ret = g_spawn_command_line_sync ("cinnamon-screensaver-command --lock", NULL, NULL, NULL, &error); @@ -3463,6 +3592,9 @@ g_warning ("Couldn't lock screen: %s", error->message); g_error_free (error); } + +quit: + g_free (custom_saver); } static void @@ -3615,6 +3747,22 @@ case CSD_POWER_IDLETIME_DIM_ID: idle_set_mode (manager, CSD_POWER_IDLE_MODE_DIM); break; + case CSD_POWER_IDLETIME_LOCK_ID: + /* cinnamon-screensaver has its own lock after some idle delay. + * If we have a custom screensaver configured, we have to use + * the idle delay from cinnamon-settings-daemon to trigger the + * screen lock after the idle timeout */ + ; /* empty statement, because C does not allow a declaration to + * follow a label */ + gchar *custom_saver = g_settings_get_string (manager->priv->settings_screensaver, + "custom-screensaver-command"); + if (custom_saver && g_strcmp0 (custom_saver, "") != 0) + lock_screen_with_custom_saver (manager, + custom_saver, + TRUE); + g_free (custom_saver); + + break; case CSD_POWER_IDLETIME_BLANK_ID: idle_set_mode (manager, CSD_POWER_IDLE_MODE_BLANK); break; @@ -4076,7 +4224,7 @@ manager->priv->settings = g_settings_new (CSD_POWER_SETTINGS_SCHEMA); g_signal_connect (manager->priv->settings, "changed", G_CALLBACK (engine_settings_key_changed_cb), manager); - manager->priv->settings_screensaver = g_settings_new ("org.cinnamon.desktop.screensaver"); + manager->priv->settings_screensaver = g_settings_new (CSD_SAVER_SETTINGS_SCHEMA); manager->priv->settings_xrandr = g_settings_new (CSD_XRANDR_SETTINGS_SCHEMA); manager->priv->settings_desktop_session = g_settings_new (CSD_SESSION_SETTINGS_SCHEMA); manager->priv->settings_cinnamon_session = g_settings_new (CSD_CINNAMON_SESSION_SCHEMA); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/print-notifications/csd-print-notifications-manager.c new/cinnamon-settings-daemon-4.6.4/plugins/print-notifications/csd-print-notifications-manager.c --- old/cinnamon-settings-daemon-4.4.0/plugins/print-notifications/csd-print-notifications-manager.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/print-notifications/csd-print-notifications-manager.c 2020-06-21 14:36:49.000000000 +0200 @@ -521,27 +521,27 @@ break; case IPP_JOB_STOPPED: /* Translators: A print job has been stopped */ - primary_text = g_strdup (C_("print job state", "Printing stopped")); + primary_text = g_strdup (_("Printing stopped")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_CANCELED: /* Translators: A print job has been canceled */ - primary_text = g_strdup (C_("print job state", "Printing canceled")); + primary_text = g_strdup (_("Printing canceled")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_ABORTED: /* Translators: A print job has been aborted */ - primary_text = g_strdup (C_("print job state", "Printing aborted")); + primary_text = g_strdup (_("Printing aborted")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_COMPLETED: /* Translators: A print job has been completed */ - primary_text = g_strdup (C_("print job state", "Printing completed")); + primary_text = g_strdup (_("Printing completed")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; } } else if (g_strcmp0 (notify_subscribed_event, "job-state-changed") == 0 && my_job) { @@ -551,41 +551,41 @@ g_strdup (printer_name), NULL); /* Translators: A job is printing */ - primary_text = g_strdup (C_("print job state", "Printing")); + primary_text = g_strdup (_("Printing")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_STOPPED: g_hash_table_remove (manager->priv->printing_printers, printer_name); /* Translators: A print job has been stopped */ - primary_text = g_strdup (C_("print job state", "Printing stopped")); + primary_text = g_strdup (_("Printing stopped")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_CANCELED: g_hash_table_remove (manager->priv->printing_printers, printer_name); /* Translators: A print job has been canceled */ - primary_text = g_strdup (C_("print job state", "Printing canceled")); + primary_text = g_strdup (_("Printing canceled")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_ABORTED: g_hash_table_remove (manager->priv->printing_printers, printer_name); /* Translators: A print job has been aborted */ - primary_text = g_strdup (C_("print job state", "Printing aborted")); + primary_text = g_strdup (_("Printing aborted")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; case IPP_JOB_COMPLETED: g_hash_table_remove (manager->priv->printing_printers, printer_name); /* Translators: A print job has been completed */ - primary_text = g_strdup (C_("print job state", "Printing completed")); + primary_text = g_strdup (_("Printing completed")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); break; default: break; @@ -596,9 +596,9 @@ g_strdup (printer_name), NULL); /* Translators: A job is printing */ - primary_text = g_strdup (C_("print job state", "Printing")); + primary_text = g_strdup (_("Printing")); /* Translators: "print-job xy" on a printer */ - secondary_text = g_strdup_printf (C_("print job", "'%s' on %s"), job_name, printer_name); + secondary_text = g_strdup_printf (_("'%s' on %s"), job_name, printer_name); } } else if (g_strcmp0 (notify_subscribed_event, "printer-state-changed") == 0) { cups_dest_t *dest = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/wacom/csd-wacom-osd-window.c new/cinnamon-settings-daemon-4.6.4/plugins/wacom/csd-wacom-osd-window.c --- old/cinnamon-settings-daemon-4.4.0/plugins/wacom/csd-wacom-osd-window.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/wacom/csd-wacom-osd-window.c 2020-06-21 14:36:49.000000000 +0200 @@ -949,12 +949,12 @@ gchar *str, *label; if (accel == NULL || accel[0] == '\0') - return g_strdup (C_("Action type", "None")); + return g_strdup (_("Do Nothing")); gtk_accelerator_parse (accel, &keyval, &mask); str = gtk_accelerator_get_label (keyval, mask); - label = g_markup_printf_escaped (C_("Action type", "Send Keystroke %s"), str); + label = g_markup_printf_escaped (_("Send Keystroke %s"), str); g_free (str); return label; @@ -969,18 +969,18 @@ type = g_settings_get_enum (button->settings, ACTION_TYPE_KEY); if (type == CSD_WACOM_ACTION_TYPE_NONE) - return g_strdup (C_("Action type", "None")); + return g_strdup (_("Do Nothing")); if (type == CSD_WACOM_ACTION_TYPE_HELP) - return g_strdup (C_("Action type", "Show On-Screen Help")); + return g_strdup (_("Show On-Screen Help")); if (type == CSD_WACOM_ACTION_TYPE_SWITCH_MONITOR) - return g_strdup (C_("Action type", "Switch Monitor")); + return g_strdup (_("Switch Monitor")); str = g_settings_get_string (button->settings, CUSTOM_ACTION_KEY); if (str == NULL || *str == '\0') { g_free (str); - return g_strdup (C_("Action type", "None")); + return g_strdup (_("Do Nothing")); } name = get_escaped_accel_shortcut (str); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/xrandr/csd-xrandr-manager.c new/cinnamon-settings-daemon-4.6.4/plugins/xrandr/csd-xrandr-manager.c --- old/cinnamon-settings-daemon-4.4.0/plugins/xrandr/csd-xrandr-manager.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/xrandr/csd-xrandr-manager.c 2020-06-21 14:36:49.000000000 +0200 @@ -478,8 +478,11 @@ // Get the screen rotation and apply it to touchscreens output_info = get_laptop_output_info (priv->rw_screen, config); - rotation = gnome_rr_output_info_get_rotation (output_info); - rotate_touchscreens (manager, rotation); + + if (output_info) { + rotation = gnome_rr_output_info_get_rotation (output_info); + rotate_touchscreens (manager, rotation); + } g_object_unref (config); @@ -978,6 +981,24 @@ return best_mode; } +static gint +get_monitor_index_for_output (XID output_id) +{ + GdkDisplay *display = gdk_display_get_default (); + GdkScreen *screen = gdk_display_get_default_screen (display); + gint i; + + i = 0; + + for (i = 0; i < gdk_display_get_n_monitors (display); i++) { + if (gdk_x11_screen_get_monitor_output (screen, i) == output_id) { + return i; + } + } + + return -1; +} + static gboolean turn_on (GnomeRRScreen *screen, GnomeRROutputInfo *info, @@ -1050,6 +1071,56 @@ return x; } +static void +adjust_output_positions_for_scaling (GnomeRRScreen *screen, + GnomeRRConfig *config, + GPtrArray *sorted_outputs) +{ + gint target_global_scale, x; + guint i; + + target_global_scale = 1; + + /* Go thru all active outputs, figure out the highest scale monitor */ + for (i = 0; i < sorted_outputs->len; i++) { + gint monitor_index, target_monitor_scale; + GnomeRROutputInfo *info = sorted_outputs->pdata[i]; + + if (!gnome_rr_output_info_is_active (info)) { + continue; + } + + GnomeRROutput *output = gnome_rr_screen_get_output_by_name (screen, gnome_rr_output_info_get_name (info)); + + monitor_index = get_monitor_index_for_output (gnome_rr_output_get_id (output)); + target_monitor_scale = gnome_rr_screen_calculate_best_global_scale (screen, monitor_index); + + gnome_rr_output_info_set_scale (info, (gfloat) target_monitor_scale); + + /* We will always downscale??? We could respect the setting instead, but this is only for auto-config */ + target_global_scale = MAX (target_global_scale, target_monitor_scale); + } + + gnome_rr_config_set_base_scale (config, target_global_scale); + + /* Now adjust their x values according to scale (positions are (width * global scale) */ + x = 0; + + for (i = 0; i < sorted_outputs->len; i++) { + GnomeRROutputInfo *info = sorted_outputs->pdata[i]; + gint y, width, height; + + if (!gnome_rr_output_info_is_active (info)) { + continue; + } + + gnome_rr_output_info_get_geometry (info, NULL, &y, &width, &height); + gnome_rr_output_info_set_geometry (info, x, y, width, height); + + x += width * target_global_scale; + } +} + /* Used from g_ptr_array_sort(); compares outputs based on their X position */ static int compare_output_positions (gconstpointer a, gconstpointer b) @@ -1116,6 +1187,13 @@ if (config_is_all_off (config)) applicable = FALSE; + /* Calculate the pending global scale and adjust x positions of active outputs - + * this isn't the best spot to do this, but it would be even more tedious if we + * attempted to adjust the monitors during the previous passes (since we have to + * go thru them all first to get the global scale. In reality there are generally + * only a couple of monitors to worry about, so it's still quick. */ + adjust_output_positions_for_scaling (rr_screen, config, sorted_outputs); + g_ptr_array_free (sorted_outputs, FALSE); return applicable; @@ -1720,15 +1798,24 @@ use_stored_configuration_or_auto_configure_outputs (CsdXrandrManager *manager, guint32 timestamp) { CsdXrandrManagerPrivate *priv = manager->priv; - char *intended_filename; + char *intended_filename, *legacy_filename; GError *error; gboolean success; intended_filename = gnome_rr_config_get_intended_filename (); + legacy_filename = gnome_rr_config_get_legacy_filename (); error = NULL; success = apply_configuration_from_filename (manager, intended_filename, TRUE, timestamp, &error); + + if (!success) { + g_clear_error (&error); + g_message ("Existing monitor config (%s) not found during hotplug or laptop lid event." + " Looking for legacy configuration (monitors.xml)", intended_filename); + success = apply_configuration_from_filename (manager, legacy_filename, TRUE, timestamp, &error); + } g_free (intended_filename); + g_free (legacy_filename); if (!success) { /* We don't bother checking the error type. @@ -1904,6 +1991,7 @@ gboolean success; char *backup_filename; char *intended_filename; + gchar *legacy_filename; GnomePnpIds *pnp_ids; /* This avoids the GnomePnpIds object being created multiple times. @@ -1911,6 +1999,7 @@ pnp_ids = gnome_pnp_ids_new (); backup_filename = gnome_rr_config_get_backup_filename (); intended_filename = gnome_rr_config_get_intended_filename (); + legacy_filename = gnome_rr_config_get_legacy_filename (); /* 1. See if there was a "saved" configuration. If there is one, it means * that the user had selected to change the display configuration, but the @@ -1947,6 +2036,11 @@ success = apply_intended_configuration (manager, intended_filename, timestamp); + if (!success) { + g_message ("Existing monitor config (%s) not found at startup. Looking for legacy configuration (monitors.xml)", intended_filename); + + success = apply_intended_configuration (manager, legacy_filename, timestamp); + } out: g_object_unref (pnp_ids); @@ -1955,6 +2049,11 @@ g_free (backup_filename); g_free (intended_filename); + g_free (legacy_filename); + + if (success) { + g_debug ("Successfully loaded existing monitor configuration\n", success); + } return success; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/cinnamon-settings-daemon-4.4.0/plugins/xsettings/csd-xsettings-manager.c new/cinnamon-settings-daemon-4.6.4/plugins/xsettings/csd-xsettings-manager.c --- old/cinnamon-settings-daemon-4.4.0/plugins/xsettings/csd-xsettings-manager.c 2019-11-16 16:38:35.000000000 +0100 +++ new/cinnamon-settings-daemon-4.6.4/plugins/xsettings/csd-xsettings-manager.c 2020-06-21 14:36:49.000000000 +0200 @@ -45,6 +45,9 @@ #include "xsettings-manager.h" #include "fontconfig-monitor.h" +#define GNOME_DESKTOP_USE_UNSTABLE_API +#include <libcinnamon-desktop/gnome-rr.h> + #define CINNAMON_XSETTINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CINNAMON_TYPE_XSETTINGS_MANAGER, CinnamonSettingsXSettingsManagerPrivate)) #define MOUSE_SETTINGS_SCHEMA "org.cinnamon.settings-daemon.peripherals.mouse" @@ -221,14 +224,6 @@ */ #define DPI_FALLBACK 96 -/* The minimum resolution at which we turn on a window-scale of 2 */ -#define HIDPI_LIMIT (DPI_FALLBACK * 2) - -/* The minimum screen height at which we turn on a window-scale of 2; - * below this there just isn't enough vertical real estate for GNOME - * apps to work, and it's better to just be tiny */ -#define HIDPI_MIN_HEIGHT 1500 - typedef struct _TranslationEntry TranslationEntry; typedef void (* TranslationFunc) (CinnamonSettingsXSettingsManager *manager, TranslationEntry *trans, @@ -473,52 +468,25 @@ get_window_scale (CinnamonSettingsXSettingsManager *manager) { GSettings *interface_settings; + GError *error = NULL; int window_scale; - GdkRectangle rect; - GdkDisplay *display; - GdkScreen *screen; - int width_mm, height_mm; - int monitor_scale; - double dpi_x, dpi_y; interface_settings = g_hash_table_lookup (manager->priv->settings, INTERFACE_SETTINGS_SCHEMA); window_scale = g_settings_get_uint (interface_settings, SCALING_FACTOR_KEY); - if (window_scale == 0) { - int primary; - display = gdk_display_get_default (); - screen = gdk_display_get_default_screen (display); - primary = gdk_screen_get_primary_monitor (screen); - gdk_screen_get_monitor_geometry (screen, primary, &rect); - width_mm = gdk_screen_get_monitor_width_mm (screen, primary); - height_mm = gdk_screen_get_monitor_height_mm (screen, primary); - monitor_scale = gdk_screen_get_monitor_scale_factor (screen, primary); - - window_scale = 1; - - if (rect.height < HIDPI_MIN_HEIGHT) - goto out; - - /* Some monitors/TV encode the aspect ratio (16/9 or 16/10) instead of the physical size */ - if ((width_mm == 160 && height_mm == 90) || - (width_mm == 160 && height_mm == 100) || - (width_mm == 16 && height_mm == 9) || - (width_mm == 16 && height_mm == 10)) - goto out; - - if (width_mm > 0 && height_mm > 0) { - dpi_x = (double)rect.width * monitor_scale / (width_mm / 25.4); - dpi_y = (double)rect.height * monitor_scale / (height_mm / 25.4); - /* We don't completely trust these values so both - must be high, and never pick higher ratio than - 2 automatically */ - if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT) - window_scale = 2; - } - } + if (window_scale == 0) { + GnomeRRScreen *screen = gnome_rr_screen_new (gdk_screen_get_default (), &error); + + if (!error) { + window_scale = gnome_rr_screen_calculate_best_global_scale (screen, -1); + g_object_unref (screen); + } else { + g_warning ("Could not get/create GnomeRRScreen instance: %s", error->message); + g_error_free (error); + } + } -out: - return window_scale; + return window_scale; } typedef struct {