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

ta/xfixes cursor barrier #1142

Merged
merged 2 commits into from
Dec 14, 2024
Merged

ta/xfixes cursor barrier #1142

merged 2 commits into from
Dec 14, 2024

Conversation

ThomasAdam
Copy link
Member

  • cursorbarrier: forward-declare functions
  • cursorbarrier: destroy barriers if MAX_BARRIERS is reached

@ThomasAdam ThomasAdam added this to the 1.1.2 milestone Dec 14, 2024
@ThomasAdam ThomasAdam added the type:bug Something's broken! label Dec 14, 2024
@ThomasAdam ThomasAdam requested a review from somiaj December 14, 2024 13:58
@ThomasAdam ThomasAdam force-pushed the ta/xfixes-cursor-barrier branch from 2b7ef70 to 9301ca3 Compare December 14, 2024 14:02
fvwm/cursor.c Outdated
Comment on lines 120 to 121
#define destroy_barrier_n(a)
#define destroy_barrier_n(a)
Copy link
Collaborator

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.

Comment on lines +58 to +59
fvwm_debug(__func__, "Too many barriers. Freeing previous...");
destroy_all_barriers();
Copy link
Collaborator

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?

Copy link
Collaborator

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.

Copy link
Member Author

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.
@ThomasAdam ThomasAdam force-pushed the ta/xfixes-cursor-barrier branch from 9301ca3 to 3bd21ae Compare December 14, 2024 16:38
Make sure we destroy all the defined barriers if MAX_BARRIERS is
reached.
@ThomasAdam ThomasAdam force-pushed the ta/xfixes-cursor-barrier branch from 3bd21ae to ff5cfd3 Compare December 14, 2024 16:42
@ThomasAdam ThomasAdam self-assigned this Dec 14, 2024
@ThomasAdam ThomasAdam merged commit 80e6017 into main Dec 14, 2024
12 checks passed
@ThomasAdam ThomasAdam deleted the ta/xfixes-cursor-barrier branch December 14, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants