Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 30 files). Show all
Unified · Split
| @@ -45,6 +45,7 @@ QScriptValue WindowScriptingInterface::hasFocus() { · 44 unmodified lines | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void WindowScriptingInterface::setFocus() { | 47 | void WindowScriptingInterface::setFocus() { |
| 48 | // It's forbidden to call focus() from another thread. | ||
| 48 | Application::getInstance()->postLambdaEvent([] { | 49 | Application::getInstance()->postLambdaEvent([] { |
| 49 | auto window = Application::getInstance()->getWindow(); | 50 | auto window = Application::getInstance()->getWindow(); |
| 50 | window->activateWindow(); | 51 | window->activateWindow(); |