diff --git a/config.tests/unix/mtdev/mtdev.c b/config.tests/unix/mtdev/mtdev.cpp similarity index 100% rename from config.tests/unix/mtdev/mtdev.c rename to config.tests/unix/mtdev/mtdev.cpp diff --git a/config.tests/unix/mtdev/mtdev.pro b/config.tests/unix/mtdev/mtdev.pro index 4555bf416c..4c7f76c89f 100644 --- a/config.tests/unix/mtdev/mtdev.pro +++ b/config.tests/unix/mtdev/mtdev.pro @@ -1,4 +1,4 @@ -SOURCES = mtdev.c +SOURCES = mtdev.cpp CONFIG += link_pkgconfig PKGCONFIG_PRIVATE += mtdev diff --git a/configure b/configure index 032ec01294..8da9ad6f80 100755 --- a/configure +++ b/configure @@ -6738,6 +6738,7 @@ report_support_plugin " PNG .................." "$CFG_PNG" "$CFG_LIBPNG" QtGu report_support " Glib ..................." "$CFG_GLIB" report_support " GTK theme .............." "$CFG_QGTKSTYLE" report_support " Large File ............." "$CFG_LARGEFILE" +report_support " mtdev .................." "$CFG_MTDEV" yes "system library" report_support " Networking:" [ "$XPLATFORM_MAC" = "yes" ] && \ report_support " CoreWlan ............." "$CFG_COREWLAN" @@ -6795,7 +6796,6 @@ report_support " TDS .................." "$CFG_SQL_tds" plugin "plugin" yes " report_support " udev ..................." "$CFG_LIBUDEV" report_support " xkbcommon .............." "$CFG_XKBCOMMON" system "system library" qt "bundled copy" report_support " zlib ..................." "$CFG_ZLIB" system "system library" yes "bundled copy" -report_support " mtdev .................." "$CFG_MTDEV" yes "system library" echo 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(&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(m_xlib_display), xiEvent->deviceid, platformWindow->winId(), xiEvent->time, None, GrabModeAsync, GrabModeAsync, true, &xieventmask); + } else if (xiEvent->evtype == XI_TouchEnd) + XIUngrabDevice(static_cast(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); } }