Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/backends/x11/xlibbackend.cpp
Show All 33 Lines | |||||
34 | #include "propertyinfo.h" | 34 | #include "propertyinfo.h" | ||
35 | 35 | | |||
36 | #include <X11/Xlib-xcb.h> | 36 | #include <X11/Xlib-xcb.h> | ||
37 | #include <X11/Xatom.h> | 37 | #include <X11/Xatom.h> | ||
38 | #include <X11/extensions/XInput.h> | 38 | #include <X11/extensions/XInput.h> | ||
39 | #include <X11/extensions/XInput2.h> | 39 | #include <X11/extensions/XInput2.h> | ||
40 | 40 | | |||
41 | #include <synaptics-properties.h> | 41 | #include <synaptics-properties.h> | ||
42 | #include <libinput-properties.h> | ||||
42 | #include <xserver-properties.h> | 43 | #include <xserver-properties.h> | ||
43 | 44 | | |||
44 | struct DeviceListDeleter | 45 | struct DeviceListDeleter | ||
45 | { | 46 | { | ||
46 | static void cleanup(XDeviceInfo *p) | 47 | static void cleanup(XDeviceInfo *p) | ||
47 | { | 48 | { | ||
48 | if (p) { | 49 | if (p) { | ||
49 | XFreeDeviceList(p); | 50 | XFreeDeviceList(p); | ||
Show All 36 Lines | 79 | { | |||
86 | } | 87 | } | ||
87 | 88 | | |||
88 | m_mouseAtom.intern(m_connection, XI_MOUSE); | 89 | m_mouseAtom.intern(m_connection, XI_MOUSE); | ||
89 | m_keyboardAtom.intern(m_connection, XI_KEYBOARD); | 90 | m_keyboardAtom.intern(m_connection, XI_KEYBOARD); | ||
90 | m_touchpadAtom.intern(m_connection, XI_TOUCHPAD); | 91 | m_touchpadAtom.intern(m_connection, XI_TOUCHPAD); | ||
91 | m_enabledAtom.intern(m_connection, XI_PROP_ENABLED); | 92 | m_enabledAtom.intern(m_connection, XI_PROP_ENABLED); | ||
92 | 93 | | |||
93 | m_synapticsIdentifierAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES); | 94 | m_synapticsIdentifierAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES); | ||
94 | m_libinputIdentifierAtom.intern(m_connection, "libinput Send Events Modes Available"); | 95 | m_libinputIdentifierAtom.intern(m_connection, LIBINPUT_PROP_SENDEVENTS_AVAILABLE); | ||
95 | 96 | | |||
96 | m_device.reset(findTouchpad()); | 97 | m_device.reset(findTouchpad()); | ||
97 | if (!m_device) { | 98 | if (!m_device) { | ||
98 | m_errorString = ("No touchpad found"); | 99 | m_errorString = ("No touchpad found"); | ||
99 | } | 100 | } | ||
100 | } | 101 | } | ||
101 | 102 | | |||
102 | XlibTouchpad* XlibBackend::findTouchpad() | 103 | XlibTouchpad* XlibBackend::findTouchpad() | ||
▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines |