Paste P255

Masterwork From Distant Lands
ActivePublic

Authored by davidedmundson on Aug 23 2018, 3:41 PM.
diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp
index 4522ac81a..b1c6a98c2 100644
--- a/scripting/scripting.cpp
+++ b/scripting/scripting.cpp
@@ -628,11 +628,11 @@ QVariant KWin::JSEngineGlobalMethodsWrapper::readConfig(const QString &key, QVar
void KWin::JSEngineGlobalMethodsWrapper::registerWindow(QQuickWindow *window)
{
- connect(window, &QWindow::visibilityChanged, [window](QWindow::Visibility visibility) {
+ connect(window, &QWindow::visibilityChanged, this, [window](QWindow::Visibility visibility) {
if (visibility == QWindow::Hidden) {
window->destroy();
}
- });
+ }, Qt::QueuedConnection);
}
bool KWin::JSEngineGlobalMethodsWrapper::registerShortcut(const QString &name, const QString &text, const QKeySequence& keys, QJSValue function)
davidedmundson edited the content of this paste. (Show Details)Aug 23 2018, 3:41 PM
davidedmundson changed the title of this paste from untitled to Masterwork From Distant Lands.