diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-02-06 01:28:20 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-02-15 22:14:52 +0000 |
commit | 8db9e33997a8fbe3e13eab1ca62ae2d5ac39abef (patch) | |
tree | 5795ae9a5da2dea5c13194428712a7712c368296 /src/plugins/platforms/xcb/qxcbconnection.h | |
parent | c7c20ce5e2fd8d784f50fbb44f689e50e89a4687 (diff) |
xcb: Enhance SHM management code
- extract the creation of a shared memory segment into a separate
function
- do extra checks for errors
- check that MIT-SHM extension is present once in QXcbConnection
Change-Id: I956bdf76b879ec5c95a7ed219a59ae722dc5afba
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 07df963ec5..b2713b8ac7 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -441,6 +441,7 @@ public: void sync(); void handleXcbError(xcb_generic_error_t *error); + void printXcbError(const char *message, xcb_generic_error_t *error); void handleXcbEvent(xcb_generic_event_t *event); void printXcbEvent(const QLoggingCategory &log, const char *message, xcb_generic_event_t *event) const; @@ -478,6 +479,7 @@ public: bool hasXKB() const { return has_xkb; } bool hasXRender() const { return has_render_extension; } bool hasXInput2() const { return m_xi2Enabled; } + bool hasShm() const { return has_shm; } bool threadedEventHandling() const { return m_reader->isRunning(); } @@ -545,6 +547,7 @@ private slots: private: void initializeAllAtoms(); void sendConnectionEvent(QXcbAtom::Atom atom, uint id = 0); + void initializeShm(); void initializeXFixes(); void initializeXRender(); void initializeXRandr(); @@ -699,6 +702,7 @@ private: bool has_input_shape; bool has_xkb = false; bool has_render_extension = false; + bool has_shm = false; Qt::MouseButtons m_buttonState = 0; Qt::MouseButton m_button = Qt::NoButton; |