summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2012-03-02 16:33:01 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-02 21:33:08 +0100
commit9c757fac3540f12b066dcecc936714bcd119f155 (patch)
tree83b3ff546bd3718ae633928bc442070bc491ace4 /src/plugins/platforms/xcb/qxcbconnection.h
parentc679b2f0a65a630f7490b37529e2186a8cd9c78b (diff)
xcb: Check for SHAPE extension before using it
This change makes sure that the X11 server really supports the SHAPE extension before it is used. Before this, libxcb would disconnect from the server as soon as it was told to send a SHAPE request to a server which doesn't support SHAPE. Oh and of course it would do so without any good error message. Change-Id: I5f9481e488925e74e62f229e9f637ef262020c04 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 7beb41bdd7..34943bfdef 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -354,6 +354,8 @@ public:
inline void setTime(xcb_timestamp_t t) { if (t > m_time) m_time = t; }
bool hasXFixes() const { return xfixes_first_event > 0; }
+ bool hasXShape() const { return has_shape_extension; }
+ bool hasInputShape() const { return has_input_shape; }
private slots:
void processXcbEvents();
@@ -363,6 +365,7 @@ private:
void sendConnectionEvent(QXcbAtom::Atom atom, uint id = 0);
void initializeXFixes();
void initializeXRender();
+ void initializeXShape();
#ifdef XCB_USE_DRI2
void initializeDri2();
#endif
@@ -429,6 +432,9 @@ private:
QVector<PeekFunc> m_peekFuncs;
uint32_t xfixes_first_event;
+
+ bool has_shape_extension;
+ bool has_input_shape;
};
#define DISPLAY_FROM_XCB(object) ((Display *)(object->connection()->xlib_display()))