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

Redraw card background to prevent visual artefacts #41

Merged
merged 1 commit into from
May 31, 2020

Conversation

dther
Copy link
Contributor

@dther dther commented May 31, 2020

Fixes #37.

@mpereira
Copy link
Owner

Thanks for the PR @dther! I assume you have tested this on Arch Linux, and it fixes the bug?

I just tested it here on macOS and there doesn't seem to be any changes, so it looks good from my side. I have a question though: do you think it makes sense for that wborder call to be in the erase_card function instead?

@mpereira
Copy link
Owner

I'll merge this PR for now and provide a release so that folks can test it. Please let me know what you think about the above 🙂

@mpereira mpereira merged commit 223837b into mpereira:master May 31, 2020
@mpereira mpereira mentioned this pull request May 31, 2020
@dther
Copy link
Contributor Author

dther commented Jun 1, 2020

Thanks for merging!

I tried moving the wborder call to erase_card, but it doesn't seem to fix the issue.
My rationale for placing it in draw_front is that the artefacts seem to "follow" the card they're supposed to be on, and moving the entire stack doesn't cause any symbols to be left behind. wborder forces the card's background to be redrawn, overwriting the symbols.

Oddly enough, this seems to have fixed another visual bug I found, where the cursor seems to "uncenter" itself to the left every time it interacted with a glitched stack, but would fix itself after being moved in any way.

I will confess that I learnt ncurses literally yesterday, so I'm not familiar enough with it to know the ins and outs of how wborder works...

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.

Cards are mixed up
2 participants