ocaml-tmk-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ocaml-tmk-devel] Handling xterm resizing


From: Richard Jones
Subject: Re: [Ocaml-tmk-devel] Handling xterm resizing
Date: Mon, 1 Nov 2010 08:31:53 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

On Mon, Nov 01, 2010 at 11:26:01AM +1100, Erik de Castro Lopo wrote:
> Erik de Castro Lopo wrote:
> 
> > For the Ocaml curses bindings, I notice that ml_curses.c defines
> > a SIGWINCH handler as:
> > 
> >     static void winch_handler(int n)
> >     {
> >       signal(n,winch_handler);
> >       ungetch(KEY_RESIZE);
> >     }
> 
> I've just noticed something strange. I do indeed get a KEY_RESIZE
> character from Curses.getch(), but only after I get another key.
> 
> Basically I do:
> 
>  a) start the curses program
>  b) resize the window
>  c) press another key
> 
> and I get the KEY_RESIZE character *after* the other key.

virt-top updates its display every few seconds, so we don't
specifically deal with resizing -- it is done when the display
updates.  However we do explicitly ignore Key.resize.

Rich.

-- 
Richard Jones
Red Hat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]