Cocoa: Bring back qt_mac_set_raise_process

In the form of an environment variable: QT_MAC_SET_RAISE_PROCESS.
The default value is "on".

Task-number: QTBUG-41569
Change-Id: Icf2e8818a6b126c7393ee022a1cab493fbc3a18e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
bb10
Morten Johan Sørvig 2014-10-22 00:26:22 +02:00
parent a38ecb4c67
commit f08e6511bb
1 changed files with 6 additions and 3 deletions

View File

@ -1009,9 +1009,12 @@ void QCocoaWindow::raise()
[parentNSWindow addChildWindow:m_nsWindow ordered:NSWindowAbove];
} else {
[m_nsWindow orderFront: m_nsWindow];
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
SetFrontProcessWithOptions(&psn, kSetFrontProcessFrontWindowOnly);
static bool raiseProcess = qt_mac_resolveOption(true, "QT_MAC_SET_RAISE_PROCESS");
if (raiseProcess) {
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
SetFrontProcessWithOptions(&psn, kSetFrontProcessFrontWindowOnly);
}
}
}
}