[gnome-settings-daemon] mouse: Use event driven mode for syndaemon



commit f7071bf1f9941f0ba5fe23c645656e70fb2dd699
Author: Pauli Nieminen <suokkos gmail com>
Date:   Sat Jan 15 21:46:34 2011 +0200

    mouse: Use event driven mode for syndaemon
    
    In default polling mode syndaemon wakeups 5 times per second. That
    is pretty bad for power consumption with hungry laptop CPUs.
    
    If syndaemon was compiled to include XRecord extension -R parameter
    can be used to select even driven mode. Event driven mode wakeups
    only when there is KeyPress or KeyRelease event. In that time CPU
    is already running so impact for power consumption is lesser.
    
    Signed-off-by: Pauli Nieminen <suokkos gmail com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=639623

 plugins/mouse/gsd-mouse-manager.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 44df57f..0a9c179 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -555,7 +555,7 @@ set_disable_w_typing (GsdMouseManager *manager, gboolean state)
 {
         if (state && touchpad_is_present ()) {
                 GError *error = NULL;
-                char *args[5];
+                char *args[6];
 
                 if (manager->priv->syndaemon_spawned)
                         return 0;
@@ -564,7 +564,8 @@ set_disable_w_typing (GsdMouseManager *manager, gboolean state)
                 args[1] = "-i";
                 args[2] = "2.0";
                 args[3] = "-k";
-                args[4] = NULL;
+                args[4] = "-R";
+                args[5] = NULL;
 
                 if (!g_find_program_in_path (args[0]))
                         return 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]