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

Getting the new window size when receiving NCKEY_RESIZE #2750

Open
mulle-nat opened this issue Jan 31, 2024 · 1 comment
Open

Getting the new window size when receiving NCKEY_RESIZE #2750

mulle-nat opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
userquestion not quite bugs--inquiries from users

Comments

@mulle-nat
Copy link
Contributor

So I do a notcurses_get and I get a NCKEY_RESIZE back. I naively assumed that I could ask notcurses_term_dim_yx for the new dimensions. Alas these give me the old dimensions. Looking through the code, there is a "update_term_.." function, which I could call. That probably does what I want, but since this is not "official" API, I wonder if I am not walking in a pitfall here. I don't want to render anything at this point.

Ideally of course the new size would be part of ncinput, so I don't have to do this 😉

@mulle-nat mulle-nat added the userquestion not quite bugs--inquiries from users label Jan 31, 2024
@dankamongmen dankamongmen self-assigned this Feb 1, 2024
@dankamongmen
Copy link
Owner

hrmmm, i believe notcurses_term_dim_yx() following receipt of the NCKEY_RESIZE ought indeed return the new size. if it's not, that's almost certainly a bug. with that said, resizing is not the cleanest code in notcurses.

you ought not need call anything else. i'll look into this, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
userquestion not quite bugs--inquiries from users
Projects
None yet
Development

No branches or pull requests

2 participants