File lxinput-0.3.4-Apply-left-handed-mouse-setting-in-autostart-file.patch of Package lxinput

From 38ea72e33fa3be77999367237fa7be8d3b7cf85b Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Tue, 5 May 2015 12:35:26 +0300
Subject: [PATCH] Fix: apply left handed mouse setting in autostart file.

If it does not set then the setting is applied only for current session.
See also https://bugs.launchpad.net/ubuntu/+source/lxinput/+bug/1426766
---
 src/lxinput.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lxinput.c b/src/lxinput.c
index e6936dc..950c004 100644
--- a/src/lxinput.c
+++ b/src/lxinput.c
@@ -349,13 +349,14 @@ int main(int argc, char** argv)
                                   "Name=%s\n"
                                   "Comment=%s\n"
                                   "NoDisplay=true\n"
-                                  "Exec=sh -c 'xset m %d/10 %d r rate %d %d b %s'\n"
+                                  "Exec=sh -c 'xset m %d/10 %d r rate %d %d b %s%s'\n"
                                   "NotShowIn=GNOME;KDE;XFCE;\n",
                                   _("LXInput autostart"),
                                   _("Setup keyboard and mouse using settings done in LXInput"),
                                   /* FIXME: how to setup left-handed mouse? */
                                   accel, threshold, delay, interval,
-                                  beep ? "on" : "off");
+                                  beep ? "on" : "off",
+                                  left_handed ? ";xmodmap -e \"pointer = 3 2 1\"" : "");
             g_file_set_contents(user_config_file, str, -1, NULL);
             g_free(str);
         }
-- 
2.1.3

openSUSE Build Service is sponsored by