summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-23 07:13:00 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-23 07:13:00 +0100
commit1ed7a67a4cef8350103e4ea33b4bbd084f5d4c2d (patch)
tree03dd7b6f8d9ccc02da6d0d882793ec62c71b00f7 /src/platformsupport
parentdbb7817e13bc7f7ccb8f04b00a65eb3dcf8d25f8 (diff)
parent6a2b17eeec2d171d2afa17bdbc36456346bfd13b (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/eglconvenience/eglconvenience.pri1
-rw-r--r--src/platformsupport/eglconvenience/qeglstreamconvenience_p.h9
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp4
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp4
-rw-r--r--src/platformsupport/input/libinput/qlibinputpointer.cpp8
5 files changed, 22 insertions, 4 deletions
diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri
index 1cab1e556f..f1e0d58a6d 100644
--- a/src/platformsupport/eglconvenience/eglconvenience.pri
+++ b/src/platformsupport/eglconvenience/eglconvenience.pri
@@ -23,6 +23,7 @@ contains(QT_CONFIG,egl) {
$$PWD/qxlibeglintegration_p.h
SOURCES += \
$$PWD/qxlibeglintegration.cpp
+ LIBS_PRIVATE += $$QMAKE_LIBS_X11
}
CONFIG += egl
}
diff --git a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h
index 12787d03ae..648b129579 100644
--- a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h
+++ b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h
@@ -84,6 +84,15 @@ typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDispla
typedef void *EGLStreamKHR;
typedef quint64 EGLuint64KHR;
#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
+#define EGL_STREAM_STATE_KHR 0x3214
+#define EGL_STREAM_STATE_CREATED_KHR 0x3215
+#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
+#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
+#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
+#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
+#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
+#define EGL_BAD_STREAM_KHR 0x321B
+#define EGL_BAD_STATE_KHR 0x321C
typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
index c4ebc5c51d..76d8aab8f2 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp
@@ -43,6 +43,7 @@
#include <qplatformdefs.h>
#include <private/qcore_unix_p.h> // overrides QT_OPEN
+#include <private/qhighdpiscaling_p.h>
#include <errno.h>
@@ -141,7 +142,8 @@ bool QEvdevMouseHandler::getHardwareMaximum()
m_hardwareHeight = absInfo.maximum - absInfo.minimum;
- QRect g = QGuiApplication::primaryScreen()->virtualGeometry();
+ QScreen *primaryScreen = QGuiApplication::primaryScreen();
+ QRect g = QHighDpi::toNativePixels(primaryScreen->virtualGeometry(), primaryScreen);
m_hardwareScalerX = static_cast<qreal>(m_hardwareWidth) / (g.right() - g.left());
m_hardwareScalerY = static_cast<qreal>(m_hardwareHeight) / (g.bottom() - g.top());
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
index 805397f021..68db0b26ba 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
@@ -41,6 +41,7 @@
#include <QtPlatformSupport/private/qdevicediscovery_p.h>
#include <private/qguiapplication_p.h>
#include <private/qinputdevicemanager_p_p.h>
+#include <private/qhighdpiscaling_p.h>
QT_BEGIN_NAMESPACE
@@ -106,7 +107,8 @@ QEvdevMouseManager::~QEvdevMouseManager()
void QEvdevMouseManager::clampPosition()
{
// clamp to screen geometry
- QRect g = QGuiApplication::primaryScreen()->virtualGeometry();
+ QScreen *primaryScreen = QGuiApplication::primaryScreen();
+ QRect g = QHighDpi::toNativePixels(primaryScreen->virtualGeometry(), primaryScreen);
if (m_x + m_xoffset < g.left())
m_x = g.left() - m_xoffset;
else if (m_x + m_xoffset > g.right())
diff --git a/src/platformsupport/input/libinput/qlibinputpointer.cpp b/src/platformsupport/input/libinput/qlibinputpointer.cpp
index 48e5a6cf1c..55339a841a 100644
--- a/src/platformsupport/input/libinput/qlibinputpointer.cpp
+++ b/src/platformsupport/input/libinput/qlibinputpointer.cpp
@@ -36,6 +36,7 @@
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>
#include <qpa/qwindowsysteminterface.h>
+#include <private/qhighdpiscaling_p.h>
QT_BEGIN_NAMESPACE
@@ -81,7 +82,8 @@ void QLibInputPointer::processMotion(libinput_event_pointer *e)
{
const double dx = libinput_event_pointer_get_dx(e);
const double dy = libinput_event_pointer_get_dy(e);
- const QRect g = QGuiApplication::primaryScreen()->virtualGeometry();
+ QScreen * const primaryScreen = QGuiApplication::primaryScreen();
+ const QRect g = QHighDpi::toNativePixels(primaryScreen->virtualGeometry(), primaryScreen);
m_pos.setX(qBound(g.left(), qRound(m_pos.x() + dx), g.right()));
m_pos.setY(qBound(g.top(), qRound(m_pos.y() + dy), g.bottom()));
@@ -110,7 +112,9 @@ void QLibInputPointer::processAxis(libinput_event_pointer *e)
void QLibInputPointer::setPos(const QPoint &pos)
{
- const QRect g = QGuiApplication::primaryScreen()->virtualGeometry();
+ QScreen * const primaryScreen = QGuiApplication::primaryScreen();
+ const QRect g = QHighDpi::toNativePixels(primaryScreen->virtualGeometry(), primaryScreen);
+
m_pos.setX(qBound(g.left(), pos.x(), g.right()));
m_pos.setY(qBound(g.top(), pos.y(), g.bottom()));
}