QmlDesigner.QmlPupppet: Keeping the puppet from stealing focus on Mac

Defining QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM keeps the puppet
from stealing the focus of Qt Creator on Mac OS X and Qt 5.

Task-number: QTCREATORBUG-9418
Change-Id: Id0193b95d4c788ebe243773458645d1c584b2044
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
Thomas Hartmann
2013-07-04 12:55:24 +02:00
parent ccf0abf781
commit f6303e6784
2 changed files with 7 additions and 0 deletions
@@ -50,6 +50,9 @@ int main(int argc, char *argv[])
// Since we always render text into an FBO, we need to globally disable
// subpixel antialiasing and instead use gray.
qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "gray");
#ifdef Q_OS_MAC //This keeps qml2puppet from stealing focus
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
#endif
QApplication application(argc, argv);
@@ -51,6 +51,10 @@ int main(int argc, char *argv[])
QtSimulatorPrivate::SimulatorConnection::createStubInstance();
#endif
#ifdef Q_OS_MAC //This keeps qml2puppet from stealing focus
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
#endif
QApplication application(argc, argv);
QCoreApplication::setOrganizationName("QtProject");