Commit 96826053 authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2

screen sharing: fix offset not being sent for limited screen sharing

The QRect ,given by QRubberband, x and y coord aren't set

Change-Id: I4070ca37b4a5fb454b876d1365707ea92b582eea
Tuleap: #319
parent 9f6b5192
......@@ -71,7 +71,14 @@ SelectAreaDialog::mouseReleaseEvent(QMouseEvent* event)
releaseMouse();
if (auto call = CallModel::instance().selectedCall()) {
if (auto outVideo = call->firstMedia<Media::Video>(Media::Media::Direction::OUT)) {
outVideo->sourceModel()->setDisplay(0, rubberBand_->rect());
int x, y, width, height;
QRect realRect;
rubberBand_->geometry().getRect(&x, &y, &width, &height);
realRect.setX(x);
realRect.setY(y);
realRect.setWidth(width);
realRect.setHeight(height);
outVideo->sourceModel()->setDisplay(0, realRect);
}
}
delete rubberBand_;
......
......@@ -247,4 +247,3 @@ VideoView::slotVideoStarted(Video::Renderer* renderer) {
ui->videoWidget->show();
ui->videoWidget->setDistantRenderer(renderer);
}
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