lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV How to change screen size??


From: John E. Davis
Subject: Re: LYNX-DEV How to change screen size??
Date: Wed, 29 Oct 1997 15:17:37 -0500

On Wed, 29 Oct 1997 14:18:59 -0500, I wrote:
>The function lynx_handle_interrupt would look like:
>
>   void lynx_handle_interrupt (void)
>   {
>       block_signals ();
>
>       if (Lynx_Need_Redraw)
>         {
>            lynx_redraw ();
>           Lynx_Need_Redraw = 0;
>        }
>
>       unblock_signals ();
>   }

   Actually, this should probably look like:
   
   void lynx_handle_interrupt (void)
   {
       block_signals ();

       if (Lynx_Need_Redraw)
         {
            lynx_reset_display ();
            lynx_init_display ();
            lynx_redraw ();
            Lynx_Need_Redraw = 0;
         }

       unblock_signals ();
   }

Also, the SIGWINCH handler should reset itself:

   void sigwinch_handler (int sig)
   {
       Lynx_Need_Redraw = 1;
       lynx_get_screen_size ();
       signal_such_that_syscalls_are_not_restarted (SIGWINCH,
                                                    sigwinch_handler);
   }

If using slang, signal_such_that_syscalls_are_not_restarted is simply
SLsignal_intr.

--John
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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