mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2024-11-22 10:40:06 +08:00
5.13.2: 1st patch by Alberto M (backingstore)
This commit is contained in:
parent
ae08c2c47c
commit
1b675cbc44
@ -165,6 +165,12 @@ void QNSWindowBackingStore::flush(QWindow *window, const QRegion ®ion, const
|
||||
|
||||
const QWindow *topLevelWindow = this->window();
|
||||
|
||||
if (window->handle()->isForeignWindow()) {
|
||||
NSView *view = static_cast<QCocoaWindow *>(window->handle())->view();
|
||||
NSRect nsRect = NSRectFromCGRect(region.boundingRect().toCGRect());
|
||||
[view displayRect:nsRect];
|
||||
return;
|
||||
}
|
||||
Q_ASSERT(topLevelWindow->handle() && window->handle());
|
||||
Q_ASSERT(!topLevelWindow->handle()->isForeignWindow() && !window->handle()->isForeignWindow());
|
||||
|
||||
|
@ -107,12 +107,6 @@ 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
Block a user