From 10a3b10726d2f46b2a284ecb7533bb9226f8c7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 16 May 2011 17:28:56 +0200 Subject: 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. --- src/gui/kernel/qplatformwindow_qpa.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp') 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 { @@ -78,6 +78,15 @@ QWindow *QPlatformWindow::window() const return d->window; } +/*! + 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 -- cgit v1.2.3