From e1402c0d278b4570444e3e20b93fd5ab5619c8fc Mon Sep 17 00:00:00 2001 From: Morten Johan Sorvig Date: Thu, 3 May 2012 22:15:38 +0200 Subject: Add a method for querying window activation status from QPA. Add QPlatformWindow::isActive(), where the platform can do further isActive tests, and Windows implementation for it. Change-Id: I1acfc44d3a4ab36a3aaee52fb7b5f5b40661095e Reviewed-by: Miikka Heikkinen Reviewed-by: Friedemann Kleint Reviewed-by: Girish Ramakrishnan --- src/gui/kernel/qplatformwindow.h | 1 + src/gui/kernel/qplatformwindow_qpa.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'src/gui') diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h index d9f79f25eb..cded1fe316 100644 --- a/src/gui/kernel/qplatformwindow.h +++ b/src/gui/kernel/qplatformwindow.h @@ -102,6 +102,7 @@ public: virtual void lower(); virtual bool isExposed() const; + virtual bool isActive() const; virtual void propagateSizeHints(); diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index 88f2a6481e..d2ec6833b0 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -168,6 +168,17 @@ bool QPlatformWindow::isExposed() const return window()->isVisible(); } +/*! + Returns true if the window should appear active from a style perspective. + + This function can make platform-specific isActive checks, such as checking + if the QWindow is embedded in an active native window. +*/ +bool QPlatformWindow::isActive() const +{ + return false; +} + /*! Requests setting the window state of this surface to \a type. Returns the actual state set. -- cgit v1.2.3