File indexing completed on 2025-01-26 05:06:34
0001 /* 0002 SPDX-FileCopyrightText: 2017 Xuetian Weng <wengxt@gmail.com> 0003 SPDX-FileCopyrightText: 2018 Roman Gilg <subdiff@gmail.com> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "inputbackend.h" 0011 0012 #include <QtGui/private/qtx11extras_p.h> 0013 0014 #include <X11/Xdefs.h> 0015 0016 class X11Backend : public InputBackend 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 static X11Backend *implementation(QObject *parent = nullptr); 0022 ~X11Backend(); 0023 0024 void kcmInit() override; 0025 0026 bool isValid() const override 0027 { 0028 return m_dpy != nullptr; 0029 } 0030 0031 QString currentCursorTheme(); 0032 void applyCursorTheme(const QString &name, int size); 0033 0034 protected: 0035 X11Backend(QObject *parent = nullptr); 0036 0037 // We may still need to do something on non-X11 platform due to Xwayland. 0038 Display *m_dpy = nullptr; 0039 bool m_platformX11; 0040 };