Showing the changes to interface/src/scripting/DesktopScriptingInterface.cpp (1 of 8 files). Show all
Unified · Split
| @@ -14,6 +14,8 @@ · 13 unmodified lines | |||
| 14 | #include <QWindow> | 14 | #include <QWindow> |
| 15 | #include <QScreen> | 15 | #include <QScreen> |
| 16 | 16 | ||
| 17 | #include <shared/QtHelpers.h> | ||
| 18 | |||
| 17 | #include "Application.h" | 19 | #include "Application.h" |
| 18 | #include "MainWindow.h" | 20 | #include "MainWindow.h" |
| 19 | #include <display-plugins/CompositorHelper.h> | 21 | #include <display-plugins/CompositorHelper.h> |
| @@ -41,3 +43,14 @@ void DesktopScriptingInterface::show(const QString& path, const QString& title) · 21 unmodified lines | |||
| 41 | DependencyManager::get<OffscreenUi>()->show(path, title); | 43 | DependencyManager::get<OffscreenUi>()->show(path, title); |
| 42 | } | 44 | } |
| 43 | 45 | ||
| 46 | InteractiveWindowPointer DesktopScriptingInterface::createWindow(const QString& sourceUrl, const QVariantMap& properties) { | ||
| 47 | if (QThread::currentThread() != thread()) { | ||
| 48 | InteractiveWindowPointer interactiveWindow = nullptr; | ||
| 49 | BLOCKING_INVOKE_METHOD(this, "createWindow", | ||
| 50 | Q_RETURN_ARG(InteractiveWindowPointer, interactiveWindow), | ||
| 51 | Q_ARG(QString, sourceUrl), | ||
| 52 | Q_ARG(QVariantMap, properties)); | ||
| 53 | return interactiveWindow; | ||
| 54 | } | ||
| 55 | return new InteractiveWindow(sourceUrl, properties);; | ||
| 56 | } | ||