From 7f42922169aed34f20233596a7657a00c14c9206 Mon Sep 17 00:00:00 2001 From: Monsta Date: Fri, 4 Sep 2015 10:54:05 +0300 Subject: mouse: use syndaemon -K to ignore Ctrl+C and other combos adapted from https://git.gnome.org/browse/gnome-settings-daemon/commit?id=d8e4167a257d253c0f02cb50d170b26ab57fb5be --- plugins/mouse/msd-mouse-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mouse') diff --git a/plugins/mouse/msd-mouse-manager.c b/plugins/mouse/msd-mouse-manager.c index 95b0073..fbb331e 100644 --- a/plugins/mouse/msd-mouse-manager.c +++ b/plugins/mouse/msd-mouse-manager.c @@ -593,7 +593,7 @@ set_disable_w_typing (MsdMouseManager *manager, gboolean state) args[0] = "syndaemon"; args[1] = "-i"; args[2] = "0.5"; - args[3] = "-k"; + args[3] = "-K"; args[4] = "-R"; args[5] = NULL; -- cgit v1.2.1 From 34274aa8258af8c41cc1b634604bf772990e120d Mon Sep 17 00:00:00 2001 From: Monsta Date: Fri, 4 Sep 2015 11:05:47 +0300 Subject: mouse: fix memleak adapted from https://git.gnome.org/browse/gnome-settings-daemon/commit?id=5ee48ce8aa66f6c4fdc4aa2c07bc03bdb83bcb65 --- plugins/mouse/msd-mouse-manager.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'plugins/mouse') diff --git a/plugins/mouse/msd-mouse-manager.c b/plugins/mouse/msd-mouse-manager.c index fbb331e..a198b7c 100644 --- a/plugins/mouse/msd-mouse-manager.c +++ b/plugins/mouse/msd-mouse-manager.c @@ -579,6 +579,18 @@ set_middle_button (MsdMouseManager *manager, XFreeDeviceList (device_info); } +static gboolean +have_program_in_path (const char *name) +{ + gchar *path; + gboolean result; + + path = g_find_program_in_path (name); + result = (path != NULL); + g_free (path); + return result; +} + static int set_disable_w_typing (MsdMouseManager *manager, gboolean state) { @@ -597,7 +609,7 @@ set_disable_w_typing (MsdMouseManager *manager, gboolean state) args[4] = "-R"; args[5] = NULL; - if (!g_find_program_in_path (args[0])) + if (!have_program_in_path (args[0])) return 0; g_spawn_async (g_get_home_dir (), args, NULL, -- cgit v1.2.1