Changeset View
Changeset View
Standalone View
Standalone View
xwl/xwayland.h
- This file was copied to xwl/clipboard.h.
Show All 16 Lines | |||||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_XWL_XWAYLAND | 20 | #ifndef KWIN_XWL_XWAYLAND | ||
21 | #define KWIN_XWL_XWAYLAND | 21 | #define KWIN_XWL_XWAYLAND | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | 24 | | |||
25 | #include <xcb/xproto.h> | ||||
26 | | ||||
25 | class QProcess; | 27 | class QProcess; | ||
26 | 28 | | |||
27 | class xcb_screen_t; | 29 | class xcb_screen_t; | ||
28 | 30 | | |||
29 | namespace KWin | 31 | namespace KWin | ||
30 | { | 32 | { | ||
31 | class ApplicationWaylandAbstract; | 33 | class ApplicationWaylandAbstract; | ||
32 | 34 | | |||
33 | namespace Xwl | 35 | namespace Xwl | ||
34 | { | 36 | { | ||
37 | class DataBridge; | ||||
35 | 38 | | |||
36 | class Xwayland : public QObject | 39 | class Xwayland : public QObject | ||
37 | { | 40 | { | ||
38 | Q_OBJECT | 41 | Q_OBJECT | ||
39 | public: | 42 | public: | ||
43 | static Xwayland* self(); | ||||
44 | | ||||
40 | Xwayland(ApplicationWaylandAbstract *app, QObject *parent = nullptr); | 45 | Xwayland(ApplicationWaylandAbstract *app, QObject *parent = nullptr); | ||
41 | virtual ~Xwayland(); | 46 | virtual ~Xwayland(); | ||
42 | 47 | | |||
43 | void init(); | 48 | void init(); | ||
49 | void prepareDestroy(); | ||||
50 | | ||||
51 | xcb_screen_t *xcbScreen() const { | ||||
52 | return m_xcbScreen; | ||||
53 | } | ||||
54 | const xcb_query_extension_reply_t *xfixes() const { | ||||
55 | return m_xfixes; | ||||
56 | } | ||||
44 | 57 | | |||
45 | Q_SIGNALS: | 58 | Q_SIGNALS: | ||
46 | void criticalError(int code); | 59 | void criticalError(int code); | ||
47 | 60 | | |||
48 | private: | 61 | private: | ||
49 | void createX11Connection(); | 62 | void createX11Connection(); | ||
50 | void continueStartupWithX(); | 63 | void continueStartupWithX(); | ||
51 | 64 | | |||
52 | int m_xcbConnectionFd = -1; | 65 | int m_xcbConnectionFd = -1; | ||
53 | QProcess *m_xwaylandProcess = nullptr; | 66 | QProcess *m_xwaylandProcess = nullptr; | ||
54 | QMetaObject::Connection m_xwaylandFailConnection; | 67 | QMetaObject::Connection m_xwaylandFailConnection; | ||
55 | 68 | | |||
69 | xcb_screen_t *m_xcbScreen = nullptr; | ||||
70 | const xcb_query_extension_reply_t *m_xfixes = nullptr; | ||||
71 | DataBridge *m_dataBridge = nullptr; | ||||
72 | | ||||
56 | ApplicationWaylandAbstract *m_app; | 73 | ApplicationWaylandAbstract *m_app; | ||
57 | }; | 74 | }; | ||
58 | 75 | | |||
59 | } | 76 | } | ||
60 | } | 77 | } | ||
61 | 78 | | |||
62 | #endif | 79 | #endif |