From 23996a9e4007d12cf3eee8f80cebedaf2bcca2e1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 15 Jan 2015 18:02:38 +0100 Subject: Windows: make TranslucentBackground functional always QOpenGLWidget and QQuickWidget was not functional when WA_TranslucentBackground was set. This is due to the static "isGL" type of checks that are not suitable since 5.3 due to RasterGLSurface windows which may or may not be OpenGL windows, depending on their content. To handle this, we have to do some check on every makeCurrent and perform the necessary calls (most importantly SetLayeredWindowAttributes). Task-number: QTBUG-43854 Change-Id: If19c79482ec4f0a8b795ee710d52ed7e08b52563 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowscontext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 13a3d044a0..2dab4f699f 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -430,7 +430,7 @@ void QWindowsContext::setKeyGrabber(QWindow *w) // Window class registering code (from qapplication_win.cpp) -QString QWindowsContext::registerWindowClass(const QWindow *w, bool isGL) +QString QWindowsContext::registerWindowClass(const QWindow *w) { Q_ASSERT(w); const Qt::WindowFlags flags = w->flags(); @@ -438,7 +438,9 @@ QString QWindowsContext::registerWindowClass(const QWindow *w, bool isGL) // Determine style and icon. uint style = CS_DBLCLKS; bool icon = true; - if (isGL || (flags & Qt::MSWindowsOwnDC)) + // The following will not set CS_OWNDC for any widget window, even if it contains a + // QOpenGLWidget or QQuickWidget later on. That cannot be detected at this stage. + if (w->surfaceType() == QSurface::OpenGLSurface || (flags & Qt::MSWindowsOwnDC)) style |= CS_OWNDC; if (!(flags & Qt::NoDropShadowWindowHint) && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) && (type == Qt::Popup || w->property("_q_windowsDropShadow").toBool())) { @@ -471,8 +473,6 @@ QString QWindowsContext::registerWindowClass(const QWindow *w, bool isGL) default: break; } - if (isGL) - cname += QStringLiteral("GL"); if (style & CS_DROPSHADOW) cname += QStringLiteral("DropShadow"); if (style & CS_SAVEBITS) -- cgit v1.2.3 From 9e4ef3539a5770f1b422b73b41dc3218ff4efc81 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Tue, 20 Jan 2015 12:40:50 +0100 Subject: Fix finding widgets for Windows Embedded Compact ChildWindowFromPoint does not work properly under wince, so lets use the plain old WindowFromPoint. Task-number: QTBUG-44022 Change-Id: I49bae6409f2d11ddc01bea01f4c2f91a02b90892 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowscontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 13a3d044a0..ffa7f82d8e 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -676,7 +676,7 @@ static inline bool findPlatformWindowHelper(const POINT &screenPoint, unsigned c const HWND child = ChildWindowFromPointEx(*hwnd, point, cwexFlags); #else Q_UNUSED(cwexFlags) - const HWND child = ChildWindowFromPoint(*hwnd, point); + const HWND child = WindowFromPoint(point); #endif if (!child || child == *hwnd) return false; -- cgit v1.2.3 From 2b5df245d6cdbfb3150ee815debccf655af8f19f Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Tue, 20 Jan 2015 13:17:36 +0100 Subject: Implement Multitouch handling for WinCE Implemented handling of GID_DirectManipulation for WinCE. Derive touch information out of gesture event directmanipulation. Task-number: QTBUG-31216 Change-Id: I74e90f32d2384fc3550b47af0b72edf0292dea8f Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowscontext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 2dab4f699f..1cc596ca8d 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -905,6 +905,8 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, return QWindowsInputContext::instance()->endComposition(hwnd); case QtWindows::InputMethodRequest: return QWindowsInputContext::instance()->handleIME_Request(wParam, lParam, result); + case QtWindows::GestureEvent: + return d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result); case QtWindows::InputMethodOpenCandidateWindowEvent: case QtWindows::InputMethodCloseCandidateWindowEvent: // TODO: Release/regrab mouse if a popup has mouse grab. -- cgit v1.2.3