summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-12-21 15:06:40 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-25 07:17:43 +0000
commit28ee76fd0b9ce59291341c8a9937a6c98fcb926d (patch)
treecd385d6a5b771c7e88639e05cef1630bba7458e3 /src/gui
parent97965a0908b8fbf7f01d0880410929a4ea61b48d (diff)
QtPlatformHeaders/Windows: Add function to set window activation behavior.
The Windows OS by default does not activate windows when the calling process is not active; only the taskbar entry is flashed as not to distract the user. Nevertheless, for some use cases, it is desirable to activate the window also in the inactive state. Introduce an enumeration specifying the behavior to QtPlatformHeaders and employ a workaround using the Win32 API AttachThreadInput() to attach to other processes while setting the foreground window to achieve the AlwaysActivateWindow behavior. Task-number: QTBUG-14062 Task-number: QTBUG-37435 Change-Id: I79cb6cd3fab29d55b5d3db7f9af01bbaa5096a37 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/doc/qtgui.qdocconf1
-rw-r--r--src/gui/kernel/qwindow.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index e34347b801..027d2663de 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -33,6 +33,7 @@ depends += \
qtmultimedia \
qtnetwork \
qtopengl \
+ qtplatformheaders \
qtsvg \
qtqml \
qtquick \
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 44fa88e7cf..c5c4f901e0 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1002,7 +1002,7 @@ QRegion QWindow::mask() const
/*!
Requests the window to be activated, i.e. receive keyboard focus.
- \sa isActive(), QGuiApplication::focusWindow()
+ \sa isActive(), QGuiApplication::focusWindow(), QWindowsWindowFunctions::setWindowActivationBehavior()
*/
void QWindow::requestActivate()
{