[mutter/gnome-3-16] input-settings-x11: Honor default value for click method setting
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-16] input-settings-x11: Honor default value for click method setting
- Date: Fri, 8 May 2015 15:51:18 +0000 (UTC)
commit 68d1832075616adc207c3d511034d1aee6d17f50
Author: Rui Matos <tiagomatos gmail com>
Date: Fri May 8 17:36:55 2015 +0200
input-settings-x11: Honor default value for click method setting
Now that xf86-input-libinput exposes default values we can honor the
gsettings value.
https://bugzilla.gnome.org/show_bug.cgi?id=746290
src/backends/x11/meta-input-settings-x11.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 6ef219f..f683c47 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -26,6 +26,7 @@
#include "meta-backend-x11.h"
#include "meta-input-settings-x11.h"
+#include <string.h>
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
#include <X11/extensions/XInput2.h>
@@ -219,16 +220,23 @@ meta_input_settings_x11_set_click_method (MetaInputSettings *settings,
GDesktopTouchpadClickMethod mode)
{
guchar values[2] = { 0 }; /* buttonareas, clickfinger */
+ guchar *defaults;
switch (mode)
{
+ case G_DESKTOP_TOUCHPAD_CLICK_METHOD_DEFAULT:
+ defaults = get_property (device, "libinput Click Method Enabled Default",
+ XA_INTEGER, 8, 2);
+ if (!defaults)
+ break;
+ memcpy (values, defaults, 2);
+ meta_XFree (defaults);
+ break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_NONE:
break;
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_AREAS:
values[0] = 1;
break;
- case G_DESKTOP_TOUCHPAD_CLICK_METHOD_DEFAULT:
- /* XXX: We can't be much smarter yet, x11 doesn't expose default settings */
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_FINGERS:
values[1] = 1;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]