diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-02-22 13:55:28 +0300 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-06-28 11:08:34 +0000 |
commit | b1381ea9ebb3dd4019081f4412f82a3280b4eb52 (patch) | |
tree | 2a168e0c4e4efa7996e17f8ad408824ad74bbc00 /src/plugins/platforms/xcb/qxcbwindow.cpp | |
parent | 8612b0ed938bfbf7cfd2e5db405aa6a0109f41d2 (diff) |
xcb: Use QT_CONFIG macro to check for xcb-xlib
... and remove the XCB_USE_XLIB define.
This patch also removes the unnecessary checks for xcb-xlib in:
- qxcbglxintegration.cpp as this files is build _only_ when
xcb-xlib is present. From gl_integrations.pro:
qtConfig(xcb-xlib):qtConfig(opengl):!qtConfig(opengles2) {
SUBDIRS += xcb_glx
}
This also would have been the right place where to define
XCB_USE_XLIB, instead of unconditional line in xcb_glx.pro:
DEFINES += XCB_USE_GLX XCB_USE_XLIB
- qxcbnativeinterface.cpp as this cpp file does not use any
Xlib APIs directly, there is no need to include Xlib.h.
Change-Id: I531b5f1e79606fcfd1c63810cf51b7d5e9dc58a7
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index d6c69d52ef..31757ca6f6 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -99,7 +99,7 @@ #include <QTextCodec> #include <stdio.h> -#ifdef XCB_USE_XLIB +#if QT_CONFIG(xcb_xlib) #include <X11/Xlib.h> #include <X11/Xutil.h> #endif @@ -251,7 +251,7 @@ static inline bool positionIncludesFrame(QWindow *w) return qt_window_private(w)->positionPolicy == QWindowPrivate::WindowFrameInclusive; } -#ifdef XCB_USE_XLIB +#if QT_CONFIG(xcb_xlib) static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s) { #include <X11/Xatom.h> @@ -297,7 +297,7 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s) #endif return &tp; } -#endif // XCB_USE_XLIB +#endif // QT_CONFIG(xcb_xlib) // TODO move this into a utility function in QWindow or QGuiApplication static QWindow *childWindowAt(QWindow *win, const QPoint &p) @@ -569,7 +569,7 @@ void QXcbWindow::create() if (window()->flags() & Qt::WindowTransparentForInput) setTransparentForMouseEvents(true); -#ifdef XCB_USE_XLIB +#if QT_CONFIG(xcb_xlib) // force sync to read outstanding requests - see QTBUG-29106 XSync(DISPLAY_FROM_XCB(platformScreen), false); #endif @@ -1535,7 +1535,7 @@ void QXcbWindow::setWindowTitle(const QString &title) ba.length(), ba.constData())); -#ifdef XCB_USE_XLIB +#if QT_CONFIG(xcb_xlib) XTextProperty *text = qstringToXTP(DISPLAY_FROM_XCB(this), title); if (text) XSetWMName(DISPLAY_FROM_XCB(this), m_window, text); |