Enabled compatibilty with Qt 5.2.1 on for X11
This commit is contained in:
parent
36645a5a74
commit
861322355e
|
@ -29,15 +29,11 @@
|
|||
** <http://libqxt.org> <foundation@libqxt.org>
|
||||
*****************************************************************************/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QVector>
|
||||
#include <X11/Xlib.h>
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
# include <QX11Info>
|
||||
#else
|
||||
# include <QApplication>
|
||||
# include <qpa/qplatformnativeinterface.h>
|
||||
# include <xcb/xcb.h>
|
||||
#endif
|
||||
#include <QX11Info>
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -91,14 +87,7 @@ class QxtX11Data {
|
|||
public:
|
||||
QxtX11Data()
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
m_display = QX11Info::display();
|
||||
#else
|
||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||
void *display = native->nativeResourceForScreen(QByteArray("display"),
|
||||
QGuiApplication::primaryScreen());
|
||||
m_display = reinterpret_cast<Display *>(display);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool isValid()
|
||||
|
|
Loading…
Reference in New Issue