mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
fix ticks not firing
This commit is contained in:
parent
c3eba7ea3c
commit
9926c0f69e
2 changed files with 6 additions and 6 deletions
|
@ -29,14 +29,14 @@ void CHyprpaper::init() {
|
|||
if (m_bIPCEnabled) {
|
||||
std::thread([&]() { // we dispatch wl events cuz we have to
|
||||
while (wl_display_dispatch(m_sDisplay) != -1) {
|
||||
tick();
|
||||
tick(true);
|
||||
}
|
||||
|
||||
m_bShouldExit = true;
|
||||
}).detach();
|
||||
|
||||
while (1) { // we also tick every 1ms for socket and other shit's updates
|
||||
tick();
|
||||
tick(false);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
|
||||
|
@ -45,17 +45,17 @@ void CHyprpaper::init() {
|
|||
}
|
||||
} else {
|
||||
while (wl_display_dispatch(m_sDisplay) != -1) {
|
||||
tick();
|
||||
tick(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CHyprpaper::tick() {
|
||||
void CHyprpaper::tick(bool force) {
|
||||
std::lock_guard<std::mutex> lg(m_mtTickMutex);
|
||||
|
||||
bool reload = g_pIPCSocket->mainThreadParseRequest();
|
||||
|
||||
if (!reload)
|
||||
if (!reload && !force)
|
||||
return;
|
||||
|
||||
preloadAllWallpapersFromConfig();
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
// init the utility
|
||||
CHyprpaper();
|
||||
void init();
|
||||
void tick();
|
||||
void tick(bool force);
|
||||
|
||||
std::unordered_map<std::string, CWallpaperTarget> m_mWallpaperTargets;
|
||||
std::unordered_map<std::string, std::string> m_mMonitorActiveWallpapers;
|
||||
|
|
Loading…
Reference in a new issue