Create Overlay Widgets with Qt::Tool flag on Linux

Michael Dagenais found this change makes the widgets to play nicer with
Windows Managers and avoids them to get on top of other programs windows.
Minimize and Restore is automatically handled now, so this commit partially
reverts b89019264e, removing MainWindow
state changes tracking, but keeping VideoWindow position tracking.
This commit is contained in:
Ale Martinez
2020-05-27 17:58:35 -03:00
parent f51a6a6cb1
commit f18b5470ec
5 changed files with 1 additions and 24 deletions

View File

@@ -140,7 +140,6 @@ VideoWindow::VideoWindow(Context *context) :
connect(context, SIGNAL(seek(long)), this, SLOT(seekPlayback(long)));
connect(context, SIGNAL(unpause()), this, SLOT(resumePlayback()));
connect(context, SIGNAL(mediaSelected(QString)), this, SLOT(mediaSelected(QString)));
connect(this->window(), SIGNAL(mainWindowStateChanged(bool, bool)), this, SLOT(mainWindowStateChanged(bool, bool)));
}
}
@@ -177,12 +176,6 @@ void VideoWindow::resizeEvent(QResizeEvent * )
prevPosition = mapToGlobal(pos());
}
void VideoWindow::mainWindowStateChanged(bool minimized, bool visible)
{
if(minimized) foreach(MeterWidget* p, m_metersWidget) p->hide();
else if(visible && isVisible()) foreach(MeterWidget* p, m_metersWidget) p->show();
}
void VideoWindow::startPlayback()
{
if (context->currentVideoSyncFile()) {