summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h1
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp3
-rw-r--r--src/platformsupport/input/evdevtouch/evdevtouch.pri2
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp16
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.cpp2
5 files changed, 22 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index f5f144fe6b..8b91545c9b 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -837,7 +837,6 @@ Q_CORE_EXPORT void qFreeAligned(void *ptr);
# pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
# pragma warning(disable: 4706) /* assignment within conditional expression */
# pragma warning(disable: 4786) /* truncating debug info after 255 characters */
-# pragma warning(disable: 4660) /* template-class specialization 'identifier' is already instantiated */
# pragma warning(disable: 4355) /* 'this' : used in base member initializer list */
# pragma warning(disable: 4231) /* nonstandard extension used : 'extern' before template explicit instantiation */
# pragma warning(disable: 4710) /* function not inlined */
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index 3027b77161..751ac9b182 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -496,6 +496,9 @@ bool QNativeSocketEnginePrivate::setOption(QNativeSocketEngine::SocketOption opt
n = SO_RCVBUF;
break;
case QNativeSocketEngine::SendBufferSocketOption:
+ // see QTBUG-30478 SO_SNDBUF should not be used on Vista or later
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
+ return false;
n = SO_SNDBUF;
break;
case QNativeSocketEngine::BroadcastSocketOption:
diff --git a/src/platformsupport/input/evdevtouch/evdevtouch.pri b/src/platformsupport/input/evdevtouch/evdevtouch.pri
index 402c276d4d..ffbb05d61d 100644
--- a/src/platformsupport/input/evdevtouch/evdevtouch.pri
+++ b/src/platformsupport/input/evdevtouch/evdevtouch.pri
@@ -8,7 +8,7 @@ contains(QT_CONFIG, libudev) {
LIBS_PRIVATE += $$QMAKE_LIBS_LIBUDEV
}
-contains(CONFIG, mtdev) {
+contains(QT_CONFIG, mtdev) {
CONFIG += link_pkgconfig
PKGCONFIG_PRIVATE += mtdev
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 198e323873..9b6d234375 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -432,6 +432,22 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
qDebug() << " touchpoint " << touchPoint.id << " state " << touchPoint.state << " pos norm " << touchPoint.normalPosition <<
" area " << touchPoint.area << " pressure " << touchPoint.pressure;
QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiEvent->time, dev->qtTouchDevice, m_touchPoints.values());
+ if (has_touch_without_mouse_emulation) {
+ // We need to grab the touch event to prevent mouse emulation.
+ if (xiEvent->evtype == XI_TouchBegin) {
+ XIEventMask xieventmask;
+ unsigned int bitMask = 0;
+ unsigned char *xiBitMask = reinterpret_cast<unsigned char *>(&bitMask);
+ xieventmask.deviceid = xiEvent->deviceid;
+ xieventmask.mask = xiBitMask;
+ xieventmask.mask_len = sizeof(bitMask);
+ bitMask |= XI_TouchBeginMask;
+ bitMask |= XI_TouchUpdateMask;
+ bitMask |= XI_TouchEndMask;
+ XIGrabDevice(static_cast<Display *>(m_xlib_display), xiEvent->deviceid, platformWindow->winId(), xiEvent->time, None, GrabModeAsync, GrabModeAsync, true, &xieventmask);
+ } else if (xiEvent->evtype == XI_TouchEnd)
+ XIUngrabDevice(static_cast<Display *>(m_xlib_display), xiEvent->deviceid, xiEvent->time);
+ }
if (touchPoint.state == Qt::TouchPointReleased)
// If a touchpoint was released, we can forget it, because the ID won't be reused.
m_touchPoints.remove(touchPoint.id);
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp
index 11848d503b..15e5bf27f1 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -483,6 +483,8 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
xcb_pixmap_t pmm = qt_xcb_XPixmapFromBitmap(m_screen, image.createAlphaMask());
cursor = xcb_generate_id(conn);
xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8);
+ xcb_free_pixmap(conn, pm);
+ xcb_free_pixmap(conn, pmm);
}
}