summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-30 09:21:44 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-07 18:32:12 +0000
commit7c5c857679a0f58ca8fe5dcc9f8de3e3d83f0290 (patch)
tree38ba47f72e1f6a0b32947a6f5e4c3d7908330834 /src/plugins
parent83347e2d39dd967b6889977eddf77a18ff655ccc (diff)
Windows QPA: Fix over-large transparent tooltips
Setting transparency (WS_EX_LAYERED) causes a WM_PAINT to be sent to the invisible windows, which causes a resize to the default size (640x480) to be sent from QGuiApplicationPrivate::processExposeEvent(). Suppress these messages. Fixes: QTBUG-75455 Change-Id: Idc540aa7f9bf0047e78ec7c27db260940483f7c4 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 0376e363f3..dc9aa0da23 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1875,6 +1875,9 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
{
if (message == WM_ERASEBKGND) // Backing store - ignored.
return true;
+ // QTBUG-75455: Suppress WM_PAINT sent to invisible windows when setting WS_EX_LAYERED
+ if (!window()->isVisible() && (GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED) != 0)
+ return false;
// Ignore invalid update bounding rectangles
RECT updateRect;
if (!GetUpdateRect(m_data.hwnd, &updateRect, FALSE))