summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/openkode/qopenkodewindow.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-05-14 12:07:51 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-06-01 08:12:14 (GMT)
commitf3a920be362b85d248a9b76c1b15a0b096d7c90e (patch)
tree4b2d4c33ae0cc67cd731ba474f3153699c74928a /src/plugins/platforms/openkode/qopenkodewindow.cpp
parent28580117adf5149e7ca15a43a398b412f4ec0ab4 (diff)
downloadQt-f3a920be362b85d248a9b76c1b15a0b096d7c90e.zip
Qt-f3a920be362b85d248a9b76c1b15a0b096d7c90e.tar.gz
Qt-f3a920be362b85d248a9b76c1b15a0b096d7c90e.tar.bz2
gl on openkode. QGLWidget only works for toplevel widgets
and QGLWindowSurface is used for anything else
Diffstat (limited to 'src/plugins/platforms/openkode/qopenkodewindow.cpp')
-rw-r--r--src/plugins/platforms/openkode/qopenkodewindow.cpp41
1 files changed, 27 insertions, 14 deletions
diff --git a/src/plugins/platforms/openkode/qopenkodewindow.cpp b/src/plugins/platforms/openkode/qopenkodewindow.cpp
index 8e1527c..4d18a6f 100644
--- a/src/plugins/platforms/openkode/qopenkodewindow.cpp
+++ b/src/plugins/platforms/openkode/qopenkodewindow.cpp
@@ -63,23 +63,28 @@ QOpenKODEWindow::QOpenKODEWindow(QWidget *tlw)
return;
}
- const KDint windowSize[2] = { tlw->width(), tlw->height() };
+ const KDint windowSize[2] = { tlw->width(), tlw->height()-1 };
if (kdSetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_SIZE, windowSize)) {
qErrnoWarning(kdGetError(), "Could not set native window size");
return;
}
+ KDboolean visibillity(false);
+ if (kdSetWindowPropertybv(kdWindow, KD_WINDOWPROPERTY_VISIBILITY, &visibillity)) {
+ qErrnoWarning(kdGetError(), "Could not set visibillity to false");
+ }
+
// const KDboolean windowExclusive[] = { false };
// if (kdSetWindowPropertybv(kdWindow, KD_WINDOWPROPERTY_DESKTOP_EXCLUSIVE_NV, windowExclusive)) {
// qErrnoWarning(kdGetError(), "Could not set exclusive bit");
// //return;
// }
//
-// const KDint windowPos[2] = { tlw->x(), tlw->y() };
-// if (kdSetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_DESKTOP_OFFSET_NV, windowPos)) {
-// qErrnoWarning(kdGetError(), "Could not set native window position");
-// return;
-// }
+ const KDint windowPos[2] = { tlw->x(), tlw->y() };
+ if (kdSetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_DESKTOP_OFFSET_NV, windowPos)) {
+ qErrnoWarning(kdGetError(), "Could not set native window position");
+ return;
+ }
if (kdRealizeWindow(kdWindow, &eglWindow)) {
qErrnoWarning(kdGetError(), "Could not realize native window");
@@ -87,6 +92,11 @@ QOpenKODEWindow::QOpenKODEWindow(QWidget *tlw)
}
}
+QOpenKODEWindow::~QOpenKODEWindow()
+{
+ qDebug() << "destroying window";
+ kdDestroyWindow(kdWindow);
+}
void QOpenKODEWindow::setGeometry(const QRect &rect)
{
const QRect geo = geometry();
@@ -98,17 +108,20 @@ void QOpenKODEWindow::setGeometry(const QRect &rect)
}
}
-// if (geo.topLeft() != rect.topLeft()) {
-// const KDint windowPos[2] = { rect.x(), rect.y() };
-// if (kdSetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_DESKTOP_OFFSET_NV, windowPos)) {
-// qErrnoWarning(kdGetError(), "Could not set native window position");
-// //return;
-// }
-// }
+ if (geo.topLeft() != rect.topLeft()) {
+ const KDint windowPos[2] = { rect.x(), rect.y() };
+ if (kdSetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_DESKTOP_OFFSET_NV, windowPos)) {
+ qErrnoWarning(kdGetError(), "Could not set native window position");
+ //return;
+ }
+ }
}
void QOpenKODEWindow::setVisible(bool visible)
{
-
+ KDboolean visibillity(visible);
+ if (kdSetWindowPropertybv(kdWindow, KD_WINDOWPROPERTY_VISIBILITY, &visibillity)) {
+ qErrnoWarning(kdGetError(), "Could not set visibillity to false");
+ }
}