summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp')
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
index bf860f982e..50d0cb81f5 100644
--- a/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
+++ b/src/plugins/platforms/direct2d/qwindowsdirect2dwindow.cpp
@@ -54,6 +54,9 @@ QWindowsDirect2DWindow::QWindowsDirect2DWindow(QWindow *window, const QWindowsWi
: QWindowsWindow(window, data)
, m_needsFullFlush(true)
{
+ if (window->type() == Qt::Desktop)
+ return; // No further handling for Qt::Desktop
+
DXGI_SWAP_CHAIN_DESC1 desc = {};
desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -125,7 +128,7 @@ void QWindowsDirect2DWindow::flush(QWindowsDirect2DBitmap *bitmap, const QRegion
}
m_bitmap->deviceContext()->end();
- m_swapChain->Present(1, 0);
+ m_swapChain->Present(0, 0);
}
void QWindowsDirect2DWindow::resizeSwapChain(const QSize &size)