mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 18:09:10 +00:00
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
This commit is contained in:
parent
7d1b593fbd
commit
dac30a222e
@ -26,6 +26,7 @@
|
|||||||
#include "meta-backend-x11.h"
|
#include "meta-backend-x11.h"
|
||||||
#include "meta-input-settings-x11.h"
|
#include "meta-input-settings-x11.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/XInput2.h>
|
#include <X11/extensions/XInput2.h>
|
||||||
@ -219,16 +220,23 @@ meta_input_settings_x11_set_click_method (MetaInputSettings *settings,
|
|||||||
GDesktopTouchpadClickMethod mode)
|
GDesktopTouchpadClickMethod mode)
|
||||||
{
|
{
|
||||||
guchar values[2] = { 0 }; /* buttonareas, clickfinger */
|
guchar values[2] = { 0 }; /* buttonareas, clickfinger */
|
||||||
|
guchar *defaults;
|
||||||
|
|
||||||
switch (mode)
|
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:
|
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_NONE:
|
||||||
break;
|
break;
|
||||||
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_AREAS:
|
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_AREAS:
|
||||||
values[0] = 1;
|
values[0] = 1;
|
||||||
break;
|
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:
|
case G_DESKTOP_TOUCHPAD_CLICK_METHOD_FINGERS:
|
||||||
values[1] = 1;
|
values[1] = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user