mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 01:56:31 +03:00
Running window calls in the main thread seems to fix dead-lock issues.
This commit is contained in:
@@ -3709,15 +3709,13 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe
|
||||
mUISceneNode->runOnMainThread( [path, initialPosition, this] {
|
||||
loadFileFromPathOrFocus( path, true, nullptr,
|
||||
getForcePositionFn( initialPosition ) );
|
||||
} );
|
||||
if ( !mWindow->hasFocus() ) {
|
||||
if ( mWindow->isMinimized() ) {
|
||||
// FIXME: SDL2 seems to very rarely dead-lock on SDL_RestoreWindow call.
|
||||
// This can create a dead-lock for the file system listener.
|
||||
mThreadPool->run( [this] { mWindow->restore(); } );
|
||||
|
||||
if ( !mWindow->hasFocus() ) {
|
||||
if ( mWindow->isMinimized() )
|
||||
mWindow->restore();
|
||||
mWindow->raise();
|
||||
}
|
||||
mWindow->raise();
|
||||
}
|
||||
} );
|
||||
}
|
||||
FileSystem::fileRemove( fi.getFilepath() );
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user