Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/backends/x11/xlibtouchpad.cpp
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Line(s) | |||||
246 | } | 246 | } | ||
247 | 247 | | |||
248 | bool XlibTouchpad::enabled() | 248 | bool XlibTouchpad::enabled() | ||
249 | { | 249 | { | ||
250 | PropertyInfo enabled(m_display, m_deviceId, m_enabledAtom.atom(), 0); | 250 | PropertyInfo enabled(m_display, m_deviceId, m_enabledAtom.atom(), 0); | ||
251 | return enabled.value(0).toBool(); | 251 | return enabled.value(0).toBool(); | ||
252 | } | 252 | } | ||
253 | 253 | | |||
254 | | ||||
255 | void XlibTouchpad::setTouchpadOff(int touchpadOff) | | |||
256 | { | | |||
257 | PropertyInfo off(m_display, m_deviceId, m_touchpadOffAtom.atom(), 0); | | |||
258 | if (off.b && *(off.b) != touchpadOff) { | | |||
259 | *(off.b) = touchpadOff; | | |||
260 | off.set(); | | |||
261 | } | | |||
262 | | ||||
263 | flush(); | | |||
264 | } | | |||
265 | | ||||
266 | int XlibTouchpad::touchpadOff() | | |||
267 | { | | |||
268 | PropertyInfo off(m_display, m_deviceId, m_touchpadOffAtom.atom(), 0); | | |||
269 | return off.value(0).toInt(); | | |||
270 | } | | |||
271 | | ||||
272 | XcbAtom& XlibTouchpad::touchpadOffAtom() | | |||
273 | { | | |||
274 | return m_touchpadOffAtom; | | |||
275 | } | | |||
276 | | ||||
277 | const Parameter* XlibTouchpad::findParameter(const QString& name) | 254 | const Parameter* XlibTouchpad::findParameter(const QString& name) | ||
278 | { | 255 | { | ||
279 | for (const Parameter *par = m_paramList; par->name; par++) { | 256 | for (const Parameter *par = m_paramList; par->name; par++) { | ||
280 | if (name == par->name) { | 257 | if (name == par->name) { | ||
281 | return par; | 258 | return par; | ||
282 | } | 259 | } | ||
283 | } | 260 | } | ||
284 | return 0; | 261 | return 0; | ||
285 | } | 262 | } |