Change the repaint() to an update().
Forcing to repaint might cause a recursive repaint. Since there is no apparent reason to directly repaint, we just call update(). Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 244fedd484b022881b906b1bc794d5af19d02843)bb10
parent
68857f9045
commit
5839b221a0
|
|
@ -2733,7 +2733,7 @@ QWidget::macCGHandle() const
|
|||
return handle();
|
||||
}
|
||||
|
||||
void qt_mac_repaintParentUnderAlienWidget(QWidget *alienWidget)
|
||||
void qt_mac_updateParentUnderAlienWidget(QWidget *alienWidget)
|
||||
{
|
||||
QWidget *nativeParent = alienWidget->nativeParentWidget();
|
||||
if (!nativeParent)
|
||||
|
|
@ -2741,7 +2741,7 @@ void qt_mac_repaintParentUnderAlienWidget(QWidget *alienWidget)
|
|||
|
||||
QPoint globalPos = alienWidget->mapToGlobal(QPoint(0, 0));
|
||||
QRect dirtyRect = QRect(nativeParent->mapFromGlobal(globalPos), alienWidget->size());
|
||||
nativeParent->repaint(dirtyRect);
|
||||
nativeParent->update(dirtyRect);
|
||||
}
|
||||
|
||||
void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
|
||||
|
|
@ -2752,7 +2752,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
|
|||
if (!isWindow() && parentWidget())
|
||||
parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry()));
|
||||
if (!internalWinId())
|
||||
qt_mac_repaintParentUnderAlienWidget(this);
|
||||
qt_mac_updateParentUnderAlienWidget(this);
|
||||
d->deactivateWidgetCleanup();
|
||||
qt_mac_event_release(this);
|
||||
if(testAttribute(Qt::WA_WState_Created)) {
|
||||
|
|
@ -3683,7 +3683,7 @@ void QWidgetPrivate::hide_sys()
|
|||
[view setHidden:YES];
|
||||
} else {
|
||||
// INVARIANT: q is alien. Repaint where q is placed instead:
|
||||
qt_mac_repaintParentUnderAlienWidget(q);
|
||||
qt_mac_updateParentUnderAlienWidget(q);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue