Commit 8eb3127d authored by Ronan Abhamon's avatar Ronan Abhamon

fix(Incall): avoid dead lock in fullscreen mode when a call is ended

parent 06b7347d
...@@ -42,7 +42,8 @@ function handleStatusChanged (status) { ...@@ -42,7 +42,8 @@ function handleStatusChanged (status) {
if (status === Linphone.CallModel.CallStatusEnded) { if (status === Linphone.CallModel.CallStatusEnded) {
var fullscreen = incall._fullscreen var fullscreen = incall._fullscreen
if (fullscreen) { if (fullscreen) {
fullscreen.exit() // Timeout => Avoid dead lock on mac.
Utils.setTimeout(window, 0, fullscreen.exit)
} }
telKeypad.visible = false telKeypad.visible = false
...@@ -104,10 +105,9 @@ function showFullscreen () { ...@@ -104,10 +105,9 @@ function showFullscreen () {
return return
} }
incall._fullscreen = Utils.openWindow(Qt.resolvedUrl('IncallFullscreenWindow.qml'), incall, { incall._fullscreen = Utils.openWindow(Qt.resolvedUrl('IncallFullscreenWindow.qml'), window, {
properties: { properties: {
call: incall.call, caller: incall
callsWindow: incall
} }
}) })
} }
......
...@@ -17,8 +17,7 @@ Window { ...@@ -17,8 +17,7 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
property var call property var call
property var callsWindow property var caller
property bool hideButtons: false property bool hideButtons: false
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -38,10 +37,10 @@ Window { ...@@ -38,10 +37,10 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Component.onCompleted: { Component.onCompleted: {
incall.call = caller.call
var show = function (visibility) { var show = function (visibility) {
if (visibility === Window.Windowed) { if (visibility === Window.Windowed) {
incall.visibilityChanged.disconnect(show) incall.visibilityChanged.disconnect(show)
incall.visible = true
incall.showFullScreen() incall.showFullScreen()
} }
} }
...@@ -69,7 +68,12 @@ Window { ...@@ -69,7 +68,12 @@ Window {
Loader { Loader {
anchors.fill: parent anchors.fill: parent
active: !incall.callsWindow.cameraActivated
active: {
var caller = incall.caller
return caller && !caller.cameraActivated
}
sourceComponent: camera sourceComponent: camera
Component { Component {
...@@ -350,7 +354,11 @@ Window { ...@@ -350,7 +354,11 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
Loader { Loader {
active: !incall.callsWindow.cameraActivated active: {
var caller = incall.caller
return caller && !caller.cameraActivated
}
sourceComponent: cameraPreview sourceComponent: cameraPreview
Component { Component {
......
Markdown is supported
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