Commit Graph

15 Commits

Author SHA1 Message Date
Sungyoon Cho 3529fbc6d4
compositor: fix getMonitorFromVector getting wrong monitor (#6010) 2024-05-11 10:35:20 +01:00
Vaxry 1ed1ce9506
internal: new shared_ptr and weak_ptr implementation (#5883)
moves std::shared_ptrs to a new implementation

Advantages:
- you can dereference a weak_ptr directly. This will obviously segfault on a nullptr deref if it's expired.
   - this is useful to avoid the .lock() hell where we are 100% sure the pointer _should_ be valid. (and if it isn't, it should throw.)
- weak_ptrs are still valid while the SP is being destroyed.
   - reasoning: while an object (e.g. CWindow) is being destroyed, its `weak_ptr self` should be accessible (the sp is still alive, and so is CWindow), but it's not because by stl it's already expired (to prevent resurrection)
   - this impl solves it differently. w_p is expired, but can still be dereferenced and used. Creating `s_p`s is not possible anymore, though.
   - this is useful in destructors and callbacks.
2024-05-05 17:16:00 +01:00
Vaxry bca7804bb6
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1

* format

* remove useless include

* fix pch

* format

* fix crash in dwindle

* fix vram leak

* prefer .expired() for bool checks
2024-04-27 12:43:12 +01:00
Vaxry ac0f3411c1 macros: fix no pch warning 2024-04-11 02:13:05 +01:00
Vaxry 063708df26 config: improve config value infrastructure 2024-03-03 18:41:38 +00:00
François Conzelmann 4a42344e97
style/ci: apply clang-format and verify it in ci (#4039)
* style: apply clang-format

* ci: add new clang-format job to CI
2023-12-06 22:54:56 +00:00
Vaxry 69e314207d internal: replace INT_MAX with WORKSPACE_INVALID 2023-11-12 13:34:54 +00:00
Vaxry 914851b91a
internal: better versioning (#3543)
* better versioning

* meson: better versioning

* nix: better versioning

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-10-10 20:21:57 +01:00
memchr 3785defaf1
logging: implement std::formatter for some types (#3380) 2023-09-20 16:25:03 +01:00
memchr 6594b50e57
logging/format: use std::format_string to catch formatting string errors at compile time (#3377)
* fix(log): use constexpr format string

* deprecate getFormat
2023-09-20 08:26:20 +01:00
Vaxry 2e34548aea varlist: move to a separate header, add join 2023-09-12 16:50:10 +01:00
Vaxry 61a71c65ac
internal: Formatter rework (#3186) 2023-09-06 12:51:36 +02:00
memchr 1a13d44d5d
refactor: raise SIGABRT instead of write to null address (#3124) 2023-08-31 22:52:02 +02:00
Vaxry deeeb33c5f macros: fix missing include 2023-08-07 18:48:08 +02:00
Vaxry 261c3307f7 internal: cleanup headers in helpers/ 2023-08-07 13:36:14 +02:00