Direct2D QPA: Do not attempt to create swap chain for desktop widget

We can't and don't need to create a swap chain for the desktop widget.

Change-Id: I84cd5c753710af09bab5c7afc27e202e661343db
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Risto Avila <risto.avila@digia.com>
This commit is contained in:
Louai Al-Khanji 2014-04-23 12:16:34 +03:00 committed by The Qt Project
parent f0e8f9c4de
commit a564b4e70a

View File

@ -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;