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

animation: let callbacks have SP's to the self variable and dispatch them internally #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PaideiaDilemma
Copy link
Contributor

I lost the confidence that just looping over indices makes it safe. Haven't seen a crash per se, but after rethinking, I think this is better to be safe.

This breaks the ABI (callback WP->SP), so I also included the virtual dtor here in case we merge this.
Also onUpdate need to be removed from the tick method in hyprland/lock, cause that is now handled in tickDone

…them internally

To be absolutely sure that adding/removing callbacks can't cause
problems, dispatch them in tickDone outside of the loop.
I think looping over all the vars twice is still better than having
disconnectFromActive handle the removal, because that needs to search
for each variable in the active vector.
@vaxerski
Copy link
Member

I lost the confidence that just looping over indices makes it safe. Haven't seen a crash per se, but after rethinking, I think this is better to be safe.

reasoning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants