8e8bfbb0b1 added fifo and merged non
buffer states before comitting them, something about certain xwl non
buffer commits expects a commit to happend and causes regressions as in
low fps.
This manifested for me as a failure to build plugins with `hyprpm`, but
the root cause was GPG data getting incorporated into `src/version.h`,
like so:
```c
#define GIT_COMMIT_MESSAGE "gpg: Signature made Sun 09 Nov 2025 03:31:36 PM PST
gpg: using EDDSA key E26A4A2AB9676F54149F8EAA665806380871D640
gpg: Can't check signature: No public key
version: bump to 0.52.1"
```
This affected both `GIT_COMMIT_MESSAGE` and `GIT_COMMIT_DATE`, since
those are generated via `git show` (which can generate that extra GPG
info if the user's personal Git config sets `log.showSignature`).
See: https://github.com/hyprwm/Hyprland/discussions/12282
Hyprland at the latest commit crashes at starting up on FreeBSD with
SIGSEGV. Checking the validity of g_pXWayland->m_wm before calling
updateWorkArea() appears to fix the issue.
as protocol states there is two events. 'presented' or 'discarded'.
wp_presentation_feedback::sync_output
As presentation can be synchronized to only one output at a time, this event tells which output it was.
This event is only sent prior to the presented event.
wlr-randr disconnects immediately after receiving success event, but
before applying the monitor configuration. This causes the state to be
lost when performMonitorReload() is called.
By postponing the success event until the call of the hook
monitorLayoutChanged we ensure the configuration to remain valid during
the reload process.
* protocols: add Fifo-v1
introduce fifo-v1
* fifo: only present locked surfaces
dont present to unlocked surfaces and commit pending states from the
fifo protocol.
* fifo: cformat
cformat
* protocols: add committiming and surface state queue
introduce CSurfaceStateQueue and commit-timing-v1
* fifo: schedule a frame if waiting on barrier
if we are waiting on a barrier the state doesnt commit until the next
refresh cycle meaning the monitor might have no pending damage and we
never get onPresented to unlock the barrier, moment 22. so schedule a
frame.
* fifo: properly check monitor intersection
check for m_enteredoutputs or monitor intersection if client hasnt bound
one yet, and dont fifo lock it until the surface is mapped.
* buffer: try to merge states before committing them
try to merge states before committing them meaning way less churn and
surface commits if a surface sends multiple small ones while we wait for
buffer readyness from either fifo locks or simply fences.
* buffer: dont commit states past the buffer
certain changes are relative to the buffer attached, cant go beyond it
and apply those onto the next buffer.
* buffer: set the lockmask directly
cant use .lock since the state hasnt been queued yet, set the lockmask
directly when exporting buffer fence.
* fifo: dont fifo lock on tearing
dont fifo lock on tearing.
* buffer: queue the state directly
queue the state directly and use the .lock function instead of directly
modify the lockMask on the state.
* buffer: revert creating texture at commit time
fifo barriers introduces such long wait that upon commit time a
race happends with current xdg configure implentation that the buffer
and image is actually destroyed when entering commitState, doing it at
buffer creation time with EGL_PRESERVED_KHR means it sticks around until
we are done. so revert 82759d4 and 32f3233 for now.
* buffer: rename enum and lockreasons
eLockReason and LOCK_REASON_NONE.
* fifo: workaround direct scanout lock
workaround cursor commits causing fifo to get forever locked, this
entire thing needs to be worked out.
If dpms gets immediately re-enabled, a commit could fail, not schedule any frames anymore, and the monitor would be stuck off. Fix this by adding a timer to retry if commit fails.
ref #12045