[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Off-screen panels/windows
From: |
Bill Gray |
Subject: |
Re: Off-screen panels/windows |
Date: |
Sat, 8 Aug 2020 21:50:43 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Thank you; this does clear things up a lot.
On 8/8/20 5:44 PM, Thomas Dickey wrote:
I'd expect the windows associated with the panels to be resized/limited
to be on-screen (if not, a bug...)
In that case, I think I have a bug to report. Compile
https://github.com/Bill-Gray/PDCursesMod/blob/master/demos/test_pan.c
using, for example,
cc -Wall -O3 -otest_pan ../demos/test_pan.c -lpanel -lncurses
Running it should get a display resembling that shown on lines 8-25
of the source code. Hold down the right arrow key, and the top "Window
3" should move right until it hits the right edge. You'll then get
flashes telling you you can't move the panel any further.
Resize the terminal to shrink it in width, and the right edge of
"window 3" will be chopped off. Try to move it with the cursor keys,
and you get flashes (the new position would still be off-screen).
(Or, I assume, try any ncurses demo you have with windows and/or
panels and shrink the terminal to cut off their right/bottom edges.)
Is there a reason ncurses requires windows/panels to be on-screen
(with the exception of resized terminals)? Out of caution, I'm
iirc, it's for compatibility with SVr4 curses
though that X/Open Curses in general has that, because of mvwin:
https://pubs.opengroup.org/onlinepubs/7908799/xcurses/mvwin.html
(that is, you shouldn't be able to create a window in a place that you
can't move the window to).
Seems reasonable, unfortunately. Handling partial display seems
to be relatively easy and is actually a "feature". If I in PDCurses
and you in ncurses have to keep windows and panels on-screen, shifting
them left/up if the terminal is shrunk horizontally/vertically, and
also having to shrink those windows if they're wider/higher than the
screen, I can only say: ugh.
-- Bill