From 8a6766d78b44feac84a39f832d171f44b7daa867 Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Mon, 23 Dec 2013 17:55:49 +0100 Subject: [PATCH 1/7] Do not use SO_SNDBUF on Vista or later Task-number: QTBUG-30478 Change-Id: I6c41bc8bea21aa00277d8bfce070ea993e2a0f28 Reviewed-by: Richard J. Moore --- src/network/socket/qnativesocketengine_win.cpp | 3 +++ 1 file changed, 3 insertions(+) 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: From 2c65b78b400ec27e6e559829b9a970dca2df6669 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 4 Dec 2013 12:51:28 +0100 Subject: [PATCH 2/7] Avoid duplicate emulated mouse events with XInput2 When using a touch screen on a Linux machine, we receive both touch-events and emulated mouse events from XInput, on top of that we synthesize mouse- events ourselves for the touch events. This patch grabs the touch device for touch events whenever it processes a touch-begin thereby avoiding XInput from synthesizing mouse events. Task-number: QTBUG-35157 Change-Id: I5849d5841be236d6719cd080af2e9e39eb9cdd84 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 6869baad95..a571f16eb6 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); From 84fd0afacbddc8675d20fb2c3b50da4a1520553f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Dec 2013 21:28:30 -0200 Subject: [PATCH 3/7] Remove disabling of warning 4660 on MSVC This warning no longer exists since at least MSVC.NET 2003. It's reported to have existed on MSVC 6 and older only. Task-number: QTBUG-35815 Change-Id: Ifb35d027edc3c1cbadac9a0d0a9c26524c52c87f Reviewed-by: Friedemann Kleint --- src/corelib/global/qglobal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 9e2dce6d8c..6ec244dbee 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -827,7 +827,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 */ From e4aeace51593b65990add2e624b1223d08b66227 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 22:14:36 -0200 Subject: [PATCH 4/7] Keep the configure listing of features alphabetical Change-Id: I0786b26a89e3e592bc47cb016ee7876ea7238c69 Reviewed-by: Robin Burchell --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index dad9fdd907..b16b79fa81 100755 --- a/configure +++ b/configure @@ -6720,6 +6720,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" @@ -6776,7 +6777,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 From a8d9878d48a0d3c90eff295d0c1b099baff1186c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 22:45:12 -0200 Subject: [PATCH 5/7] Fix Qt build when mtdev is detected If it's detected, we have "mtdev" in QT_CONFIG, not in CONFIG. With the bad test, libQt5PlatformSupport.prl would not get -lmtdev and, in turn, the evdevtouch generic plugin would fail to link. Change-Id: I5dab57b648e66943f98a22527717a20be35f02a4 Reviewed-by: Richard J. Moore Reviewed-by: Robin Burchell --- src/platformsupport/input/evdevtouch/evdevtouch.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } From 8b17f13c094d357b3a2d9a5e64bd1334791660fc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 22:17:41 -0200 Subject: [PATCH 6/7] Fix mtdev auto-detection The source code is valid C++. But not valid C. Change-Id: I43126001d33caef050b0bc8c248cf9f3b01091df Reviewed-by: Robin Burchell --- config.tests/unix/mtdev/{mtdev.c => mtdev.cpp} | 0 config.tests/unix/mtdev/mtdev.pro | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename config.tests/unix/mtdev/{mtdev.c => mtdev.cpp} (100%) 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 From ffac6ee2673a573a9db4f75a89c4c53251fa1304 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 29 Dec 2013 21:39:17 +0100 Subject: [PATCH 7/7] XCB: Fix pixmap leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In qt_xcb_XPixmapFromBitmap(), a new pixmap is generated for the caller. This pixmap has to be freed after use. However, createNonStandardCursor() didn't do this and instead leaked the pixmap. Change-Id: I6fee180ec6508db9e82a5bb028957e7d9f7a4632 Signed-off-by: Uli Schlachter Reviewed-by: Shawn Rutledge Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/qxcbcursor.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); } }