Skip to content

Commit cd2b05f

Browse files
committed
Fix #48: Restore tool window type for floating panels on macOS
1 parent deb444d commit cd2b05f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/plugins/coreplugin/internal/workspace/WorkspaceSession.cpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,16 @@ namespace Core::Internal {
356356
qFatal() << component.errorString();
357357
}
358358
auto object = component.createWithInitialProperties({{"host", QVariant::fromValue(host)}});
359+
if (!object) {
360+
qFatal() << component.errorString();
361+
}
359362
auto window = qobject_cast<QQuickWindow *>(object);
360363
if (!window) {
361-
qFatal() << "DockingWindow could not be created as a QQuickWindow." << component.errorString();
364+
qFatal("DockingWindow in SVSCraft.UIComponents is not QQuickWindow");
362365
}
366+
#ifdef Q_OS_MACOS
367+
window->setFlags((window->flags() & ~Qt::WindowType_Mask) | Qt::Tool);
368+
#endif
363369
window->QObject::setParent(this);
364370
QQmlEngine::setObjectOwnership(window, QQmlEngine::CppOwnership);
365371
window->setProperty("interactionEnabled", !m_busy);

0 commit comments

Comments
 (0)