Skip to content
Snippets Groups Projects
Commit 1dbd909f authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Sébastien Blin
Browse files

selectscreen: open in same screen as app

This fixes the screen used by selectscreencreation to set the window position.

Change-Id: I805027ee84cd439e9801496025e0cae070153a32
GitLab: #656
parent 05d929cd
Branches
No related tags found
No related merge requests found
...@@ -160,7 +160,7 @@ Item { ...@@ -160,7 +160,7 @@ Item {
if (Qt.application.screens.length === 1) { if (Qt.application.screens.length === 1) {
AvAdapter.shareEntireScreen(0) AvAdapter.shareEntireScreen(0)
} else { } else {
SelectScreenWindowCreation.createSelectScreenWindowObject() SelectScreenWindowCreation.createSelectScreenWindowObject(JamiQmlUtils.mainApplicationScreen)
SelectScreenWindowCreation.showSelectScreenWindow(callPreviewId, false) SelectScreenWindowCreation.showSelectScreenWindow(callPreviewId, false)
} }
} }
...@@ -169,7 +169,7 @@ Item { ...@@ -169,7 +169,7 @@ Item {
AvAdapter.muteCamera = !sharingActive && root.isVideoMuted AvAdapter.muteCamera = !sharingActive && root.isVideoMuted
AvAdapter.getListWindows() AvAdapter.getListWindows()
if (AvAdapter.windowsNames.length >= 1) { if (AvAdapter.windowsNames.length >= 1) {
SelectScreenWindowCreation.createSelectScreenWindowObject() SelectScreenWindowCreation.createSelectScreenWindowObject(JamiQmlUtils.mainApplicationScreen)
SelectScreenWindowCreation.showSelectScreenWindow(callPreviewId, true) SelectScreenWindowCreation.showSelectScreenWindow(callPreviewId, true)
} }
} }
......
...@@ -78,8 +78,6 @@ Window { ...@@ -78,8 +78,6 @@ Window {
width: minWidth width: minWidth
height: minHeight height: minHeight
screen: JamiQmlUtils.mainApplicationScreen
Rectangle { Rectangle {
id: selectScreenWindowRect id: selectScreenWindowRect
......
...@@ -20,11 +20,12 @@ ...@@ -20,11 +20,12 @@
var selectScreenWindowComponent var selectScreenWindowComponent
var selectScreenWindowObject var selectScreenWindowObject
function createSelectScreenWindowObject() { function createSelectScreenWindowObject(providedScreen) {
if (selectScreenWindowObject) if (selectScreenWindowObject)
return return
selectScreenWindowComponent = Qt.createComponent( selectScreenWindowComponent = Qt.createComponent(
"../components/SelectScreen.qml") "../components/SelectScreen.qml")
selectScreenWindowComponent.screen = providedScreen
if (selectScreenWindowComponent.status === Component.Ready) if (selectScreenWindowComponent.status === Component.Ready)
finishCreation() finishCreation()
else if (selectScreenWindowComponent.status === Component.Error) else if (selectScreenWindowComponent.status === Component.Error)
...@@ -44,12 +45,11 @@ function finishCreation() { ...@@ -44,12 +45,11 @@ function finishCreation() {
} }
function showSelectScreenWindow(previewId, window) { function showSelectScreenWindow(previewId, window) {
console.log("previewId", previewId)
selectScreenWindowObject.currentPreview = previewId selectScreenWindowObject.currentPreview = previewId
selectScreenWindowObject.window = window selectScreenWindowObject.window = window
selectScreenWindowObject.show() selectScreenWindowObject.show()
var screen = selectScreenWindowObject.screen var screen = selectScreenWindowComponent.screen
selectScreenWindowObject.x = screen.virtualX + selectScreenWindowObject.x = screen.virtualX +
(screen.width - selectScreenWindowObject.width) / 2 (screen.width - selectScreenWindowObject.width) / 2
selectScreenWindowObject.y = screen.virtualY + selectScreenWindowObject.y = screen.virtualY +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment