summaryrefslogtreecommitdiffstats
path: root/vrplayer/mainwindow.cpp
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-01-13 20:13:27 -0800
committerJay Sorg <jay.sorg@gmail.com>2013-01-13 20:13:27 -0800
commit13327df86fe120cdc2e978dda8becef78730bbb6 (patch)
treec676621f885370f4f268d633dc5ab66be2408354 /vrplayer/mainwindow.cpp
parentb2c242f50eed96431e19c5905fc1c0269709da7c (diff)
downloadxrdp-proprietary-13327df86fe120cdc2e978dda8becef78730bbb6.tar.gz
xrdp-proprietary-13327df86fe120cdc2e978dda8becef78730bbb6.zip
vrplayer: change to get screen position
Diffstat (limited to 'vrplayer/mainwindow.cpp')
-rw-r--r--vrplayer/mainwindow.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/vrplayer/mainwindow.cpp b/vrplayer/mainwindow.cpp
index 9cafa016..2d9baa34 100644
--- a/vrplayer/mainwindow.cpp
+++ b/vrplayer/mainwindow.cpp
@@ -175,15 +175,21 @@ void MainWindow::openMediaFile()
void MainWindow::getVdoGeometry(QRect *rect)
{
- int x = geometry().x() + lblVideo->geometry().x();
-
- int y = pos().y() + lblVideo->geometry().y() +
- ui->mainToolBar->geometry().height() * 4 + 10;
-
+ int x;
+ int y;
+ int width;
+ int height;
+ QPoint pt;
+
+ pt = lblVideo->mapToGlobal(QPoint(0, 0));
+ x = pt.x();
+ y = pt.y();
+ width = lblVideo->width();
+ height = lblVideo->height();
rect->setX(x);
rect->setY(y);
- rect->setWidth(lblVideo->geometry().width());
- rect->setHeight(lblVideo->geometry().height());
+ rect->setWidth(width);
+ rect->setHeight(height);
}
void MainWindow::clearDisplay()