diff --git a/README.md b/README.md index 2e8eb56..1d56860 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ## What this is -It might not be that worthy to write a QtWidget application for such a small feature, but I kind of enjoy the pain... So here it is. +It might not be that worthy to build a Qt application from ground for such a small feature, but I kind of enjoy the pain... So here it is. - + ## How to build @@ -41,19 +41,17 @@ It might not be that worthy to write a QtWidget application for such a small fea build/wallreel ``` - Install to previously specified prefix: + Install it to the previously specified prefix. This step may require root permissions if the install prefix is set to a system directory like `/usr/local`. ```bash cmake --install build ``` - This step may require root permissions if the install prefix is set to a system directory like `/usr/local`. - ## How to use The config file should be placed in `~/.config/wallreel/config.json`. Refer to [Configuration Reference](#configuration-reference) and [config.schema.json](config.schema.json) for more details on the format and available options. -A minimum config file should at least contain the path(s) to wallpapers, e.g. +A minimum config file should at least contain the path(s) to wallpapers. The application is able to run without any wallpapers found, but it won't be very functional obviously. ```json { diff --git a/WallReel/Core/Service/manager.hpp b/WallReel/Core/Service/manager.hpp index 92ea1af..7ce1b7b 100644 --- a/WallReel/Core/Service/manager.hpp +++ b/WallReel/Core/Service/manager.hpp @@ -95,7 +95,8 @@ class Manager : public QObject { m_wallpaperService->stopAll(); QEventLoop loop; connect(m_wallpaperService, &WallpaperService::restoreCompleted, &loop, &QEventLoop::quit); - m_wallpaperService->restore(); + // Call restore after the event loop starts + QTimer::singleShot(0, m_wallpaperService, &WallpaperService::restore); loop.exec(); }