summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-11-26 16:01:25 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-11-26 16:02:11 (GMT)
commitde3fbd3316797e73a67fbd1a0f7191c66ab88233 (patch)
tree4e916800f2213011ec990a5fd8417761a305b8d9 /src/plugins
parentc290785d0f8e1ef7af4bdff683aab40b8ff33681 (diff)
downloadQt-de3fbd3316797e73a67fbd1a0f7191c66ab88233.zip
Qt-de3fbd3316797e73a67fbd1a0f7191c66ab88233.tar.gz
Qt-de3fbd3316797e73a67fbd1a0f7191c66ab88233.tar.bz2
Implement setWindowTitle() on Lighthouse
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp4
-rw-r--r--src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h1
-rw-r--r--src/plugins/graphicssystems/testlite/x11util.cpp18
-rw-r--r--src/plugins/graphicssystems/testlite/x11util.h2
4 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp b/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
index 495b572..13dbae1 100644
--- a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
+++ b/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
@@ -590,6 +590,10 @@ void QTestLiteWindowSurface::lower()
XLowerWindow(mGraphicsSystem->xd->display, window);
}
+void QTestLiteWindowSurface::setWindowTitle(const QString &title)
+{
+ xw->setWindowTitle(title);
+}
void QTestLiteWindowSurface::setCursor(Qt::CursorShape shape)
{
diff --git a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h b/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h
index cedd66c..43d1b23 100644
--- a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h
+++ b/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h
@@ -81,6 +81,7 @@ public:
WId winId() const;
void raise();
void lower();
+ void setWindowTitle(const QString &title);
void setCursor(Qt::CursorShape shape);
diff --git a/src/plugins/graphicssystems/testlite/x11util.cpp b/src/plugins/graphicssystems/testlite/x11util.cpp
index e2fbd62..8c0b6c1 100644
--- a/src/plugins/graphicssystems/testlite/x11util.cpp
+++ b/src/plugins/graphicssystems/testlite/x11util.cpp
@@ -397,6 +397,24 @@ MyWindow::MyWindow(MyDisplay *display, int x, int y, int w, int h)
wmProtocolsAtom,
XA_ATOM, 32, PropModeAppend,
(unsigned char *) &wmDeleteWindowAtom, 1);
+
+
+ setWindowTitle(QLatin1String("Qt Lighthouse"));
+
+}
+
+
+void MyWindow::setWindowTitle(const QString &title)
+
+{
+ QByteArray ba = title.toLatin1(); //We're not making a general solution here...
+ XTextProperty windowName;
+ windowName.value = (unsigned char *)ba.constData();
+ windowName.encoding = XA_STRING;
+ windowName.format = 8;
+ windowName.nitems = ba.length();
+
+ XSetWMName(xd->display, window, &windowName);
}
MyWindow::~MyWindow()
diff --git a/src/plugins/graphicssystems/testlite/x11util.h b/src/plugins/graphicssystems/testlite/x11util.h
index e9d4c7b..fc88297 100644
--- a/src/plugins/graphicssystems/testlite/x11util.h
+++ b/src/plugins/graphicssystems/testlite/x11util.h
@@ -111,6 +111,8 @@ public:
void setVisible(bool visible);
void setCursorShape(int cshape);
+ void setWindowTitle(const QString &title);
+
public: //###
int xpos, ypos;