KWin
Loading...
Searching...
No Matches
x11_standalone_cursor.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2013 Martin Gräßlin <mgraesslin@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10#include "cursor.h"
11
12#include <QTimer>
13#include <memory>
14
15namespace KWin
16{
17class XFixesCursorEventFilter;
18
19class KWIN_EXPORT X11Cursor : public Cursor
20{
21 Q_OBJECT
22public:
23 X11Cursor(bool xInputSupport = false);
24 ~X11Cursor() override;
25
27 {
28 m_needsPoll = true;
29 }
30
36 void notifyCursorChanged();
37
38protected:
39 void doSetPos() override;
40 void doGetPos() override;
41 void doStartMousePolling() override;
42 void doStopMousePolling() override;
43 void doStartCursorTracking() override;
44 void doStopCursorTracking() override;
45
46private Q_SLOTS:
52 void resetTimeStamp();
53 void mousePolled();
54 void aboutToBlock();
55
56private:
57 xcb_timestamp_t m_timeStamp;
58 uint16_t m_buttonMask;
59 QTimer m_resetTimeStampTimer;
60 QTimer m_mousePollingTimer;
61 bool m_hasXInput;
62 bool m_needsPoll;
63
64 std::unique_ptr<XFixesCursorEventFilter> m_xfixesFilter;
65
66 friend class Cursor;
67};
68
69}
Replacement for QCursor.
Definition cursor.h:102