Hello community,

here is the log from the commit of package cinnamon-settings-daemon for 
openSUSE:Factory checked in at 2020-03-17 13:10:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon-settings-daemon (Old)
 and      /work/SRC/openSUSE:Factory/.cinnamon-settings-daemon.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cinnamon-settings-daemon"

Tue Mar 17 13:10:47 2020 rev:22 rq:785763 version:4.4.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/cinnamon-settings-daemon/cinnamon-settings-daemon.changes
        2019-07-29 17:29:06.874241727 +0200
+++ 
/work/SRC/openSUSE:Factory/.cinnamon-settings-daemon.new.3160/cinnamon-settings-daemon.changes
      2020-03-17 13:10:59.985838331 +0100
@@ -1,0 +2,16 @@
+Mon Mar 16 14:51:11 UTC 2020 - Marguerite Su <i...@marguerite.su>
+
+- update version 4.4.0
+  * power helper - Try to use logind, then fallback to using
+    consolekit, instead of using a gsettings key to decide
+  * csd-input-helper.c: Use correct error_trap_pop function
+  * mouse manager: set the 'disable touchpad with mouse' on
+    devices at startup
+  * mouse manager: Simplify previous commit - get/set
+    properties here already check for support, there's no
+    need to pre-check
+  * mouse manager: Expose libinput option to disable the
+    touchpad when an external mouse is attached
+  * automount: Add autorun dialog tester
+
+-------------------------------------------------------------------

Old:
----
  cinnamon-settings-daemon-4.2.2.tar.gz

New:
----
  cinnamon-settings-daemon-4.4.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cinnamon-settings-daemon.spec ++++++
--- /var/tmp/diff_new_pack.LyQrDk/_old  2020-03-17 13:11:00.973839090 +0100
+++ /var/tmp/diff_new_pack.LyQrDk/_new  2020-03-17 13:11:00.977839093 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cinnamon-settings-daemon
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# 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.2.2
+Version:        4.4.0
 Release:        0
 Summary:        The settings Daemon for the Cinnamon Desktop
 License:        GPL-2.0-or-later AND LGPL-2.1-only

++++++ cinnamon-settings-daemon-4.2.2.tar.gz -> 
cinnamon-settings-daemon-4.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/cinnamon-settings-daemon/cinnamon-settings-session.c
 
new/cinnamon-settings-daemon-4.4.0/cinnamon-settings-daemon/cinnamon-settings-session.c
--- 
old/cinnamon-settings-daemon-4.2.2/cinnamon-settings-daemon/cinnamon-settings-session.c
     2019-07-25 10:22:55.000000000 +0200
+++ 
new/cinnamon-settings-daemon-4.4.0/cinnamon-settings-daemon/cinnamon-settings-session.c
     2019-11-16 16:38:35.000000000 +0100
