mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 03:53:23 +02:00
selectscreen: open in same screen as app
This fixes the screen used by selectscreencreation to set the window position. Change-Id: I805027ee84cd439e9801496025e0cae070153a32 GitLab: #656
This commit is contained in:
parent
05d929cd8a
commit
1dbd909f40
3 changed files with 5 additions and 7 deletions
|
@ -160,7 +160,7 @@ Item {
|
|||
if (Qt.application.screens.length === 1) {
|
||||
AvAdapter.shareEntireScreen(0)
|
||||
} else {
|
||||
SelectScreenWindowCreation.createSelectScreenWindowObject()
|
||||
SelectScreenWindowCreation.createSelectScreenWindowObject(JamiQmlUtils.mainApplicationScreen)
|
||||
SelectScreenWindowCreation.showSelectScreenWindow(callPreviewId, false)
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ Item {
|
|||
AvAdapter.muteCamera = !sharingActive && root.isVideoMuted
|
||||
AvAdapter.getListWindows()
|
||||
if (AvAdapter.windowsNames.length >= 1) {
|
||||
SelectScreenWindowCreation.createSelectScreenWindowObject()
|
||||
SelectScreenWindowCreation.createSelectScreenWindowObject(JamiQmlUtils.mainApplicationScreen)
|
||||
SelectScreenWindowCreation.showSelectScreenWindow(callPreviewId, true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,8 +78,6 @@ Window {
|
|||
width: minWidth
|
||||
height: minHeight
|
||||
|
||||
screen: JamiQmlUtils.mainApplicationScreen
|
||||
|
||||
Rectangle {
|
||||
id: selectScreenWindowRect
|
||||
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
var selectScreenWindowComponent
|
||||
var selectScreenWindowObject
|
||||
|
||||
function createSelectScreenWindowObject() {
|
||||
function createSelectScreenWindowObject(providedScreen) {
|
||||
if (selectScreenWindowObject)
|
||||
return
|
||||
selectScreenWindowComponent = Qt.createComponent(
|
||||
"../components/SelectScreen.qml")
|
||||
selectScreenWindowComponent.screen = providedScreen
|
||||
if (selectScreenWindowComponent.status === Component.Ready)
|
||||
finishCreation()
|
||||
else if (selectScreenWindowComponent.status === Component.Error)
|
||||
|
@ -44,12 +45,11 @@ function finishCreation() {
|
|||
}
|
||||
|
||||
function showSelectScreenWindow(previewId, window) {
|
||||
console.log("previewId", previewId)
|
||||
selectScreenWindowObject.currentPreview = previewId
|
||||
selectScreenWindowObject.window = window
|
||||
selectScreenWindowObject.show()
|
||||
|
||||
var screen = selectScreenWindowObject.screen
|
||||
var screen = selectScreenWindowComponent.screen
|
||||
selectScreenWindowObject.x = screen.virtualX +
|
||||
(screen.width - selectScreenWindowObject.width) / 2
|
||||
selectScreenWindowObject.y = screen.virtualY +
|
||||
|
|
Loading…
Add table
Reference in a new issue