Changeset View
Changeset View
Standalone View
Standalone View
kcms/input/inputbackend.cpp
Show All 23 Lines | |||||
24 | 24 | | |||
25 | #include <KWindowSystem/kwindowsystem.h> | 25 | #include <KWindowSystem/kwindowsystem.h> | ||
26 | 26 | | |||
27 | InputBackend *InputBackend::implementation(QObject *parent) | 27 | InputBackend *InputBackend::implementation(QObject *parent) | ||
28 | { | 28 | { | ||
29 | //There are multiple possible backends | 29 | //There are multiple possible backends | ||
30 | if (KWindowSystem::isPlatformX11()) { | 30 | if (KWindowSystem::isPlatformX11()) { | ||
31 | qCDebug(KCM_INPUT) << "Using X11 backend"; | 31 | qCDebug(KCM_INPUT) << "Using X11 backend"; | ||
32 | return new X11Backend(parent); | 32 | return X11Backend::implementation(parent); | ||
33 | } | 33 | } | ||
34 | else if (KWindowSystem::isPlatformWayland()) { | 34 | else if (KWindowSystem::isPlatformWayland()) { | ||
35 | qCDebug(KCM_INPUT) << "Using KWin+Wayland backend"; | 35 | qCDebug(KCM_INPUT) << "Using KWin+Wayland backend"; | ||
36 | return new KWinWaylandBackend(parent); | 36 | return new KWinWaylandBackend(parent); | ||
37 | } | 37 | } | ||
38 | else { | 38 | else { | ||
39 | qCCritical(KCM_INPUT) << "Not able to select appropriate backend."; | 39 | qCCritical(KCM_INPUT) << "Not able to select appropriate backend."; | ||
40 | return nullptr; | 40 | return nullptr; | ||
41 | } | 41 | } | ||
42 | } | 42 | } |