Skip to content

Commit

Permalink
Add workaround for closing window
Browse files Browse the repository at this point in the history
  • Loading branch information
trin94 committed Nov 10, 2024
1 parent 9810842 commit 30b863a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qml/app/MpvqcQuitHandler.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Item {
required property bool canClose

readonly property var mpvqcMpvPlayerPyObject: mpvqcApplication.mpvqcMpvPlayerPyObject
readonly property var mpvqcManager: mpvqcApplication.mpvqcManager

property bool userConfirmedClose: false

Expand Down Expand Up @@ -56,8 +57,14 @@ Item {

function _close() {
userConfirmedClose = true
mpvqcMpvPlayerPyObject.terminate()
_workaroundNativeWindowInterfering()
mpvqcApplication.close()
}

function _workaroundNativeWindowInterfering() {
if (Qt.platform.os === "windows" && mpvqcManager.saved) {
mpvqcMpvPlayerPyObject.terminate()
}
}

}

0 comments on commit 30b863a

Please sign in to comment.