This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/3] TUI: Don't print KEY_RESIZE keys


On Thu, Jan 8, 2015 at 6:29 AM, Pedro Alves <palves@redhat.com> 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
> wgetch?

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.

>
> Thanks,
> Pedro Alves
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]