Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -74,9 +74,7 @@ QScriptValue WindowScriptingInterface::hasFocus() { · 73 unmodified lines | |||
| 74 | void WindowScriptingInterface::setFocus() { | 74 | void WindowScriptingInterface::setFocus() { |
| 75 | // It's forbidden to call focus() from another thread. | 75 | // It's forbidden to call focus() from another thread. |
| 76 | qApp->postLambdaEvent([] { | 76 | qApp->postLambdaEvent([] { |
| 77 | auto window = qApp->getWindow(); | 77 | qApp->setFocus(); |
| 78 | window->activateWindow(); | ||
| 79 | window->setFocus(); | ||
| 80 | }); | 78 | }); |
| 81 | } | 79 | } |
| 82 | 80 | ||