This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 2/3] TUI: Don't print KEY_RESIZE keys
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 8 Jan 2015 07:32:16 -0500
- Subject: Re: [PATCH 2/3] TUI: Don't print KEY_RESIZE keys
- Authentication-results: sourceware.org; auth=none
- References: <1420689885-31156-1-git-send-email-patrick at parcs dot ath dot cx> <1420689885-31156-2-git-send-email-patrick at parcs dot ath dot cx> <54AE6A19 dot 9070901 at redhat dot com>
On Thu, Jan 8, 2015 at 6:29 AM, Pedro Alves <firstname.lastname@example.org> wrote:
> On 01/08/2015 04:04 AM, Patrick Palka wrote:
>> wgetch() sometimes returns KEY_RESIZE when ncurses detects that the
>> terminal has been resized.
> I think curses SIGWINCH handler ends up _not_ installed, right?
> We install our own, and so does readline.
> So how did a resize manage to be detected/processed while inside
I'm pretty sure that the SIGWINCH handlers does not get installed.
However ncurses may detect a resize event when we exit TUI (exiting
ncurses), then resize the terminal, then re-enter TUI (restarting
ncurses). From there a KEY_RESIZE key is added to its internal FIFO.
And the next call to wgetch will return this KEY_RESIZE key.
> Pedro Alves