diff --git a/src/compositor/qml/Compositor.qml b/src/compositor/qml/Compositor.qml
index 0e728abb..ad5e83d3 100644
--- a/src/compositor/qml/Compositor.qml
+++ b/src/compositor/qml/Compositor.qml
@@ -222,17 +222,13 @@ WaylandCompositor {
LS.LiriShellV1 {
id: shellHelper
- property bool isReady: false
-
onShortcutBound: {
shortcutComponent.incubateObject(keyBindings, { shortcut: shortcut });
}
onReady: {
- isReady = true;
- shellHelperTimer.running = false;
-
- for (var i = 0; i < outputs.length; i++)
- outputs[i].reveal();
+ console.log("ready",output);
+ output.ready = true;
+ shellHelper.showPanel(output);
}
onTerminateRequested: {
liriCompositor.quit();
@@ -243,17 +239,6 @@ WaylandCompositor {
id: liriModal
}
- Timer {
- id: shellHelperTimer
-
- interval: 15000
- running: true
- onTriggered: {
- for (var i = 0; i < outputs.length; i++)
- outputs[i].reveal();
- }
- }
-
LS.LiriOsdV1 {
id: liriOsd
}
@@ -266,7 +251,7 @@ WaylandCompositor {
context: Qt.ApplicationShortcut
sequence: shortcut ? shortcut.sequence : ""
- enabled: shellHelper.isReady
+ //enabled: shellHelper.isReady
onActivated: {
shortcut.activate();
}
diff --git a/src/compositor/qml/desktop/Output.qml b/src/compositor/qml/desktop/Output.qml
index 3bed2c0e..7a02915b 100644
--- a/src/compositor/qml/desktop/Output.qml
+++ b/src/compositor/qml/desktop/Output.qml
@@ -24,6 +24,8 @@ LS.WaylandOutput {
property alias showFps: outputWindow.showFps
property alias showInformation: outputWindow.showInformation
+ property bool ready: false
+
property var exportDmabufFrame: null
property bool __idle: false
@@ -43,10 +45,6 @@ LS.WaylandOutput {
* Methods
*/
- function reveal() {
- outputWindow.reveal();
- }
-
function wake() {
if (!__idle)
return;
diff --git a/src/compositor/qml/desktop/OutputWindow.qml b/src/compositor/qml/desktop/OutputWindow.qml
index e5b62aa8..3de51c2f 100644
--- a/src/compositor/qml/desktop/OutputWindow.qml
+++ b/src/compositor/qml/desktop/OutputWindow.qml
@@ -17,7 +17,6 @@ Window {
readonly property alias layerSurfacesModel: layerSurfacesModel
readonly property alias currentWorkspace: workspacesView.currentWorkspace
- readonly property alias splashVisible: splash.visible
property alias showFps: fpsIndicator.visible
property alias showInformation: outputInfo.visible
@@ -31,9 +30,7 @@ Window {
height: output.geometry.height
flags: Qt.Window | Qt.FramelessWindowHint
screen: output.screen ? Qt.application.screens[output.screen.screenIndex] : null
- color: splashVisible
- ? Material.color(Material.BlueGrey, Material.Shade800)
- : !splashVisible && shellHelper.isReady ? Material.color(Material.Grey, Material.Shade700) : "black"
+ color: output.ready ? Material.color(Material.Grey, Material.Shade700) : "black"
visible: output.screen && output.screen.enabled
// Keyboard handling
@@ -252,18 +249,13 @@ Window {
}
// Splash screen
- FluidControls.Wave {
- id: splash
-
+ Rectangle {
anchors.fill: parent
+ color: "black"
+ visible: !ready
- Rectangle {
- anchors.fill: parent
- color: Material.color(Material.BlueGrey, Material.Shade800)
- }
-
- Component.onCompleted: {
- openWave(0, 0);
+ HoverHandler {
+ cursorShape: Qt.BlankCursor
}
}
@@ -328,10 +320,6 @@ Window {
* Methods
*/
- function reveal() {
- splash.closeWave(splash.width - splash.size, splash.height - splash.size);
- }
-
function flash() {
flash.flash();
}
diff --git a/src/helper/helper.qrc b/src/helper/helper.qrc
index 72d69d1c..bd0cf712 100644
--- a/src/helper/helper.qrc
+++ b/src/helper/helper.qrc
@@ -29,5 +29,6 @@
qml/launcher/PagedGrid.qml
qml/panel/StatusMenu.qml
qml/notifications/NotificationItem.qml
+ qml/SplashWindow.qml
diff --git a/src/helper/qml/SplashWindow.qml b/src/helper/qml/SplashWindow.qml
new file mode 100644
index 00000000..6628af8a
--- /dev/null
+++ b/src/helper/qml/SplashWindow.qml
@@ -0,0 +1,59 @@
+// SPDX-FileCopyrightText: 2023 Pier Luigi Fiorini
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+import QtQuick 2.15
+import QtQuick.Window 2.15
+import Fluid.Controls 1.0 as FluidControls
+import Aurora.Client 1.0 as AuroraClient
+
+Window {
+ id: splashScreenWindow
+
+ property bool ready: false
+
+ color: "transparent"
+ visible: true
+
+ AuroraClient.WlrLayerSurfaceV1 {
+ layer: AuroraClient.WlrLayerSurfaceV1.OverlayLayer
+ anchors: AuroraClient.WlrLayerSurfaceV1.TopAnchor |
+ AuroraClient.WlrLayerSurfaceV1.BottomAnchor |
+ AuroraClient.WlrLayerSurfaceV1.LeftAnchor |
+ AuroraClient.WlrLayerSurfaceV1.RightAnchor
+ keyboardInteractivity: AuroraClient.WlrLayerSurfaceV1.NoKeyboardInteractivity
+ exclusiveZone: -1
+ role: "splash"
+ }
+
+ Timer {
+ interval: 250
+ running: workspaceReady
+ onTriggered: {
+ splash.closeWave(splash.width - splash.size, splash.height - splash.size);
+ splashScreenWindow.close();
+ }
+ }
+
+ // Disable mouse pointer
+ HoverHandler {
+ cursorShape: Qt.BlankCursor
+ }
+
+ FluidControls.Wave {
+ id: splash
+
+ anchors.fill: parent
+ size: 32
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"
+ }
+
+ Component.onCompleted: {
+ openWave(0, 0);
+ ready = true;
+ }
+ }
+}
diff --git a/src/helper/qml/TopLayerWindow.qml b/src/helper/qml/TopLayerWindow.qml
index 7801e927..1af25fee 100644
--- a/src/helper/qml/TopLayerWindow.qml
+++ b/src/helper/qml/TopLayerWindow.qml
@@ -21,14 +21,7 @@ Window {
signal shutdownRequested()
color: "transparent"
- visible: false
-
- onVisibleChanged: {
- if (visible)
- panel.show();
- else
- panel.hide();
- }
+ visible: true
AuroraClient.WlrLayerSurfaceV1 {
layer: AuroraClient.WlrLayerSurfaceV1.TopLayer
@@ -153,10 +146,15 @@ Window {
Panel.Panel {
id: panel
+ x: 0
+ y: topLayerWindow.height
+ width: topLayerWindow.width
+
+ /*
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
- anchors.bottomMargin: -height
+ anchors.bottomMargin: workspaceReady ? 0 : -height
Behavior on anchors.bottomMargin {
NumberAnimation {
@@ -164,13 +162,24 @@ Window {
duration: FluidControls.Units.longDuration
}
}
+ */
+ }
- function show() {
- anchors.bottomMargin = 0;
- }
+ YAnimator {
+ id: panelShowAnimation
+
+ target: panel
+ from: topLayerWindow.height
+ to: topLayerWindow.height - panel.height
+ easing.type: Easing.InOutCubic
+ duration: FluidControls.Units.longDuration
+ }
+
+ Connections {
+ target: shell
- function hide() {
- anchors.bottomMargin = -height;
+ function onShowPanelRequested() {
+ panelShowAnimation.start();
}
}
diff --git a/src/helper/qml/main.qml b/src/helper/qml/main.qml
index d9fd5a37..12fb7b5c 100644
--- a/src/helper/qml/main.qml
+++ b/src/helper/qml/main.qml
@@ -3,9 +3,11 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQml 2.1
+import QtQml.Models 2.15
import QtQuick 2.15
import QtQuick.Window 2.15
import QtGSettings 1.0 as Settings
+import Fluid.Core 1.0 as FluidCore
import Aurora.Client 1.0 as AuroraClient
import Liri.Session 1.0 as Session
import Liri.PolicyKit 1.0 as Polkit
@@ -17,16 +19,6 @@ Item {
primaryScreen = determinePrimaryScreen();
}
- Timer {
- id: readyTimer
-
- interval: 250
- onTriggered: {
- shell.sendReady();
- topLayerWindow.show();
- }
- }
-
/*
* Primary screen
*/
@@ -58,26 +50,48 @@ Item {
AuroraClient.LiriShellV1 {
id: shell
+ }
+
+ /*
+ Instantiator {
+ model: Qt.application.screens
+ active: !workspaceReady
- onActiveChanged: {
- if (active)
- readyTimer.start();
+ SplashWindow {
+ screen: modelData
}
}
+ */
- TopLayerWindow {
- id: topLayerWindow
-
- screen: primaryScreen
+ Instantiator {
+ model: Qt.application.screens
+ active: shell.active
- onLogoutRequested: {
- logoutDialog.show();
+ BackgroundWindow {
+ screen: modelData
}
- onLockRequested: {
- Session.SessionManager.lock();
+ }
+
+ Instantiator {
+ model: Qt.application.screens
+ active: shell.active
+
+ onObjectAdded: {
+ shell.sendReady(object);
}
- onShutdownRequested: {
- powerOffDialog.show();
+
+ TopLayerWindow {
+ screen: modelData
+
+ onLogoutRequested: {
+ logoutDialog.show();
+ }
+ onLockRequested: {
+ Session.SessionManager.lock();
+ }
+ onShutdownRequested: {
+ powerOffDialog.show();
+ }
}
}
@@ -109,14 +123,6 @@ Item {
}
}
- Instantiator {
- model: Qt.application.screens
-
- BackgroundWindow {
- screen: modelData
- }
- }
-
/*
* PolicyKit
*/
diff --git a/src/imports/compositor/CMakeLists.txt b/src/imports/compositor/CMakeLists.txt
index 1bade9c0..19b70486 100644
--- a/src/imports/compositor/CMakeLists.txt
+++ b/src/imports/compositor/CMakeLists.txt
@@ -48,6 +48,7 @@ liri_add_qml_plugin(LiriShellCompositorQmlPlugin
Qt::GuiPrivate
Liri::AuroraPlatformHeaders
Liri::AuroraCompositor
+ Liri::AuroraCompositorPrivate
Liri::Xdg
)
diff --git a/src/imports/compositor/desktoplayout.cpp b/src/imports/compositor/desktoplayout.cpp
index 10ff2850..ac67c7b7 100644
--- a/src/imports/compositor/desktoplayout.cpp
+++ b/src/imports/compositor/desktoplayout.cpp
@@ -15,6 +15,7 @@ DesktopLayout::DesktopLayout(QQuickItem *parent)
DesktopLayout::SurfaceRole DesktopLayout::getSurfaceRole(QQuickItem *item) const
{
static const QHash namespaceToRole {
+ { QStringLiteral("splash"), DesktopLayout::SplashRole },
{ QStringLiteral("osd"), DesktopLayout::OsdRole },
{ QStringLiteral("run-dialog"), DesktopLayout::RunDialogRole },
{ QStringLiteral("auth-dialog"), DesktopLayout::AuthDialogRole },
diff --git a/src/imports/compositor/desktoplayout.h b/src/imports/compositor/desktoplayout.h
index 6b5b5105..e054ab87 100644
--- a/src/imports/compositor/desktoplayout.h
+++ b/src/imports/compositor/desktoplayout.h
@@ -21,6 +21,7 @@ class DesktopLayout : public WaylandSurfaceLayout
LogoutDialogRole,
PowerOffDialogRole,
WindowSwitcherRole,
+ SplashRole,
};
Q_ENUM(SurfaceRole)
@@ -33,7 +34,7 @@ class DesktopLayout : public WaylandSurfaceLayout
DialogLayer,
FullscreenLayer,
LockScreenLayer,
- OverlayLayer
+ OverlayLayer,
};
Q_ENUM(Layer);
diff --git a/src/imports/compositor/helperlauncher.cpp b/src/imports/compositor/helperlauncher.cpp
index 77480f6d..6c3a91da 100644
--- a/src/imports/compositor/helperlauncher.cpp
+++ b/src/imports/compositor/helperlauncher.cpp
@@ -119,6 +119,9 @@ bool HelperLauncher::startProcess()
case SessionLocker:
cmd = QString::fromLocal8Bit(LIBEXECDIR "/liri-shell-lockscreen");
break;
+ case Greeter:
+ cmd = QString::fromLocal8Bit(LIBEXECDIR "/liri-shell-greeter");
+ break;
}
auto args = QProcess::splitCommand(cmd);
diff --git a/src/imports/compositor/helperlauncher.h b/src/imports/compositor/helperlauncher.h
index e46a3ab3..db60bbda 100644
--- a/src/imports/compositor/helperlauncher.h
+++ b/src/imports/compositor/helperlauncher.h
@@ -22,7 +22,8 @@ class HelperLauncher : public QObject, public QQmlParserStatus
public:
enum Helper {
Shell,
- SessionLocker
+ SessionLocker,
+ Greeter
};
Q_ENUM(Helper)
diff --git a/src/imports/compositor/protocols/liri-shell-unstable-v1.xml b/src/imports/compositor/protocols/liri-shell-unstable-v1.xml
index ca8c69de..edb9cf93 100644
--- a/src/imports/compositor/protocols/liri-shell-unstable-v1.xml
+++ b/src/imports/compositor/protocols/liri-shell-unstable-v1.xml
@@ -28,10 +28,19 @@
Tell the compositor that the shell has created all
the layer surfaces and it can hide the splash screen
- revealing the desktop.
+ revealing the desktop on the specified output.
+
+
+
+ The compositor will emit this event when it wants to show
+ the panel on the specified output.
+
+
+
+
Ask the compositor to quit.
diff --git a/src/imports/compositor/waylandlirishellv1.cpp b/src/imports/compositor/waylandlirishellv1.cpp
index 0abdb2ee..d7ebec77 100644
--- a/src/imports/compositor/waylandlirishellv1.cpp
+++ b/src/imports/compositor/waylandlirishellv1.cpp
@@ -8,6 +8,7 @@
#include
#include
#include
+#include
#include "waylandlirishellv1_p.h"
@@ -20,8 +21,8 @@ Q_LOGGING_CATEGORY(gLcLiriShellV1, "liri.shell.lirishellv1")
*/
WaylandLiriShellV1Private::WaylandLiriShellV1Private(WaylandLiriShellV1 *qq)
- : PrivateServer::zliri_shell_v1()
- , q_ptr(qq)
+ : WaylandCompositorExtensionPrivate(qq)
+ , PrivateServer::zliri_shell_v1()
{
}
@@ -76,12 +77,16 @@ void WaylandLiriShellV1Private::zliri_shell_v1_bind_shortcut(Resource *resource,
Q_EMIT q->shortcutBound(shortcut);
}
-void WaylandLiriShellV1Private::zliri_shell_v1_ready(Resource *resource)
+void WaylandLiriShellV1Private::zliri_shell_v1_ready(Resource *resource, struct ::wl_resource *outputResource)
{
Q_UNUSED(resource)
Q_Q(WaylandLiriShellV1);
- emit q->ready();
+
+ auto *output = WaylandOutput::fromResource(outputResource);
+ Q_ASSERT(output);
+ qWarning()<<"@@@@@@@@@@@@@@@@"<