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

ncurses compatibility: allow newwin off-screen #85

Open
GitMensch opened this issue Feb 25, 2020 · 0 comments
Open

ncurses compatibility: allow newwin off-screen #85

GitMensch opened this issue Feb 25, 2020 · 0 comments

Comments

@GitMensch
Copy link
Contributor

This came up in #57 first, as it is a completely different issue with some effort to put in it is tracked here.

Initial finding of @tysenmoore-xse, documented in his repo:

... better handle windows that are out of the screen size. PDCurses will not allocate the window [...] ncurses appears to allocate the window just fine.

@wmcbrine commented:

Yeah, I noticed the oversized window thing a while back. I was actually surprised that ncurses does that, but, emulating it is probably the right thing.
and:
Clipping is not contemplated. Working like ncurses means returning the requested size, even if parts of it are off-screen.

with the additional notes of @Bill-Gray:

[...] newwin could do no clipping nor checking, and would allocate the entire window; it's just that there would be parts of that window you couldn't see (unless the window was moved). That would require a fair bit of change elsewhere, I think, inasmuch as we'd have to have logic that said : 'use this part of the window, but only the parts that actually land on the screen." At present, you can move windows, but you can't move parts of them off-screen.
and:
I just did some experimenting with newwin in ncurses, and found that it does have that limitation. You can call newwin with the x and y coordinates for the upper left corner to put the window partly off-screen to the right or bottom, but negative values for x or y fail.
I'd argue that ncurses has it wrong. If you're going to allow windows to go off the right or bottom edge, then the top and left edges should be fair game.

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

No branches or pull requests

1 participant