Changeset View
Changeset View
Standalone View
Standalone View
kcms/touchpad/src/touchpadbackend.cpp
Show All 22 Lines | |||||
23 | #include "backends/kwin_wayland/kwinwaylandbackend.h" | 23 | #include "backends/kwin_wayland/kwinwaylandbackend.h" | ||
24 | #include "logging.h" | 24 | #include "logging.h" | ||
25 | 25 | | |||
26 | #include <QThreadStorage> | 26 | #include <QThreadStorage> | ||
27 | #include <QSharedPointer> | 27 | #include <QSharedPointer> | ||
28 | 28 | | |||
29 | #include <KWindowSystem/kwindowsystem.h> | 29 | #include <KWindowSystem/kwindowsystem.h> | ||
30 | 30 | | |||
31 | void TouchpadBackend::setMode(TouchpadInputBackendMode mode) | ||||
32 | { | ||||
33 | m_mode = mode; | ||||
34 | } | ||||
35 | | ||||
31 | TouchpadBackend *TouchpadBackend::implementation() | 36 | TouchpadBackend *TouchpadBackend::implementation() | ||
32 | { | 37 | { | ||
33 | //There are multiple possible backends | 38 | //There are multiple possible backends | ||
34 | if (KWindowSystem::isPlatformX11()) { | 39 | if (KWindowSystem::isPlatformX11()) { | ||
35 | static QThreadStorage<QSharedPointer<XlibBackend> > backend; | 40 | static QThreadStorage<QSharedPointer<XlibBackend> > backend; | ||
36 | if (!backend.hasLocalData()) { | 41 | if (!backend.hasLocalData()) { | ||
37 | qCDebug(KCM_TOUCHPAD) << "Using X11 backend"; | 42 | qCDebug(KCM_TOUCHPAD) << "Using X11 backend"; | ||
38 | backend.setLocalData(QSharedPointer<XlibBackend>(XlibBackend::initialize())); | 43 | backend.setLocalData(QSharedPointer<XlibBackend>(XlibBackend::initialize())); | ||
Show All 13 Lines |