Commit graph

266 commits

Author SHA1 Message Date
Jasson
a50296c181
core: minor bugfixes (#405) 2024-07-07 17:55:59 +02:00
Tom Englund
7fb3c03500
hyprlock: ensure members are accessed direct (#404)
if the unique_ptr is reset directly accessing it from the destructor
causes crashes on Clang/libc++, just access the members directly.
2024-07-06 12:24:29 +02:00
daywalker-dev
6e0921140e
helpers: fix jpeg and webp OOM error (#401)
* Update Jpeg.cpp

* Update Webp.cpp
2024-07-05 22:58:45 +02:00
29420ddb6c cmake: bump ver to 0.4.0 2024-07-05 22:55:15 +02:00
Maximilian Seidler
b862bbce71
auth: pam fallback log message and always call pam_end after pam_authenticate (#399)
* auth: make the fallback to sudo error more descriptive

* auth: always call pam_end after pam_authenticate
2024-07-05 22:54:40 +02:00
Maximilian Seidler
01bf48ed96
config: don't crash when getenv HOME returns null (#398) 2024-07-05 22:41:03 +02:00
Maximilian Seidler
9737bf6484
label: do not error when using cmd[] for a static label cmd (#396) 2024-07-04 18:04:45 +02:00
davc0n
5b19c6307a
config: Remove dupe input-field rounding from listKeysForSpecialCategory (#395) 2024-07-03 23:50:07 +02:00
Maximilian Seidler
9873ec58b7
asyncResourceGatherer: add dma frames before starting the asyncLoopThread (#394) 2024-07-03 19:31:16 +02:00
Maximilian Seidler
88b9ce48ed
core: improve dynamic output handling (#386)
* 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
2024-07-02 00:45:06 +02:00
Maximilian Seidler
0f66aeac03
core: fix sourcing config files (#387)
* 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
2024-06-28 18:57:38 +02:00
Maximilian Seidler
318c00d6d0
core: stabilize label updates and revision locking in the asyncResourceGatherer (#384)
* 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
2024-06-26 20:31:15 +02:00
Jasson Cordones
d31e600f14
core: Inproved error handling and arg parsing (#380)
* 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
2024-06-25 20:09:52 +02:00
Florian Walter
210b456c15
core: fix second instance of hyprlock unlocking session (#376)
* fix second instance of hyprlock unlocking session

* fix segfault when lock cannot be acquired

* improve ordering of display roundtrips
2024-06-25 13:46:58 +02:00
Vaxry
c5b8ad03d0
core: move to hyprutils for utils (#362)
* core: move to hyprutils for utils

* Nix: add hyprutils dep

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-06-08 23:49:49 +02:00
Gualberto Escalante
e07d4110dc readme: Add Arch instructions 2024-05-29 15:54:37 +03:00
André Silva
768cd3ea52
core: handle null timers in destructors (#350) 2024-05-26 18:46:53 +02:00
Tom Englund
58c93d8de8
core: fix a few reported leaks by asan (#349)
* 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.
2024-05-25 20:05:37 +02:00
972c1c27e6 restore: move to runtime dir and check his
fixes #346
2024-05-23 12:58:54 +02:00
ba4b08e5f5
nix/hm-module: remove 2024-05-21 19:45:18 +03:00
giskard
18d2d2ba6a
cmake: macro-prefix-map, compile_commands.json (#338)
* cmake: position independent build for `__FILE__`

* cmake: generate compile_commands.json, coder-friendly
2024-05-20 23:00:28 +01:00
shezdy
997f222b0f
core: add zindex option to widgets (#334)
* add zheight

* move sort to renderer

* fix format

* change name to zindex
2024-05-17 19:29:05 +01:00
Maximilian Seidler
316c37746d
core: add key repeat for backspace and make del clear the input (#277)
* 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
2024-05-14 16:11:45 +01:00
Daniel Horton
386a1e6fc2
readme: Fixed getconf command in build instructions (#326)
getconf NPROCESSORS_CONF isn't a valid command. The correct command is getconf _NPROCESSORS_CONF.
2024-05-13 15:21:54 +01:00
bvr-yr
0477df2ca4 gatherer: use absolute path in magic guess 2024-05-12 13:46:49 +03:00
davc0n
c87af3aa1f
renderer: add text trim with option to disable (#310)
* renderer: add text trim with option to disable

* refactor: format CAsyncResourceGatherer::renderText

* config: change disable_text_trim to text_trim
2024-05-04 18:18:27 +01:00
Antonio Cheong
21226c1206
README: add libmagic dependency (#307) 2024-05-04 00:11:56 +01:00
Yoni Firroloni
3cd461405c readme: add new line for clarity 2024-05-03 15:34:13 +03:00
992fb49f3a session-lock: use logicalSize in late configure
ooops

ref #303
2024-05-03 13:21:51 +01:00
9cca0dbb45 core: avoid sending duplicate acks for ls 2024-05-02 15:18:17 +01:00
1651b02cc1 core: update renderer on late scale changes
ref https://github.com/hyprwm/Hyprland/issues/5842, in case a compositor sends the scale after configure
2024-05-02 15:17:04 +01:00
Daniel Mensinger
415262065f
core: Add support for JPEG and WEBP background images (#286)
* 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
2024-04-24 18:06:14 +01:00
8658386f21 image: fix build with libc++
fixes #289
2024-04-22 10:12:42 +01:00
André Silva
307e473759
core: fix initialization issues in LockSurface (#285)
* LockSurface: handle uninitialized eglWindow in destructor

* LockSurface: don't render before configuration
2024-04-19 19:48:11 +01:00
2bce52f094
flake.lock: update 2024-04-15 23:55:44 +03:00
bvr-yr
04267a5f83
label: add text_align option for multi-line text (#278) 2024-04-13 14:38:06 +01:00
Maximilian Seidler
6fa65e1172
input-field: increase default fade_timeout (#276) 2024-04-11 19:57:46 +01:00
715a54fff4
Nix: remove patch 2024-04-11 01:31:31 +03:00
d9a6229434 pam: always install pam file 2024-04-10 22:42:54 +01:00
Maximilian Seidler
883fbdfe01
auth: implement a full pam conversation (#205)
* 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
2024-04-10 22:41:31 +01:00
bvr-yr
eb1123fa2e
widgets: add Shape + minor image improve (#266)
* widgets: add Shape

* image: minor improvment

* glClear on FB alloc

* add Nix HM

* always create FB if not xray
2024-04-10 17:24:17 +01:00
Maximilian Seidler
d9f6441254
core: use --immediate for attemptRestoreOnDeath (#270) 2024-04-10 11:28:24 +01:00
Maximilian Seidler
1bfe32e7fa
input-field: also fade in when checkWaiting is true (#265) 2024-04-09 11:14:25 +01:00
Maximilian Seidler
a50db6d56d
core: avoid double unlocks with no_fade_out (#257) 2024-04-09 11:14:04 +01:00
bc87adf9ec cmake: bump ver to 0.3.0 2024-04-08 15:39:01 +01:00
bvr-yr
bbbb960e42
image: add reload options (#247)
* image: add reload options

* check for actual file changes

* use modtime

* check only same paths

* add Nix HM
2024-04-07 18:09:25 +01:00
Austin Horstman
071ebcefb9 nix/hm-module: add shadowable to images 2024-03-31 14:30:03 +03:00
Mike Rivnak
ad41b31135
core: Add user description variable (#248) 2024-03-31 02:06:11 +01:00
bvr-yr
ad8a1e9b10 Nix/HM module: fix rotate option 2024-03-29 21:51:55 +02:00
bvr-yr
84c6282d6a
widgets: add rotate option to label and image (#234)
* widgets: add `rotate` option to label and image

* use framebuffer for image
2024-03-29 19:01:11 +00:00