102 xcb_connection_t *connection()
const;
103 xcb_screen_t *screen()
const;
104 int screenNumer()
const;
106 gbm_device *gbmDevice()
const;
108 bool hasXInput()
const;
110 QHash<uint32_t, QList<uint64_t>> driFormats()
const;
111 uint32_t driFormatForDepth(
int depth)
const;
112 int driMajorVersion()
const;
113 int driMinorVersion()
const;
115 bool initialize()
override;
116 std::unique_ptr<OpenGLBackend> createOpenGLBackend()
override;
117 std::unique_ptr<QPainterBackend> createQPainterBackend()
override;
118 std::unique_ptr<InputBackend> createInputBackend()
override;
119 QList<CompositingType> supportedCompositors()
const override;
120 Outputs outputs()
const override;
126 void setEglDisplay(std::unique_ptr<EglDisplay> &&display);
127 EglDisplay *sceneEglDisplayObject()
const override;
130 void createOutputs();
131 void grabKeyboard(xcb_timestamp_t time);
132 void updateWindowTitle();
133 void handleEvent(xcb_generic_event_t *event);
134 void handleClientMessage(xcb_client_message_event_t *event);
135 void handleButtonPress(xcb_button_press_event_t *event);
136 void handleExpose(xcb_expose_event_t *event);
139 void updateSize(xcb_configure_notify_event_t *event);
143 void destroyOutputs();
146 xcb_connection_t *m_connection =
nullptr;
147 xcb_screen_t *m_screen =
nullptr;
149 int m_screenNumber = 0;
151 std::unique_ptr<X11WindowedInputDevice> m_pointerDevice;
152 std::unique_ptr<X11WindowedInputDevice> m_keyboardDevice;
153 std::unique_ptr<X11WindowedInputDevice> m_touchDevice;
155 xcb_atom_t m_protocols = XCB_ATOM_NONE;
156 xcb_atom_t m_deleteWindowProtocol = XCB_ATOM_NONE;
158 bool m_keyboardGrabbed =
false;
159 std::unique_ptr<QSocketNotifier> m_eventNotifier;
161 bool m_hasXInput =
false;
163 int m_majorVersion = 0;
164 int m_minorVersion = 0;
166 int m_presentOpcode = 0;
167 int m_presentMajorVersion = 0;
168 int m_presentMinorVersion = 0;
170 bool m_hasShm =
false;
172 bool m_hasDri =
false;
173 int m_driMajorVersion = 0;
174 int m_driMinorVersion = 0;
175 QHash<uint32_t, QList<uint64_t>> m_driFormats;
178 gbm_device *m_gbmDevice =
nullptr;
179 std::unique_ptr<EglDisplay> m_eglDisplay;
181 QList<X11WindowedOutput *> m_outputs;