From 8a6766d78b44feac84a39f832d171f44b7daa867 Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Mon, 23 Dec 2013 17:55:49 +0100 Subject: 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(+) (limited to 'src') 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: -- cgit v1.2.3 From 2c65b78b400ec27e6e559829b9a970dca2df6669 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 4 Dec 2013 12:51:28 +0100 Subject: 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(+) (limited to 'src') 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); -- cgit v1.2.3 From 84fd0afacbddc8675d20fb2c3b50da4a1520553f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Dec 2013 21:28:30 -0200 Subject: 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(-) (limited to 'src') 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 */ -- cgit v1.2.3 From a8d9878d48a0d3c90eff295d0c1b099baff1186c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 22:45:12 -0200 Subject: 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(-) (limited to 'src') 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 } -- cgit v1.2.3 From ffac6ee2673a573a9db4f75a89c4c53251fa1304 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 29 Dec 2013 21:39:17 +0100 Subject: 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(+) (limited to 'src') 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); } } -- cgit v1.2.3