Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/windowed/x11windowed_output.h
Show All 39 Lines | |||||
40 | */ | 40 | */ | ||
41 | class KWIN_EXPORT X11WindowedOutput : public AbstractWaylandOutput | 41 | class KWIN_EXPORT X11WindowedOutput : public AbstractWaylandOutput | ||
42 | { | 42 | { | ||
43 | Q_OBJECT | 43 | Q_OBJECT | ||
44 | public: | 44 | public: | ||
45 | explicit X11WindowedOutput(X11WindowedBackend *backend); | 45 | explicit X11WindowedOutput(X11WindowedBackend *backend); | ||
46 | ~X11WindowedOutput() override; | 46 | ~X11WindowedOutput() override; | ||
47 | 47 | | |||
48 | void init(const QPoint &logicalPosition, const QSize &pixelSize); | | |||
49 | | ||||
50 | xcb_window_t window() const { | 48 | xcb_window_t window() const { | ||
51 | return m_window; | 49 | return m_window; | ||
52 | } | 50 | } | ||
53 | 51 | | |||
54 | QPoint internalPosition() const; | 52 | QPoint internalPosition() const; | ||
55 | QPoint hostPosition() const { | 53 | QPoint hostPosition() const { | ||
56 | return m_hostPosition; | 54 | return m_hostPosition; | ||
57 | } | 55 | } | ||
58 | void setHostPosition(const QPoint &pos); | 56 | void setHostPosition(const QPoint &pos); | ||
59 | 57 | | |||
60 | void setWindowTitle(const QString &title); | 58 | void setWindowTitle(const QString &title); | ||
61 | 59 | | |||
62 | /** | 60 | /** | ||
63 | * @brief defines the geometry of the output | 61 | * @brief defines the geometry of the output | ||
64 | * @param logicalPosition top left position of the output in compositor space | 62 | * @param logicalPosition top left position of the output in compositor space | ||
65 | * @param pixelSize output size as seen from the outside | 63 | * @param pixelSize output size as seen from the outside | ||
66 | */ | 64 | */ | ||
67 | void setGeometry(const QPoint &logicalPosition, const QSize &pixelSize); | 65 | void setGeometry(const QPoint &logicalPosition, const QSize &pixelSize); | ||
68 | 66 | | |||
69 | private: | 67 | private: | ||
68 | void init(const QPoint &logicalPosition, const QSize &pixelSize); | ||||
70 | void initXInputForWindow(); | 69 | void initXInputForWindow(); | ||
71 | 70 | | |||
72 | xcb_window_t m_window = XCB_WINDOW_NONE; | 71 | xcb_window_t m_window = XCB_WINDOW_NONE; | ||
73 | NETWinInfo *m_winInfo = nullptr; | 72 | NETWinInfo *m_winInfo = nullptr; | ||
74 | 73 | | |||
75 | QPoint m_hostPosition; | 74 | QPoint m_hostPosition; | ||
76 | 75 | | |||
77 | X11WindowedBackend *m_backend; | 76 | X11WindowedBackend *m_backend; | ||
77 | | ||||
78 | friend class X11WindowedBackend; | ||||
78 | }; | 79 | }; | ||
79 | 80 | | |||
80 | } | 81 | } | ||
81 | 82 | | |||
82 | #endif | 83 | #endif |