Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcursor implent inheriting themes #7197

Merged
merged 3 commits into from
Aug 7, 2024
Merged

xcursor implent inheriting themes #7197

merged 3 commits into from
Aug 7, 2024

Conversation

gulafaran
Copy link
Contributor

i went around moved things in CCursorManager added config checks a bit more so now it doesnt allocate memory etc depending on the config choice, reduced a bit of duplicated code, moved those into functions. and fixed a bit of inconsistencies when using hyperctl setcursor depending on hyprcursor theme/xcursor theme not found.

XCursorManager now supports Inherits from index.theme

also when testing i noticed asan reports a leak with hyprcursor, went back in commit history a bit and its been around for quite some time so its not something i introduced it seems. this technically means xcursor is now done? i think.

Direct leak of 110952 byte(s) in 207 object(s) allocated from:
    #0 0x555559991a05 in calloc (/home/tom/dev/Hyprland/build/Desktop-Debug/Hyprland+0x443da05)
    #1 0x7ffff7b7596e in g_malloc0 (/usr/lib64/libglib-2.0.so.0+0x7a96e)
    #2 0x7ffff7cc7ebc in g_type_create_instance (/usr/lib64/libgobject-2.0.so.0+0x43ebc)
    #3 0x7ffff7cb1392  (/usr/lib64/libgobject-2.0.so.0+0x2d392)
    #4 0x7ffff7ca549d in g_object_new_with_properties (/usr/lib64/libgobject-2.0.so.0+0x2149d)
    #5 0x7ffff473bfc0  (/usr/lib64/librsvg-2.so.2+0x33bfc0)
it spams
Indirect leak of 15 byte(s) in 1 object(s) allocated from:
    #0 0x5555599211d7 in malloc (/home/tom/dev/Hyprland/build/Desktop-Debug/Hyprland+0x43cd1d7)
    #1 0x7ffff4779a6d  (/usr/lib64/librsvg-2.so.2+0x379a6d)
    #2 0x7ffff44a8009  (/usr/lib64/librsvg-2.so.2+0xa8009)
    #3 0x295e6fffffffff  (<unknown module>)

so as before im here for judgement. i could technically drop the CCursorManager changes too and only go with the XCursorManager inherits change heh.

add a few functions such as setCursorBuffer and setAnimationTimer to
reduce duplicated code and also avoid future mishaps of forgetting to
clear buffer or disarm timer. and generally reduce spaghetti even tho
pasta can be delicious.
@gulafaran
Copy link
Contributor Author

ok found a bug, investigating. hold it.

@gulafaran
Copy link
Contributor Author

ok found a bug, investigating. hold it.

done :p was regarding env vars and reloading config from hypr to xcursors.

@vaxerski
Copy link
Member

vaxerski commented Aug 6, 2024

do you know jeremy clarkson

@gulafaran
Copy link
Contributor Author

do you know jeremy clarkson

this either bodes well or bad.

"Sometimes My Genius Is Almost Frightening"

vaxerski
vaxerski previously approved these changes Aug 6, 2024
@vaxerski
Copy link
Member

vaxerski commented Aug 6, 2024

clang-format fail?

@gulafaran
Copy link
Contributor Author

clang-format fail?

yeah im not sure how to fix that. lol im apparently newer versioned again then arch and the fail isnt telling me how it wants it >_<. im soon setting up a clang-format virtual machine on arch lol

@gulafaran
Copy link
Contributor Author

clang-format fail?

yeah im not sure how to fix that. lol im apparently newer versioned again then arch and the fail isnt telling me how it wants it >_<. im soon setting up a clang-format virtual machine on arch lol

nvm i have an idea, push coming shortly.

implent index.theme parsing and inherited themes.
ensure a xcursor fallback exist otherwise it wont load the proper theme
if we at launch have hyprcursor enabled and then set it to false in
config and reload. also use the env var when using hyprctl setcursor
incase its empty.
@vaxerski vaxerski merged commit 3d82d19 into hyprwm:main Aug 7, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants