summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-02-08 15:22:18 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-02-08 18:29:16 (GMT)
commit6aa7b8ff77a968a2ad11181d21812e3fe675ba23 (patch)
treeb42a55db7d3aac8890f02d3c119c1a23217075e5 /src
parent6c19992488d1aa820e860575533f2e2c1d3351d1 (diff)
downloadQt-6aa7b8ff77a968a2ad11181d21812e3fe675ba23.zip
Qt-6aa7b8ff77a968a2ad11181d21812e3fe675ba23.tar.gz
Qt-6aa7b8ff77a968a2ad11181d21812e3fe675ba23.tar.bz2
Added setGeometry(), raise(), lower() and setParent() in XCB backend.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index bdb5fc1..caeb3fa 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -112,6 +112,11 @@ QXcbWindow::~QXcbWindow()
void QXcbWindow::setGeometry(const QRect &rect)
{
QPlatformWindow::setGeometry(rect);
+
+ const quint32 mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
+ const quint32 values[] = { rect.x(), rect.y(), rect.width(), rect.height() };
+
+ xcb_configure_window(xcb_connection(), m_window, mask, values);
}
void QXcbWindow::setVisible(bool visible)
@@ -137,8 +142,10 @@ WId QXcbWindow::winId() const
return m_window;
}
-void QXcbWindow::setParent(const QPlatformWindow *)
+void QXcbWindow::setParent(const QPlatformWindow *parent)
{
+ QPoint topLeft = geometry().topLeft();
+ xcb_reparent_window(xcb_connection(), window(), static_cast<const QXcbWindow *>(parent)->window(), topLeft.x(), topLeft.y());
}
void QXcbWindow::setWindowTitle(const QString &title)
@@ -156,10 +163,16 @@ void QXcbWindow::setWindowTitle(const QString &title)
void QXcbWindow::raise()
{
+ const quint32 mask = XCB_CONFIG_WINDOW_STACK_MODE;
+ const quint32 values[] = { XCB_STACK_MODE_ABOVE };
+ xcb_configure_window(xcb_connection(), m_window, mask, values);
}
void QXcbWindow::lower()
{
+ const quint32 mask = XCB_CONFIG_WINDOW_STACK_MODE;
+ const quint32 values[] = { XCB_STACK_MODE_BELOW };
+ xcb_configure_window(xcb_connection(), m_window, mask, values);
}
void QXcbWindow::requestActivateWindow()