Verified Commit d5bd0706 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

greeter: fix undefined wallpaper by initializing wallpaper plugin before lock screen

The wallpaper plugin needs to be initialized first, so the lock screen
can read `wallpaper` property without warnings.
parent 13cfec4f
Pipeline #194760 passed with stage
in 4 minutes and 9 seconds
......@@ -363,6 +363,15 @@ KQuickAddons::QuickViewSharedEngine *UnlockApp::createViewForScreen(QScreen *scr
context->setContextProperty(QStringLiteral("defaultToSwitchUser"), m_defaultToSwitchUser);
context->setContextProperty(QStringLiteral("config"), m_lnfIntegration->configuration());
loadWallpaperPlugin(view);
if (auto object = view->property("wallpaperGraphicsObject").value<KDeclarative::QmlObjectSharedEngine *>()) {
// initialize with our size to avoid as much resize events as possible
object->completeInitialization({
{QStringLiteral("width"), view->width()},
{QStringLiteral("height"), view->height()},
});
}
view->setSource(m_mainQmlPath);
// on error, load the fallback lockscreen to not lock the user out of the system
if (view->status() != QQmlComponent::Ready) {
......@@ -399,15 +408,6 @@ KQuickAddons::QuickViewSharedEngine *UnlockApp::createViewForScreen(QScreen *scr
// verify that the engine's controller didn't change
Q_ASSERT(dynamic_cast<NoAccessNetworkAccessManagerFactory *>(view->engine()->networkAccessManagerFactory()));
loadWallpaperPlugin(view);
if (auto object = view->property("wallpaperGraphicsObject").value<KDeclarative::QmlObjectSharedEngine *>()) {
// initialize with our size to avoid as much resize events as possible
object->completeInitialization({
{QStringLiteral("width"), view->width()},
{QStringLiteral("height"), view->height()},
});
}
if (KWindowSystem::isPlatformWayland()) {
if (auto layerShellWindow = LayerShellQt::Window::get(view)) {
layerShellWindow->setExclusiveZone(-1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment