QWidgetBackingStore: Don't flush foreign windows
Foreign windows do not have Qt backingstore content, and are also not capable of accepting Qt content. Change-Id: I959c7cdc32e6f4322497e132a436ce7d610a4106 Fixes: QTBUG-71183 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
e72613000e
commit
f018e315fd
|
|
@ -101,6 +101,13 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack
|
|||
|
||||
if (tlw->testAttribute(Qt::WA_DontShowOnScreen) || widget->testAttribute(Qt::WA_DontShowOnScreen))
|
||||
return;
|
||||
|
||||
// Foreign Windows do not have backing store content and must not be flushed
|
||||
if (QWindow *widgetWindow = widget->windowHandle()) {
|
||||
if (widgetWindow->type() == Qt::ForeignWindow)
|
||||
return;
|
||||
}
|
||||
|
||||
static bool fpsDebug = qEnvironmentVariableIntValue("QT_DEBUG_FPS");
|
||||
if (fpsDebug) {
|
||||
if (!widgetBackingStore->perfFrames++)
|
||||
|
|
|
|||
Loading…
Reference in New Issue