* debug: fix data race in Debug::log()
The templated Debug::log() had mutex protection but the non-template
overload it calls didn't, causing crashes when plugins called log from
background threads (like hypr-dynamic-cursors loading cursor themes).
Fixed by moving the mutex lock from the template version into the
non-template version, so all writes to shared state are protected.
Fixes: hyprwm/Hyprland#11929Fixes: VirtCode/hypr-dynamic-cursors#99
* debug: apply clang-format to Log.cpp
Fix formatting to satisfy CI clang-format check.
---------
Co-authored-by: Dave Walker <dave@daviey.com>
* bezier: dont loop on float values
Using a floating-point loop variable with a fixed increment can cause precision
errors over time due to the nature of floating-point arithmetic.
and cause undesired effects.
ex
iteration 1 = 0.10000000149011611938
iteration 2 = 0.20000000298023223877
eventually..
iteration 8 = 0.80000001192092895508
iteration 9 = 0.89999997615814208984
* hyprctl: close sockets on destruction
store socketpath and close the fd and unlink the socket path on exit.
* eventloopmgr: close the timerfd
close the timerfd on exit.
* debug: make logging thread safe
instead of opening and closing the logfile on each write open it on init
and close it on compositor exit. also add a mutex so accidently using
logging from a thread like the watchdog or similiar doesnt cause issues.
* xwl: clean up fd logic
check if the fd is actually opened before closing, and close the
pipesource FD on exit.
Moves the directory containing sockets and logs.
Also restructures lockfiles a bit.
For consumers, check if `$XDG_RUNTIME_DIR/hypr` exists. If so, use it. If not, use the old `/tmp/hypr`.