diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-07-19 16:47:14 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-07-19 16:47:14 +0200 |
| commit | 8b383530122b972ca69cdac33427facf7b8aaadf (patch) | |
| tree | 177c7920cedd987f758fcc0d73b086a35aca7f8c /src/managers/eventLoop/EventLoopManager.hpp | |
| parent | 3b04131259bad140183a3825b981ebe30b61e524 (diff) | |
eventloop: improve timer handling to avoid crashes
ref #11062
Diffstat (limited to 'src/managers/eventLoop/EventLoopManager.hpp')
| -rw-r--r-- | src/managers/eventLoop/EventLoopManager.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/managers/eventLoop/EventLoopManager.hpp b/src/managers/eventLoop/EventLoopManager.hpp index 0835b242..d3a67ae5 100644 --- a/src/managers/eventLoop/EventLoopManager.hpp +++ b/src/managers/eventLoop/EventLoopManager.hpp @@ -27,8 +27,8 @@ class CEventLoopManager { void onTimerFire(); - // recalculates timers - void nudgeTimers(); + // schedules a recalc of the timers + void scheduleRecalc(); // schedules a function to run later, aka in a wayland idle event. void doLater(const std::function<void()>& fn); @@ -69,6 +69,7 @@ class CEventLoopManager { private: // Manages the event sources after AQ pollFDs change. void syncPollFDs(); + void nudgeTimers(); struct SEventSourceData { SP<Aquamarine::SPollFD> pollFD; @@ -84,6 +85,7 @@ class CEventLoopManager { struct { std::vector<SP<CEventLoopTimer>> timers; Hyprutils::OS::CFileDescriptor timerfd; + bool recalcScheduled = false; } m_timers; SIdleData m_idle; |
