QWidget: Don't offset the clip region for windows using effects
When a top-level widget has a graphic effect applied, QWidgetPrivate::clipToEffectiveMask() must not use the parent widget for the mask calculation as this prevents the loop below from bailing out in the first loop (w->isWindow()) and might mess up the clip region when there is a widget with a mask in the parent chain. Pick-to: 6.8 Fixes: QTBUG-131893 Change-Id: I5d5777e730bee309db21ad5eb65387d19321ee6c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 49f462b7f873ecba6bb205697338a4f1eef6d307) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
351357c3a0
commit
b338217360
@ -2123,7 +2123,7 @@ void QWidgetPrivate::clipToEffectiveMask(QRegion ®ion) const
|
|||||||
QPoint offset;
|
QPoint offset;
|
||||||
|
|
||||||
#if QT_CONFIG(graphicseffect)
|
#if QT_CONFIG(graphicseffect)
|
||||||
if (graphicsEffect) {
|
if (graphicsEffect && !w->isWindow()) {
|
||||||
w = q->parentWidget();
|
w = q->parentWidget();
|
||||||
offset -= data.crect.topLeft();
|
offset -= data.crect.topLeft();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user