Commit f6303e67 authored by Thomas Hartmann's avatar Thomas Hartmann

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: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent ccf0abf7
...@@ -50,6 +50,9 @@ int main(int argc, char *argv[]) ...@@ -50,6 +50,9 @@ int main(int argc, char *argv[])
// Since we always render text into an FBO, we need to globally disable // Since we always render text into an FBO, we need to globally disable
// subpixel antialiasing and instead use gray. // subpixel antialiasing and instead use gray.
qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "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); QApplication application(argc, argv);
......
...@@ -51,6 +51,10 @@ int main(int argc, char *argv[]) ...@@ -51,6 +51,10 @@ int main(int argc, char *argv[])
QtSimulatorPrivate::SimulatorConnection::createStubInstance(); QtSimulatorPrivate::SimulatorConnection::createStubInstance();
#endif #endif
#ifdef Q_OS_MAC //This keeps qml2puppet from stealing focus
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
#endif
QApplication application(argc, argv); QApplication application(argc, argv);
QCoreApplication::setOrganizationName("QtProject"); QCoreApplication::setOrganizationName("QtProject");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment