File indexing completed on 2025-01-26 05:06:34

0001 /*
0002     SPDX-FileCopyrightText: 2018 Roman Gilg <subdiff@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "x11_libinput_backend.h"
0008 #include "x11_libinput_dummydevice.h"
0009 
0010 X11LibinputBackend::X11LibinputBackend(QObject *parent)
0011     : X11Backend(parent)
0012 {
0013     m_mode = InputBackendMode::XLibinput;
0014     m_device = new X11LibinputDummyDevice(this, m_dpy);
0015 }
0016 
0017 bool X11LibinputBackend::applyConfig()
0018 {
0019     return static_cast<X11LibinputDummyDevice *>(m_device)->applyConfig();
0020 }
0021 
0022 bool X11LibinputBackend::getConfig()
0023 {
0024     return static_cast<X11LibinputDummyDevice *>(m_device)->getConfig();
0025 }
0026 
0027 bool X11LibinputBackend::getDefaultConfig()
0028 {
0029     return static_cast<X11LibinputDummyDevice *>(m_device)->getDefaultConfig();
0030 }
0031 
0032 bool X11LibinputBackend::isChangedConfig() const
0033 {
0034     return static_cast<X11LibinputDummyDevice *>(m_device)->isChangedConfig();
0035 }
0036 
0037 void X11LibinputBackend::kcmInit()
0038 {
0039     static_cast<X11LibinputDummyDevice *>(m_device)->getDefaultConfigFromX();
0040 
0041     getConfig();
0042     applyConfig();
0043     X11Backend::kcmInit();
0044 }