File indexing completed on 2024-05-12 05:37:18
0001 /* 0002 SPDX-FileCopyrightText: 2007 Fredrik Höglund <fredrik@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #pragma once 0008 0009 #include <QMap> 0010 #include <QWidget> 0011 0012 #include <X11/Xlib.h> 0013 #include <fixx11h.h> 0014 0015 class CursorNotificationHandler : public QWidget 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 CursorNotificationHandler(); 0021 ~CursorNotificationHandler() override; 0022 0023 QString cursorName(); 0024 0025 Q_SIGNALS: 0026 void cursorNameChanged(const QString &name); 0027 0028 protected: 0029 bool x11Event(XEvent *); 0030 0031 private: 0032 QString cursorName(Atom cursor); 0033 0034 private: 0035 bool haveXfixes; 0036 int fixesEventBase; 0037 Atom currentName; 0038 QMap<Atom, QString> names; 0039 };