mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-27 14:25:43 -04:00
Qt: Fix possible race when showing confirm dialog
This commit is contained in:
parent
3e27c399f4
commit
a705884342
@ -367,7 +367,7 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main, bool
|
|||||||
{
|
{
|
||||||
// See lameland comment above.
|
// See lameland comment above.
|
||||||
if (use_main_window_pos && !s_use_central_widget)
|
if (use_main_window_pos && !s_use_central_widget)
|
||||||
container->move(pos());
|
container->setGeometry(geometry());
|
||||||
else
|
else
|
||||||
restoreDisplayWindowGeometryFromConfig();
|
restoreDisplayWindowGeometryFromConfig();
|
||||||
container->showNormal();
|
container->showNormal();
|
||||||
@ -2911,8 +2911,14 @@ MainWindow::SystemLock MainWindow::pauseAndLockSystem()
|
|||||||
if (was_fullscreen)
|
if (was_fullscreen)
|
||||||
{
|
{
|
||||||
g_emu_thread->setFullscreen(false, false);
|
g_emu_thread->setFullscreen(false, false);
|
||||||
while (s_system_valid && g_emu_thread->isFullscreen())
|
|
||||||
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 1);
|
// Container could change... thanks Wayland.
|
||||||
|
QWidget* container;
|
||||||
|
while (s_system_valid &&
|
||||||
|
(g_emu_thread->isFullscreen() || !(container = getDisplayContainer()) || container->isFullScreen()))
|
||||||
|
{
|
||||||
|
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!was_paused)
|
if (!was_paused)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user