diff --git a/src/plugins/platforms/xlib/qglxintegration.cpp b/src/plugins/platforms/xlib/qglxintegration.cpp index 51621408b9..b2d44cf084 100644 --- a/src/plugins/platforms/xlib/qglxintegration.cpp +++ b/src/plugins/platforms/xlib/qglxintegration.cpp @@ -41,7 +41,6 @@ #include #include -#include #include "qxlibwindow.h" #include "qxlibscreen.h" diff --git a/src/plugins/platforms/xlib/qxlibwindow.cpp b/src/plugins/platforms/xlib/qxlibwindow.cpp index 94c4332e65..00403aed64 100644 --- a/src/plugins/platforms/xlib/qxlibwindow.cpp +++ b/src/plugins/platforms/xlib/qxlibwindow.cpp @@ -62,7 +62,8 @@ #include #include -#include +#include +#include #include //#define MYX11_DEBUG @@ -379,10 +380,11 @@ void QXlibWindow::mousePressEvent(XButtonEvent *e) QEvent::Type type = QEvent::MouseButtonPress; - if (e->window == prevWindow && long(e->time) - prevTime < QApplication::doubleClickInterval() + const int doubleClickInterval = qApp->styleHints()->mouseDoubleClickInterval(); + if (e->window == prevWindow && long(e->time) - prevTime < doubleClickInterval && qAbs(e->x - prevX) < 5 && qAbs(e->y - prevY) < 5) { type = QEvent::MouseButtonDblClick; - prevTime = e->time - QApplication::doubleClickInterval(); //no double click next time + prevTime = e->time - doubleClickInterval; //no double click next time } else { prevTime = e->time; } @@ -724,7 +726,7 @@ void QXlibWindow::doSizeHints() s.flags |= USSize; s.flags |= PSize; s.flags |= PWinGravity; - s.win_gravity = QApplication::isRightToLeft() ? NorthEastGravity : NorthWestGravity; + s.win_gravity = QGuiApplication::isRightToLeft() ? NorthEastGravity : NorthWestGravity; XSetWMNormalHints(mScreen->display()->nativeDisplay(), x_window, &s); } diff --git a/src/plugins/platforms/xlib/xlib.pro b/src/plugins/platforms/xlib/xlib.pro index 463130a64b..a4e006f837 100644 --- a/src/plugins/platforms/xlib/xlib.pro +++ b/src/plugins/platforms/xlib/xlib.pro @@ -43,7 +43,6 @@ mac { CONFIG += qpa/genericunixfontdatabase contains(QT_CONFIG, opengl) { - QT += opengl !contains(QT_CONFIG, opengles2) { # load(qpa/glx/convenience) HEADERS += qglxintegration.h