summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-10-02 02:55:57 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-10-22 21:13:32 (GMT)
commit6e84a8f0d93f178611a40917fec92648e956fe38 (patch)
tree110a0d6607900fa656e77e8fbd7bf7ece9fc5692 /src
parent0381847d381c6cc089e2d5da62d0d102df713cb0 (diff)
downloadQt-6e84a8f0d93f178611a40917fec92648e956fe38.zip
Qt-6e84a8f0d93f178611a40917fec92648e956fe38.tar.gz
Qt-6e84a8f0d93f178611a40917fec92648e956fe38.tar.bz2
Store DirectFB winID as a dynamic property
Since QWS uses the winids for its own purposes I have to store this as a dynamic property. _q_DirectFBWindowID The _q_ is documented to be reserved so this won't break anyone's applications. Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp13
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;
}