* config: add input-field dots_fade_time option
Time is in milliseconds. Anything <= 0 is immediate.
* input-field: change speedPerSecond to fadeMs
Default is 200ms, which is the same amount of time as the previous
5 speedPerSecond. Not sure using doubles is necessary, but I'm
using them to avoid precision issues.
Closes: https://github.com/hyprwm/hyprlock/issues/355
Worker threads become non-joinable once they are detached, and `await()` will not wait for them to
finish. This can lead to a crash when `asyncResourceGatherer` is destroyed in the main thread while it
is still being used in worker threads.
* input-field: refactor updateColors
* input-field: fix input-field:invert_numlock
* input-field: use updatePlaceholder to request the initial placeholder asset
* input-field: allow more gradual color animations
* input-field: fix caps and num indicator colors, when borderless and swap_font_color is true
* lockSurface: reload widgets on output change
* lockSurface: only configure when scale actually changed
* lockSurface: enable fsv1 per default for all compositors
* config: add fractional_scaling option
0 -> off
1 -> on
2 -> auto
* core: default auto option for fractional_scaling
* locksurface: fallback to integer scaling
* label: move asset updates out of the draw function
This allows us to check if the label has actually updated after the
callback from the asyncResourceGatherer. If it isn't we can requeue the
renderUpdate() function.
* image: move asset updates out of the draw function
* misc: add issue templates
Copied from Hyprland and slightly modified
* misc: but template --version and minor improvements
* misc: fix bug template closing tag
* asyncResourceGatherer: deduplicate image rendering code
Also happens to add support for JPEG and WEBP for image widgets
* asyncResourceGatherer: use a reference for path in getFileType
* core: check m_bTerminate for grace unlocks
* core: remove reference to the lock object on finished
* core: add isUnlocked
true if m_bFadeStarted or m_bTerminate
* auth: return early on grace or SIGUSR1 unlocks
* core: immediately create session lock surfaces
Instead of waiting for the `locked` event, create session lock surfaces
right away.
* core: don't allow unlock_and_destroy if `locked` has never been recieved
After realizing that pam modules sometimes implement a timeout, i think
it is not worth starting the convo it right away.
Now you won't get the initial PAM_PROMPT any more.
Prompt will be initialized to "Password: ", which is most commonly what
you get from pam. Subsequent prompts (e.g. 2fa) will be handled however.
* asyncResourceGatherer: start the asyncLoop at the same time as gather
This is a prerequesit for labels beeing drawn, while backgrounds are
note ready yet.
* core: allow immediate rendering even when backgrounds are not gathered yet
Note:
We don't really need to call `asyncResourceGatherer::apply` in the
`renderLock` function, since it will get called by a call to
`asyncResourceGatherer::getAssetById` anyways.
* background: render color rectangle when asset is not ready yet
* config: add general:immediate_render config option
* core: use the --immediate-render flag in attemptRestoreOnDeath
* core: check for sessionLockSurface before calling render
This is needed, because when a new monitor is added via `onGlobal` the
order of the events is not guaranteed. Meaning that render for a
particular monitor might get called before a `CSessionLockSurface` for
that monitor exists.
* renderer: remove widgets for destroyed lockSurfaces
* asyncResourceGatherer: don't create duplicate dma frames for a specific stringPort
* core: remove renderer widgets in ~CSessionLockSurface instead of in onGlobalRemoved
* Revert "core: remove renderer widgets in ~CSessionLockSurface instead of in onGlobalRemoved"
This reverts commit 405aa42de8.
Because of destruction order, it is safer to do it in `onGlobalRemoved`.
* core: ditch dynamic DMAFrame generation
* core: identify DMAFrames via output size and stringPort
* core: fallback to background color for dynamic outputs with background:path=screenshot
* core: remove output pointer from DMAFrame
* core: fix sourcing config files
The `handleSource` handle relies on `g_pConfigManager`, which therefore
needs to be moved before `init`.
* core: remove unnecessary unique pointer moves
* core: handle rerendering when frameCallback is pending
* core: log when skipping label updates
* asyncResourceGatherer: remove busy and use loopMutex
Makes getAssetById fail less often and thus labels get more stable
updates
* asyncResourceGatherer: revision locking
`assetsMutex` was not needed, since `apply` only gets called from the
main thread and resources are also only aquired via the main thread.
`preloadTargets`, previously kinda guarded by the `busy` flag are now
locked as suggested in #367 (but via a copy of `peloadTargets`).
`apply` now returns a boolean so that the locking of preloadTargets in
combination with checking `preloadTargets.empty()` is a bit nicer.
* asyncResourceGatherer: remove explicit template arg for unique lock