@@ -375,24 +375,24 @@
 static void
 cinnamon_settings_session_init (CinnamonSettingsSession *session)
 {
-        GSettings *session_settings;
-
        session->priv = CINNAMON_SETTINGS_SESSION_GET_PRIVATE (session);
 
-       session_settings = g_settings_new ("org.cinnamon.desktop.session");
-       gboolean use_logind = g_settings_get_boolean (session_settings, 
"settings-daemon-uses-logind");
-       g_object_unref (session_settings);
-
-       if (use_logind) {
 #ifdef HAVE_LOGIND
+    if (access("/run/systemd/system/", 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);
         g_source_attach (session->priv->sd_source, NULL);
         sessions_changed (session);
-#endif
+
+        g_debug ("Using logind");
     }
-       else {
+    else
+#endif /* HAVE_LOGIND */
+
+    {
+        g_debug ("Using consolekit");
+
                session->priv->cancellable = g_cancellable_new ();
 
                /* connect to ConsoleKit */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-settings-daemon-4.2.2/configure.ac 
new/cinnamon-settings-daemon-4.4.0/configure.ac
--- old/cinnamon-settings-daemon-4.2.2/configure.ac     2019-07-25 
10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/configure.ac     2019-11-16 
16:38:35.000000000 +0100
@@ -1,7 +1,7 @@
 AC_PREREQ([2.60])
 
 AC_INIT([cinnamon-settings-daemon],
-        [4.2.2],
+        [4.4.0],
         [https://github.com/linuxmint/cinnamon-settings-daemon/issues])
 
 AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/data/org.cinnamon.settings-daemon.peripherals.gschema.xml.in.in
 
new/cinnamon-settings-daemon-4.4.0/data/org.cinnamon.settings-daemon.peripherals.gschema.xml.in.in
--- 
old/cinnamon-settings-daemon-4.2.2/data/org.cinnamon.settings-daemon.peripherals.gschema.xml.in.in
  2019-07-25 10:22:55.000000000 +0200
+++ 
new/cinnamon-settings-daemon-4.4.0/data/org.cinnamon.settings-daemon.peripherals.gschema.xml.in.in
  2019-11-16 16:38:35.000000000 +0100
@@ -45,6 +45,11 @@
       <_summary>Enable touchpad</_summary>
       <_description>Set this to TRUE to enable all touchpads.</_description>
     </key>
+    <key name="disable-with-external-mouse" type="b">
+      <default>false</default>
+      <_summary>Disable the touchpad when an external mouse is 
connected</_summary>
+      <_description>Set this to TRUE to disable the touchpad when an external 
mouse is connected (only available with libinput)</_description>
+    </key>
     <key name="left-handed" 
enum="org.cinnamon.settings-daemon.CsdTouchpadHandedness">
       <default>'mouse'</default>
       <summary>Touchpad button orientation</summary>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-settings-daemon-4.2.2/debian/changelog 
new/cinnamon-settings-daemon-4.4.0/debian/changelog
--- old/cinnamon-settings-daemon-4.2.2/debian/changelog 2019-07-25 
10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/debian/changelog 2019-11-16 
16:38:35.000000000 +0100
@@ -1,3 +1,15 @@
+cinnamon-settings-daemon (4.4.0) tricia; urgency=medium
+
+  [ Michael Webster ]
+  * automount: Add autorun dialog tester. (#263)
+  * mouse manager: Expose libinput option to disable the touchpad when an 
external mouse is attached.
+  * mouse manager: Simplify previous commit - get/set properties here already 
check for support, there's no need to pre-check.
+  * mouse manager: set the 'disable touchpad with mouse' on devices at startup.
+  * csd-input-helper.c: Use correct error_trap_pop function.
+  * power helper - Try to use logind, then fallback to using consolekit, 
instead of using a gsettings key to decide.
+
+ -- Clement Lefebvre <r...@linuxmint.com>  Sat, 16 Nov 2019 16:37:55 +0100
+
 cinnamon-settings-daemon (4.2.2) tina; urgency=medium
 
   [ Corbin Auriti ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/automount/Makefile.am 
new/cinnamon-settings-daemon-4.4.0/plugins/automount/Makefile.am
--- old/cinnamon-settings-daemon-4.2.2/plugins/automount/Makefile.am    
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/automount/Makefile.am    
2019-11-16 16:38:35.000000000 +0100
@@ -34,6 +34,22 @@
        $(AUTOMOUNT_LIBS)               \
        $(NULL)
 
+
+
+test_automount_dialog_SOURCES = test-automount-dialog.c \
+                                csd-autorun.c \
+                                $(NULL)
+test_automount_dialog_LDADD = $(AUTOMOUNT_LIBS) \
+                              $(SETTINGS_PLUGIN_LIBS)     \
+                              $(NULL)
+test_automount_dialog_CFLAGS = $(AUTOMOUNT_CFLAGS) \
+                               $(SETTINGS_PLUGIN_CFLAGS)       \
+                               $(NULL)
+
+
+noinst_PROGRAMS=test-automount-dialog
+
+
 desktopdir = $(sysconfdir)/xdg/autostart
 desktop_in_files = cinnamon-settings-daemon-automount.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/automount/csd-autorun.c 
new/cinnamon-settings-daemon-4.4.0/plugins/automount/csd-autorun.c
--- old/cinnamon-settings-daemon-4.2.2/plugins/automount/csd-autorun.c  
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/automount/csd-autorun.c  
2019-11-16 16:38:35.000000000 +0100
@@ -980,3 +980,12 @@
 
        return !ignore_autorun;
 }
+
+void
+csd_autorun_for_content_type (GMount               *mount,
+                              const gchar          *content_type,
+                              CsdAutorunOpenWindow *callback,
+                              gpointer              user_data)
+{
+    do_autorun_for_content_type (mount, content_type, callback, user_data);
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/automount/csd-autorun.h 
new/cinnamon-settings-daemon-4.4.0/plugins/automount/csd-autorun.h
--- old/cinnamon-settings-daemon-4.2.2/plugins/automount/csd-autorun.h  
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/automount/csd-autorun.h  
2019-11-16 16:38:35.000000000 +0100
@@ -47,6 +47,11 @@
                  CsdAutorunOpenWindow open_window_func,
                  gpointer user_data);
 
+void csd_autorun_for_content_type (GMount               *mount,
+                                   const gchar          *content_type,
+                                   CsdAutorunOpenWindow *callback,
+                                   gpointer              user_data);
+
 void csd_allow_autorun_for_volume (GVolume *volume);
 void csd_allow_autorun_for_volume_finish (GVolume *volume);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/automount/test-automount-dialog.c 
new/cinnamon-settings-daemon-4.4.0/plugins/automount/test-automount-dialog.c
--- 
old/cinnamon-settings-daemon-4.2.2/plugins/automount/test-automount-dialog.c    
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/cinnamon-settings-daemon-4.4.0/plugins/automount/test-automount-dialog.c    
    2019-11-16 16:38:35.000000000 +0100
@@ -0,0 +1,78 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ * save-session.c - Small program to talk to session manager.
+
+   Copyright (C) 1998 Tom Tromey
+   Copyright (C) 2008 Red Hat, Inc.
+
+   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, 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 - Suite 500, Boston, MA
+   02110-1335, USA.
+*/
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <gtk/gtk.h>
+#include <gio/gio.h>
+#include <glib.h>
+
+#include "csd-autorun.h"
+
+static void
+autorun_show_window (GMount *mount, gpointer user_data)
+{
+    gtk_main_quit ();
+}
+
+int
+main (int argc, char *argv[])
+{
+        GVolumeMonitor *monitor;
+        GError *error;
+        GList *mounts, *l;
+        int     conflicting_options;
+
+        error = NULL;
+        if (! gtk_init_with_args (&argc, &argv, NULL, NULL, NULL, &error)) {
+                g_warning ("Unable to start: %s", error->message);
+                g_error_free (error);
+                exit (1);
+        }
+
+        if (argc != 2)
+        {
+            g_print ("Need one argument as content type\n");
+            exit (1);
+        }
+
+        monitor = g_volume_monitor_get ();
+        mounts = g_volume_monitor_get_mounts (monitor);
+
+        if (mounts)
+        {
+            GMount *mount = G_MOUNT (mounts->data);
+
+            csd_autorun_for_content_type (mount,
+                                          argv[1],
+                                          (CsdAutorunOpenWindow) 
autorun_show_window,
+                                          NULL);
+        }
+
+        gtk_main ();
+
+        gtk_main_quit ();
+        return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/common/csd-input-helper.c 
new/cinnamon-settings-daemon-4.4.0/plugins/common/csd-input-helper.c
--- old/cinnamon-settings-daemon-4.2.2/plugins/common/csd-input-helper.c        
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/common/csd-input-helper.c        
2019-11-16 16:38:35.000000000 +0100
@@ -577,5 +577,5 @@
 {
     gdk_x11_display_error_trap_push (gdk_display_get_default ());
     XCloseDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xdevice);
-    gdk_error_trap_pop_ignored();
+    gdk_x11_display_error_trap_pop_ignored(gdk_display_get_default ());
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/common/csd-power-helper.c 
new/cinnamon-settings-daemon-4.4.0/plugins/common/csd-power-helper.c
--- old/cinnamon-settings-daemon-4.2.2/plugins/common/csd-power-helper.c        
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/common/csd-power-helper.c        
2019-11-16 16:38:35.000000000 +0100
@@ -32,6 +32,33 @@
 #define CONSOLEKIT_DBUS_PATH_MANAGER            
"/org/freedesktop/ConsoleKit/Manager"
 #define CONSOLEKIT_DBUS_INTERFACE_MANAGER       
"org.freedesktop.ConsoleKit.Manager"
 
+#ifdef HAVE_LOGIND
+
+static gboolean
+use_logind (void)
+{
+    static gboolean should_use_logind = FALSE;
+    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 ()
+
+        g_once_init_leave (&once_init_value, 1);
+    }
+
+    return should_use_logind;
+}
+
+#else /* HAVE_LOGIND */
+
+static gboolean
+use_logind (void)
+{
+    return FALSE;
+}
+
+#endif /* HAVE_LOGIND */
+
 static void
 logind_stop (void)
 {
@@ -293,10 +320,9 @@
 }
 
 void
-csd_power_suspend (gboolean    use_logind,
-                   gboolean    try_hybrid)
+csd_power_suspend (gboolean try_hybrid)
 {
-  if (use_logind) {
+  if (use_logind ()) {
     if (try_hybrid && can_hybrid_sleep ()) {
       logind_hybrid_suspend ();
     }
@@ -315,9 +341,9 @@
 }
 
 void
-csd_power_poweroff (gboolean use_logind)
+csd_power_poweroff (void)
 {
-  if (use_logind) {
+  if (use_logind ()) {
     logind_stop ();
   }
   else {
@@ -326,9 +352,9 @@
 }
 
 void
-csd_power_hibernate (gboolean use_logind)
+csd_power_hibernate (void)
 {
-  if (use_logind) {
+  if (use_logind ()) {
     logind_hibernate ();
   }
   else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/common/csd-power-helper.h 
new/cinnamon-settings-daemon-4.4.0/plugins/common/csd-power-helper.h
--- old/cinnamon-settings-daemon-4.2.2/plugins/common/csd-power-helper.h        
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/common/csd-power-helper.h        
2019-11-16 16:38:35.000000000 +0100
@@ -24,9 +24,9 @@
 
 G_BEGIN_DECLS
 
-void csd_power_suspend   (gboolean use_logind, gboolean try_hybrid);
-void csd_power_hibernate (gboolean use_logind);
-void csd_power_poweroff  (gboolean use_logind);
+void csd_power_suspend   (gboolean try_hybrid);
+void csd_power_hibernate (void);
+void csd_power_poweroff  (void);
 
 G_END_DECLS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/media-keys/csd-media-keys-manager.c 
new/cinnamon-settings-daemon-4.4.0/plugins/media-keys/csd-media-keys-manager.c
--- 
old/cinnamon-settings-daemon-4.2.2/plugins/media-keys/csd-media-keys-manager.c  
    2019-07-25 10:22:55.000000000 +0200
+++ 
new/cinnamon-settings-daemon-4.4.0/plugins/media-keys/csd-media-keys-manager.c  
    2019-11-16 16:38:35.000000000 +0100
@@ -169,7 +169,6 @@
         gint             inhibit_keys_fd;
         GSettings        *desktop_session_settings;
         GSettings        *cinnamon_session_settings;
-        gboolean         use_logind;
 
         /* Multihead stuff */
         GdkScreen       *current_screen;
@@ -1477,16 +1476,16 @@
                 ;
                 gboolean hybrid = g_settings_get_boolean 
(manager->priv->cinnamon_session_settings,
                                                           
"prefer-hybrid-sleep");
-                csd_power_suspend (manager->priv->use_logind, hybrid);
+                csd_power_suspend (hybrid);
                 break;
         case CSD_POWER_ACTION_INTERACTIVE:
                 cinnamon_session_shutdown (manager);
                 break;
         case CSD_POWER_ACTION_SHUTDOWN:
-                csd_power_poweroff (manager->priv->use_logind);
+                csd_power_poweroff ();
                 break;
         case CSD_POWER_ACTION_HIBERNATE:
-                csd_power_hibernate (manager->priv->use_logind);
+                csd_power_hibernate ();
                 break;
         case CSD_POWER_ACTION_BLANK:
                 execute (manager, "cinnamon-screensaver-command --lock", 
FALSE);
@@ -1840,8 +1839,6 @@
                                  NULL);
 
         manager->priv->desktop_session_settings = 
g_settings_new("org.cinnamon.desktop.session");
-        manager->priv->use_logind = g_settings_get_boolean 
(manager->priv->desktop_session_settings, "settings-daemon-uses-logind");
-
         manager->priv->cinnamon_session_settings = 
g_settings_new("org.cinnamon.SessionManager");
         /* for the power plugin interface code */
         manager->priv->power_settings = g_settings_new (SETTINGS_POWER_DIR);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/mouse/csd-mouse-manager.c 
new/cinnamon-settings-daemon-4.4.0/plugins/mouse/csd-mouse-manager.c
--- old/cinnamon-settings-daemon-4.2.2/plugins/mouse/csd-mouse-manager.c        
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/mouse/csd-mouse-manager.c        
2019-11-16 16:38:35.000000000 +0100
@@ -74,6 +74,7 @@
 
 #define KEY_TOUCHPAD_ENABLED             "touchpad-enabled"
 #define KEY_NATURAL_SCROLL_ENABLED       "natural-scroll"
+#define KEY_TOUCHPAD_DISABLE_WITH_MOUSE  "disable-with-external-mouse"
 
 /* Mouse settings */
 #define KEY_LOCATE_POINTER               "locate-pointer"
@@ -420,6 +421,47 @@
         }
 }
 
+static gboolean
+property_get_bool (GdkDevice *device,
+                   XDevice *xdevice,
+                   const char * property_name,
+                   int property_index)
+{
+        int rc;
+        Atom act_type, property;
+        int act_format;
+        unsigned long nitems, bytes_after;
+        unsigned char *data;
+
+        gboolean ret = FALSE;
+
+        property = property_from_name (property_name);
+        if (!property) {
+                return FALSE;
+        }
+
+        g_debug ("Getting %s on %s", property_name, gdk_device_get_name 
(device));
+
+        gdk_x11_display_error_trap_push (gdk_display_get_default ());
+        rc = XGetDeviceProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default 
()), xdevice,
+                                 property, 0, 1, False,
+                                 XA_INTEGER, &act_type, &act_format, &nitems,
+                                 &bytes_after, &data);
+        if (rc == Success && act_type == XA_INTEGER && act_format == 8 && 
nitems > property_index) {
+                ret = data[property_index];
+        }
+
+        if (rc == Success) {
+                XFree (data);
+        }
+
+        if (gdk_x11_display_error_trap_pop (gdk_display_get_default ())) {
+                g_warning ("Error while getting %s on \"%s\"", property_name, 
gdk_device_get_name (device));
+        }
+
+        return ret;
+}
+
 static void
 touchpad_set_bool (GdkDevice *device, const char * property_name, int 
property_index, gboolean enable)
 {
@@ -435,6 +477,24 @@
         xdevice_close (xdevice);
 }
 
+static gboolean
+touchpad_get_bool (GdkDevice *device, const char * property_name, int 
property_index)
+{
+        XDevice *xdevice;
+        gboolean ret = FALSE;
+
+        xdevice = open_gdk_device (device);
+        if (xdevice == NULL)
+                return ret;
+
+        if (device_is_touchpad (xdevice))
+                ret = property_get_bool (device, xdevice, property_name, 
property_index);
+
+        xdevice_close (xdevice);
+
+        return ret;
+}
+
 static void
 set_left_handed_legacy_driver (CsdMouseManager *manager,
                                GdkDevice       *device,
@@ -932,6 +992,39 @@
         return 0;
 }
 
+static int
+set_disable_w_mouse_attached_libinput (CsdMouseManager *manager, gboolean 
state)
+{
+        GList *devices, *l;
+
+        /* This is only called once for synaptics but for libinput we need
+         * to loop through the list of devices
+         */
+        devices = gdk_device_manager_list_devices 
(manager->priv->device_manager, GDK_DEVICE_TYPE_SLAVE);
+
+        for (l = devices; l != NULL; l = l->next) {
+                GdkDevice *device = l->data;
+
+                if (device_is_ignored (manager, device))
+                        continue;
+
+                if (touchpad_get_bool (device, "libinput Send Events Modes 
Available", 1)) {
+                    touchpad_set_bool (device, "libinput Send Events Mode 
Enabled", 1, state);
+                }
+
+        }
+        g_list_free (devices);
+
+        return 0;
+}
+
+static void
+set_disable_w_mouse_attached (CsdMouseManager *manager, gboolean state)
+{
+
+        set_disable_w_mouse_attached_libinput (manager, state);
+}
+
 static void
 set_tap_to_click_synaptics (GdkDevice *device,
                             gboolean   state,
@@ -1528,6 +1621,11 @@
                 return;
         }
 
+        if (g_str_equal (key, KEY_TOUCHPAD_DISABLE_WITH_MOUSE)) {
+                set_disable_w_mouse_attached (manager, g_settings_get_boolean 
(manager->priv->touchpad_settings, key));
+                return;
+        }
+
         devices = gdk_device_manager_list_devices 
(manager->priv->device_manager, GDK_DEVICE_TYPE_SLAVE);
 
         for (l = devices; l != NULL; l = l->next) {
@@ -1602,6 +1700,7 @@
 
                 /* If a touchpad was to appear... */
                 set_disable_w_typing (manager, g_settings_get_boolean 
(manager->priv->touchpad_settings, KEY_TOUCHPAD_DISABLE_W_TYPING));
+                set_disable_w_mouse_attached (manager, g_settings_get_boolean 
(manager->priv->touchpad_settings, KEY_TOUCHPAD_DISABLE_WITH_MOUSE));
         }
 }
 
@@ -1676,6 +1775,8 @@
                                 g_settings_get_boolean 
(manager->priv->mouse_a11y_settings, KEY_DWELL_CLICK_ENABLED),
                                 g_settings_get_boolean 
(manager->priv->mouse_a11y_settings, KEY_SECONDARY_CLICK_ENABLED));
         set_disable_w_typing (manager, g_settings_get_boolean 
(manager->priv->touchpad_settings, KEY_TOUCHPAD_DISABLE_W_TYPING));
+        set_disable_w_mouse_attached (manager, g_settings_get_boolean 
(manager->priv->touchpad_settings, KEY_TOUCHPAD_DISABLE_WITH_MOUSE));
+
 
         devices = gdk_device_manager_list_devices 
(manager->priv->device_manager, GDK_DEVICE_TYPE_SLAVE);
         for (l = devices; l != NULL; l = l->next) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-settings-daemon-4.2.2/plugins/power/csd-power-manager.c 
new/cinnamon-settings-daemon-4.4.0/plugins/power/csd-power-manager.c
--- old/cinnamon-settings-daemon-4.2.2/plugins/power/csd-power-manager.c        
2019-07-25 10:22:55.000000000 +0200
+++ new/cinnamon-settings-daemon-4.4.0/plugins/power/csd-power-manager.c        
2019-11-16 16:38:35.000000000 +0100
@@ -138,7 +138,6 @@
         GSettings               *settings_xrandr;
         GSettings               *settings_desktop_session;
         GSettings               *settings_cinnamon_session;
-        gboolean                use_logind;
         UpClient                *up_client;
         GDBusConnection         *connection;
         GCancellable            *bus_cancellable;
@@ -1936,7 +1935,7 @@
 
                 gboolean hybrid = g_settings_get_boolean 
(manager->priv->settings_cinnamon_session,
                                                           
"prefer-hybrid-sleep");
-                csd_power_suspend (manager->priv->use_logind, hybrid);
+                csd_power_suspend (hybrid);
                 break;
         case CSD_POWER_ACTION_INTERACTIVE:
                 cinnamon_session_shutdown ();
@@ -1947,13 +1946,13 @@
                 }
 
                 turn_monitors_off (manager);
-                csd_power_hibernate (manager->priv->use_logind);
+                csd_power_hibernate ();
                 break;
         case CSD_POWER_ACTION_SHUTDOWN:
                 /* this is only used on critically low battery where
                  * hibernate is not available and is marginally better
                  * than just powering down the computer mid-write */
-                csd_power_poweroff (manager->priv->use_logind);
+                csd_power_poweroff ();
                 break;
         case CSD_POWER_ACTION_BLANK:
                 /* Lock first or else xrandr might reconfigure stuff and the 
ss's coverage
@@ -4081,7 +4080,6 @@
         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);
-        manager->priv->use_logind = g_settings_get_boolean 
(manager->priv->settings_desktop_session, "settings-daemon-uses-logind");
         manager->priv->inhibit_lid_switch_enabled =
                           g_settings_get_boolean (manager->priv->settings, 
"inhibit-lid-switch");
 


Reply via email to