diff --git a/src/qml/presenter/MainWindow.qml b/src/qml/presenter/MainWindow.qml index 7d14dab..ae9de3c 100644 --- a/src/qml/presenter/MainWindow.qml +++ b/src/qml/presenter/MainWindow.qml @@ -97,10 +97,8 @@ Controls.Page { } } - Loader { - id: presentLoader - active: presenting - source: "PresentationWindow.qml" + Presenter.PresentationWindow { + id: pWindow } SongSqlModel { @@ -186,8 +184,11 @@ Controls.Page { function present(present) { if (present) - presentationWindow.showFullScreen(); + { + presentation.loadVideo(); + pWindow.showFullScreen(); + } else - presentationWindow.close(); + pWindow.close(); } } diff --git a/src/qml/presenter/PresentationWindow.qml b/src/qml/presenter/PresentationWindow.qml index e5e3b47..dbe0200 100644 --- a/src/qml/presenter/PresentationWindow.qml +++ b/src/qml/presenter/PresentationWindow.qml @@ -13,12 +13,19 @@ Window { height: maximumHeight width: maximumWidth screen: presentationScreen + opacity: 1.0 + transientParent: null /* flags: Qt.X11BypassWindowManagerHint */ - onClosing: close() + onClosing: { + presentationSlide.stopVideo(); + SlideObject.pause(); + presenting = false; + } Component.onCompleted: { - presentationWindow.showFullScreen(); + /* presentationWindow.showFullScreen(); */ print(screen.name); + showMinimized(); } Presenter.Slide { @@ -52,10 +59,4 @@ Window { function pauseVideo() { presentationSlide.pauseVideo(); } - - function close() { - presentationSlide.stopVideo(); - SlideObject.pause(); - presenting = false; - } } diff --git a/src/qml/presenter/Slide.qml b/src/qml/presenter/Slide.qml index 619c029..f7b8d13 100644 --- a/src/qml/presenter/Slide.qml +++ b/src/qml/presenter/Slide.qml @@ -171,6 +171,10 @@ Item { showPassiveNotification("Black is: " + black.visible); } + function quitMpv() { + mpv.quit(); + } + function pauseVideo() { mpv.pause(); }