Changeset 0881cdd


Ignore:
Timestamp:
May 11, 2010, 7:42:13 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
88e425f
Parents:
bcff94d
git-author:
David Benjamin <davidben@mit.edu> (05/06/10 01:46:48)
git-committer:
David Benjamin <davidben@mit.edu> (05/11/10 19:42:13)
Message:
Use a separate pad for input

wgetch calls a wrefresh on regular windows. I imagine this is for
echo(), which we do not use. Instead, we make a pad and only ever
wgetch on it.

This also means that the various nodelay settings on other windows are
unnecessary.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r719173c4 r0881cdd  
    120120  g->timerlist = NULL;
    121121  g->interrupted = FALSE;
     122
     123  /* set up a pad for input */
     124  g->input_pad = newpad(1, 1);
     125  nodelay(g->input_pad, 1);
     126  keypad(g->input_pad, 1);
     127  meta(g->input_pad, 1);
    122128}
    123129
     
    179185  idlok(owl_global_get_curs_msgwin(g), FALSE);
    180186
    181   nodelay(owl_global_get_curs_typwin(g), 1);
    182   keypad(owl_global_get_curs_typwin(g), TRUE);
    183187  wmove(owl_global_get_curs_typwin(g), 0, 0);
    184 
    185   meta(owl_global_get_curs_typwin(g), TRUE);
    186188}
    187189
  • owl.c

    rbcff94d r0881cdd  
    311311{
    312312  owl_input j;
    313   WINDOW *typwin;
    314 
    315   typwin = owl_global_get_curs_typwin(&g);
    316313
    317314  while (1) {
    318     j.ch = wgetch(typwin);
     315    j.ch = wgetch(g.input_pad);
    319316    if (j.ch == ERR) return;
    320317
     
    339336     
    340337      for (i = 1; i < bytes; i++) {
    341         int tmp =  wgetch(typwin);
     338        int tmp = wgetch(g.input_pad);
    342339        /* If what we got was not a byte, or not a continuation byte */
    343340        if (tmp > 0xff || !(tmp & 0x80 && ~tmp & 0x40)) {
  • owl.h

    rf7cf6c2 r0881cdd  
    565565  owl_view current_view;
    566566  owl_messagelist msglist;
     567  WINDOW *input_pad;
    567568  PANEL *recpan, *seppan, *msgpan, *typpan;
    568569  int needrefresh;
  • popwin.c

    r06cc8d9 r0881cdd  
    2828  popwin = newwin(pw->lines-2, pw->cols-2, startline+1, startcol+1);
    2929  pw->poppanel = new_panel(popwin);
    30  
    31   meta(popwin,TRUE);
    32   nodelay(popwin, 1);
    33   keypad(popwin, TRUE);
    3430
    3531  werase(popwin);
Note: See TracChangeset for help on using the changeset viewer.