diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-16 17:28:56 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-16 17:28:56 +0200 |
commit | 10a3b10726d2f46b2a284ecb7533bb9226f8c7c8 (patch) | |
tree | ee180a5d21a15d0b26b1bb14c10ca1890b675192 /src/gui/kernel/qplatformwindow_qpa.cpp | |
parent | 25f70314e0e2aa5cb913aba108d2e9c16117004a (diff) |
Re-implement transient window support in XCB backend.
If a QWindow has a parent but is top-level the corresponding
QPlatformWindow should not be re-parented but instead be made transient
for the parent window if possible.
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindow_qpa.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index afbff2ad5d..f6a1260d9d 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -70,7 +70,7 @@ QPlatformWindow::~QPlatformWindow() } /*! - Returnes the window which belongs to the QPlatformWindow + Returns the window which belongs to the QPlatformWindow */ QWindow *QPlatformWindow::window() const { @@ -79,6 +79,15 @@ QWindow *QPlatformWindow::window() const } /*! + Returns the parent platform window (or 0 if orphan). +*/ +QPlatformWindow *QPlatformWindow::parent() const +{ + Q_D(const QPlatformWindow); + return d->window->parent() ? d->window->parent()->handle() : 0; +} + +/*! This function is called by Qt whenever a window is moved or the window is resized. The resize can happen programatically(from ie. user application) or by the window manager. This means that there is no need to call this function specifically from the window manager callback, instead |