* Allow submaps to auto reset to parent.
* Really should be a stack instead.
If hyprlang would allow for { } i would be so happy.
* Fixed: Somewhat better way to do it..
Lets you define what submap you want to go to instead.
* squash! Fixed: Somewhat better way to do it..
* God i hate cf..
* Force clang-format on the whole thing..
* Removed {}.
* Added tests
Tests and reset fix.
Prevent `exec`/`exec-once` processes which terminate very early
(before Hyprland declares that it does not want to reap zombies)
from getting stuck as zombie processes.
buffer can be recomitted, when moving texture creation from constructor
to committime it means same buffer recommit can cause a new texture
unless we store it per buffer and return the pointer for it.
* buffer: move texture creation to commit time
move creating texture away from buffer attach into commitstate in an
attempt to postpone gpu work until its really needed. best case scenario
gpu clocks have ramped up before because we are actively doing things
causing surface states and a commit to happend meaning less visible lag.
* buffer: simplify texture creation
make createTexture return a shared ptr directly, remove not needed
member variables as m_success and m_texture.
* managers: include string header
Fixes error `implicit instantiation of undefined template 'std::basic_string<char>'` on llvm/musl
* helpers: include unistd header
Fixes error `use of undeclared identifier 'pipe'` on llvm/musl
* compositor: make pending states store frame callbacks
move frame callbacks to pending states so they are only committed in the
order they came depending on the buffer wait for readyness.
* buffer: damage is relative to current commit
ensure the damage is only used once, or we are constantly redrawing
things on state commits that isnt a buffer.
thanks PlasmaPower.
* compositor: move callbacks back to compositor
move SSurfaceStateFrameCB back to compositor in the class
CWLCallbackResource as per request, but still keep the state as owning.
* compositor: ensure commits come in order
if a buffer is waiting any commits after it might be non buffer commits
from the "future" and applying directly. and when the old buffer that
was waiting becomes ready it applies its states and overwrites the
future changes.
move things to scheduleState and add a m_pendingWaiting guard. and
schedule the next pending state from the old buffer commit when done.
and as such it loops itself and keeps thing orderly.
instead of planting a longjmp at the fn head, make a shortjmp to a launch trampo
this helps with shortjmps that can be in the fn and will break when relocated. They are very unlikely to occur within the first 5 bytes (jmp rel32) but can happen in the first 10 or so (longjmp)
fixes csgo-vk-fix on latest main with release building on gcc / clang
* compositor: make pending states store frame callbacks
move frame callbacks to pending states so they are only committed in the
order they came depending on the buffer wait for readyness.
* buffer: damage is relative to current commit
ensure the damage is only used once, or we are constantly redrawing
things on state commits that isnt a buffer.
thanks PlasmaPower.
* compositor: move callbacks back to compositor
move SSurfaceStateFrameCB back to compositor in the class
CWLCallbackResource as per request, but still keep the state as owning.
* compositor: ensure commits come in order
if a buffer is waiting any commits after it might be non buffer commits
from the "future" and applying directly. and when the old buffer that
was waiting becomes ready it applies its states and overwrites the
future changes.
move things to scheduleState and add a m_pendingWaiting guard. and
schedule the next pending state from the old buffer commit when done.
and as such it loops itself and keeps thing orderly.
* 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>
damageEntire() in CHyprdDropShadow is pretty much called per window per
frame, instead of all the PWINDOW-> virtual calls, store pos and size
once and move the duplicated code to a lambda. reducing it a bit.
shows up in profiling as minor waste.
setCapStatus is a a heavy used function in hot rendering paths, it
shows up in profiling as using a bit of cpu just because of
unordered_set hashing etc, move to a enum and array and cache only the
heavily used ones.
this shows up as top contender in idle cpu usage, because decos in
animations keeps locking weak pointers to shared pointers per window per
frame when its not really needed, use weakpointers all the way and it
drops to a bottom contender. marginal gains in the big picture. but
gains is gains.
Clamps the pending wp_viewport source rect back inside the attached buffer when it misses by <= 1 px, so if clients request something that falls within the 256-increment wl_fixed_from_double precision error it’s still treated as valid.
* config: fix gesture dispatcher parsing with whitespaces
Some dispatcher functions (e.g., `moveFocusTo`) expect the given string to be
stripped of whitepsaces.
This fixes `gesture` line parsing: rather than calling dispatcher functions
with the original string, we reuse words parsed by `CConstVarList` and join
them with a comma.
* tests/gestures: Add a test for `movecursortocorner`
use unique pointers and rvalue references where applicable, buffer is
still a shared pointer because CHLBufferReference uses it to hold it
locked.
in CSHMPool destructor add a check for m_data != MAP_FAILED same in
resize, because mmap returns (void *) -1 on failure and that is not
comparable to nullptr. delete default constructor so we dont end up in
weird states with m_data.