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 | 47 | void WindowScriptingInterface::setFocus() { |
| 48 | + // It's forbidden to call focus() from another thread. | |
| 48 | 49 | Application::getInstance()->postLambdaEvent([] { |
| 49 | 50 | auto window = Application::getInstance()->getWindow(); |
| 50 | 51 | window->activateWindow(); |