]> git.sur5r.net Git - minitube/commitdiff
Fixed fullscreen mode
authorFlavio Tordini <flavio.tordini@gmail.com>
Fri, 8 Jan 2010 21:57:16 +0000 (22:57 +0100)
committerFlavio Tordini <flavio.tordini@gmail.com>
Fri, 8 Jan 2010 21:57:16 +0000 (22:57 +0100)
src/videoareawidget.cpp

index a733fc1ced639f474ad3bab903eca3ecebfb8e26..b1781ac2be18be8ebc568aaffc9b1438e2d138a2 100644 (file)
@@ -97,7 +97,7 @@ void VideoAreaWidget::dropEvent(QDropEvent *event) {
 void VideoAreaWidget::mouseMoveEvent(QMouseEvent *event) {
     // qDebug() << "VideoAreaWidget::mouseMoveEvent" << event->pos();
 
-    QMainWindow* mainWindow = dynamic_cast<QMainWindow*>(qApp->topLevelWidgets().first());
+    QWidget* mainWindow = window();
     bool visible = event->pos().y() <= 0;
     bool ret = QMetaObject::invokeMethod(mainWindow, "showFullscreenToolbar", Qt::DirectConnection, Q_ARG(bool, visible));
     if (!ret) qDebug() << "showFullscreenToolbar invokeMethod failed";