Showing the changes to interface/src/scripting/DesktopScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -17,6 +17,8 @@ · 16 unmodified lines | ||
| 17 | 17 | #include "Application.h" |
| 18 | 18 | #include "MainWindow.h" |
| 19 | 19 | #include <display-plugins/CompositorHelper.h> |
| 20 | +#include <DependencyManager.h> | |
| 21 | +#include <OffscreenUi.h> | |
| 20 | 22 | |
| 21 | 23 | int DesktopScriptingInterface::getWidth() { |
| 22 | 24 | QSize size = qApp->getWindow()->windowHandle()->screen()->virtualSize(); |
| @@ -31,3 +33,11 @@ void DesktopScriptingInterface::setOverlayAlpha(float alpha) { · 8 unmodified lines | ||
| 31 | 33 | qApp->getApplicationCompositor().setAlpha(alpha); |
| 32 | 34 | } |
| 33 | 35 | |
| 36 | +void DesktopScriptingInterface::show(const QString& path, const QString& title) { | |
| 37 | + if (QThread::currentThread() != thread()) { | |
| 38 | + QMetaObject::invokeMethod(this, "show", Qt::QueuedConnection, Q_ARG(QString, path), Q_ARG(QString, title)); | |
| 39 | + return; | |
| 40 | + } | |
| 41 | + DependencyManager::get<OffscreenUi>()->show(path, title); | |
| 42 | +} | |
| 43 | + | |