* 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
* Inproved error handling and arg parsing
* Removed duplicated lines
* Remove curly braces from short ifs, used c-style casts, used contains instead of find to parse exception, applied clang formating
* Fix Formatting
* widgets: add missing virtual destructor
destructor is missing and as a consequence all sub classes gets wrongly
destructed reported as "new-delete-type-mismatch" by asan.
* gatherer: free memory allocated by pango
with pango_parse_markup its up to the caller of the function to free the
pointer to the text returned stored in this buf.
* core: add destructor and free devices
add a destructor and free both drmDevice and gbmDevice, leaks reported
by asan.
* core: free xkb allocated state and keymap
free xkb state and keymap on destruction to prevent leak on exit and
less asan spam.
* locksurface: destroy the surface frame on done
the callback was never being destroyed and is leaking on each
frameCallback creation, call wl_callback_destroy in onCallback() and
free the memory. reported with asan.
* core: add support for repeating backspace when held
* core: move keysym handling to a seperate function in order to reuse it for key repeat
* core: get keyboard repeat info from wayland
* core: defaults for keyboard repeat and delay
* Add KDevelop files to the .gitignore
* Add support for JPEG and WEBP background images
Most of the code is copy-pasted from hyprpaper
* Try doing nix stuff
* Do not use brackets for short ifs
* auth: implement a full pam conversation
* input-field: fixup failedAttempts and color change
Credits to @bvr-yr
* pam: set default module to hyprland
* input-field: backup previous asset
* auth: restart auth in onPasswordCheckTimer
* auth: immediately switch to waiting when input was submitted
* auth: remove redundant waitingForPamAuth
* auth: add inputRequested and reschedule submitInput
* auth: clear password buffer and handle submitInput before input is requested
* Revert "input-field: backup previous asset"
This reverts commit 89702945be6af4aa43f54688ad34a4ccba994a3e.
Without the backup we avoid rendering the prompt placeholder for one frame when the failText is not available.
Looks better this way.
* auth: fallback to su if pam_module not in /etc/pam.d
rare occasion where a path check even works on nix
* auth: rename inputSubmitted and resubmit callback
* auth: detach failText from the conversation
* fix rebase mistake
* auth: make sure prompt and failText are not reset when restarting auth
needed for labels
* auth: force update timers when the prompt changes
* auth: remove unused stuff
* input-field: new color features
* add nix HM
* add workaround for faillasset not being shown on empty imput
* comment
* change cfg option name
* remove TODO
* small fix
* one more edge check
* dedup changeColor function
* simplify more
* input-field: some fixes
* simplify; correctly check passlen(utf8) in draw return
* correctly erase utf-8 on backspace
* render on up events too
* omglul
me dumb
* revert fade speed change
* core: allow fade out for grace unlock
* core: disable input once fade out started
* core: render when fade out started
* core: allow fade out for other compositors
Works fine in sway altough it fades to a black screen not to the desktop.
Still looks kinda good.
* Revert "core: allow fade out for other compositors"
This reverts commit adfeb543ad.
* misc: rename lock and unlock functions
* misc: use weakly_canonical for absolutePath
* misc: make absolutePath not optional
* misc: use currentDir as the argument to absolutePath
* config: avoid circular imports
* background: fix background not rendering when resource gatherer is busy
* asyncResourceGatherer: check cairo_surface_status
* background: clear resource id when texture is invalid
* label: render output via stringPort instead of surface
* label: retry onAssetCallback
Calling `render` might not update the asset when the surfaces frameCallback is already set.
* Revert "label: fix rendering with multiple timers that fire at the same time (#147)"
This reverts commit e9a57f0dae.
* input-field: add fade out timeout
* input-field: let dots reset themselfs
Now the dots kind of fade into the placeholder text on a failure.
* Nix/HM module: add input-field:fade_timeout option
This reverts commit 2c7027d2b5.
Without the roundtrip it was possible that session_lock_surface_destroy gets called before unlock_and_destroy is processed.