* syncobj: cleanup and use uniqueptrs
cleanup a bit missing removals if resource not good, erasing from
containers etc. make use of unique ptrs instead. and add default
destructors.
* syncobj: rework syncobj entirerly
remove early buffer release that was breaking explicit sync, the buffer
needs to exist until the surface commit event has been emitted and draw
calls added egl sync points, move to eventfd signaling instead of
stalling sync point checks, and recommit pending commits if waiting on a
signal. add a CDRMSyncPointState helper class. move a few weak pointers
to shared pointers so they dont destruct before we need to use them.
* syncobj: queue pending states for eventfd
eventfd requires us to queue pending stats until ready and then apply to
current, and also when no ready state exist commit the client commit on
the current existing buffer, if there is one.
* syncobj: clear current buffer damage
clear current buffer damage on current buffer commits.
* syncobj: cleanup code and fix hyprlock
remove unused code, and ensure we dont commit a empty texture causing
locksession protocol and gtk4-layer-shell misbehaving.
* syncobj: ensure buffers are cleaned up
ensure the containers having the various buffers actually gets cleaned
up from their containers, incase the CSignal isnt signaled because of
expired smart pointers or just wrong order destruction because mishaps.
also move the acquire/point setting to buffer attaching. instead of on
precommit.
* syncobj: remove unused code, optimize
remove unused code and merge sync fds if fence is valid, remove manual
directscanout buffer dropping that signals release point on pageflip, it
can cause us to signal the release point while still keeping the current
buffer and rendering it yet again causing wrong things.
* syncobj: delay buffer release on non syncobj
delay buffer releases on non syncobj surfaces until next commit, and
check on async buffers if syncobj and drop and signal the release point
on backend buffer release.
* syncobj: ensure we follow protocol
ensure we follow protocol by replacing acquire/release points if they
arrive late and replace already existing ones. also remove unneded
brackets, and dont try to manual lock/release buffers when it comes to
explicit protocol. it doesnt care about buffer releases only about
acquire and release points and signaling them.
* syncobj: lets not complicate things
set points in precommit, before checking protocol errors and we catch
any pending acquire/release points arriving late.
* syncobj: move SSurfaceState to types
remove destructor resource destroying, let resources destroys them on
their events, and move SSurfaceStates to types/SurfaceState.hpp
* syncobj: actually store the merged fd
have to actually store the mergedfd to use it.
* syncobj: cleanup a bit around fences
ensure the current asynchronous buffer is actually released on pageflip
not the previous. cleanup a bit FD handling in
commitPendingAndDoExplicitSync, and reuse the in fence when syncing
surfaces.
* syncobjs: ensure fence FD doesnt leak
calling resetexplicitfence without properly ensuring the FD is closed
before will leak it, store it per monitor and let it close itself with
the CFileDescriptor class.
* syncobj: ensure buffers are actually released
buffers were never being sent released properly.
* types: Defer buffer sync releaser until unlock
* syncobj: store directscanout fence in monitor
ensure the infence fd survives the scope of attemptdirectscanout so it
doesnt close before it should have.
* syncobj: check if if acquire is expired
we might hit a race to finish on exit where the timeline just has
destructed but the buffer waiter is still pending. and such we
removeAllWaiters null dereferences.
* syncobj: code style changes
remove quack comment, change to m_foo and use a std::vector and
weakpointer in the waiter for removal instead of a std::list.
* syncobj: remove unused async buffer drop
remove unused async buffer drop, only related to directscanout and is
handled elsewhere.
---------
Co-authored-by: Lee Bousfield <ljbousfield@gmail.com>
If a window is specifically placed on another workspace then we should
not "focus" that workspace even if the window itself never gets focused
when noinitialfocus is enabled for the window.
this fixes direct scanout glitches by ensuring that attemptDirectScanout doesn't try to recommit the same buffer to AQ
which would cause a pageflip event and the backendRelease to release the same buffer too early
* nix/module: toHyprconf -> toHyprlang
Updated generator that will end up living in Nixpkgs' `lib/generators`.
* nix/module: use xdph package directly
The downstream module already applies hyprland's
finalPackage to the portalPackage.
* new lib
* lib: add flattenAttrs, remove category processing
Flattening attributes means we no longer need to process categories
separately. For all intents and purposes, they do not exist.
Simplify the codebase once again, while introducing an easy to grasp
recursive function.
Add a bit of documentation for toHyprlang, though I doubt it's clear
enough even now. Still needs proper NixDoc.
* lib: add proper NixDoc
* nix/lib: inherit from lib