-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
ta/xfixes cursor barrier #1142
ta/xfixes cursor barrier #1142
Conversation
ThomasAdam
commented
Dec 14, 2024
- cursorbarrier: forward-declare functions
- cursorbarrier: destroy barriers if MAX_BARRIERS is reached
2b7ef70
to
9301ca3
Compare
fvwm/cursor.c
Outdated
#define destroy_barrier_n(a) | ||
#define destroy_barrier_n(a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears you are defining this function again, and I'm unsure why.
fvwm_debug(__func__, "Too many barriers. Freeing previous..."); | ||
destroy_all_barriers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your reasoning here? If they reach max barriers do you just want a reset? Since you are destroying all of the barriers first, should you remove the return bellow this so the current one they are trying to create gets created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to document this behavior in the manual page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's odd either way.
No one's going to reach this limit.
Make sure we forward-declare the use of the cursor barrier function, so as to not rely on the order the functions have been declared. This will be relevant for subsequent changes.
9301ca3
to
3bd21ae
Compare
Make sure we destroy all the defined barriers if MAX_BARRIERS is reached.
3bd21ae
to
ff5cfd3
Compare