diff options
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 27ec668..3fbefc3 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -168,6 +168,16 @@ void QDirectFBWindowSurface::createWindow(const QRect &rect) if (result != DFB_OK) DirectFBErrorFatal("QDirectFBWindowSurface::createWindow", result); + if (window()) { + DFBWindowID winid; + result = dfbWindow->GetID(dfbWindow, &winid); + if (result != DFB_OK) { + DirectFBError("QDirectFBWindowSurface::createWindow. Can't get ID", result); + } else { + window()->setProperty("_q_DirectFBWindowID", winid); + } + } + Q_ASSERT(!dfbSurface); dfbWindow->GetSurface(dfbWindow, &dfbSurface); updateFormat(); @@ -220,6 +230,9 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) if (rect.isNull()) { #ifndef QT_NO_DIRECTFB_WM if (dfbWindow) { + if (window()) + window()->setProperty("_q_DirectFBWindowID", QVariant()); + dfbWindow->Release(dfbWindow); dfbWindow = 0; } |