Changeset 5cc7e5e


Ignore:
Timestamp:
Jun 20, 2010, 4:47:23 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
0be3efd
Parents:
1f4ea57
git-author:
David Benjamin <davidben@mit.edu> (06/20/10 16:41:26)
git-committer:
David Benjamin <davidben@mit.edu> (06/20/10 16:47:23)
Message:
Kill owl_global_needrefresh

Not necessary now. Internal state for owl_window.
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rea7daa8 r5cc7e5e  
    3131  }
    3232
     33  g->lines=LINES;
     34  g->cols=COLS;
     35  /* We shouldn't need this if we initialize lines and cols before the first
     36   * owl_window_get_screen, but to be safe, we synchronize. */
     37  owl_window_resize(owl_window_get_screen(), g->lines, g->cols);
     38
    3339  g->context_stack = NULL;
    3440  owl_global_push_context(g, OWL_CTX_STARTUP, NULL, NULL, NULL);
     
    3743  g->topmsg=0;
    3844  g->markedmsgid=-1;
    39   g->needrefresh=1;
    4045  g->startupargs=NULL;
    4146
    4247  owl_variable_dict_setup(&(g->vars));
    43 
    44   g->lines=LINES;
    45   g->cols=COLS;
    4648
    4749  g->rightshift=0;
     
    306308}
    307309
    308 /* refresh */
    309 
    310 int owl_global_is_needrefresh(const owl_global *g) {
    311   if (g->needrefresh==1) return(1);
    312   return(0);
    313 }
    314 
    315 void owl_global_set_needrefresh(owl_global *g) {
    316   g->needrefresh=1;
    317 }
    318 
    319 void owl_global_set_noneedrefresh(owl_global *g) {
    320   g->needrefresh=0;
    321 }
    322 
    323310/* variable dictionary */
    324311
  • keys.c

    r68f63a2 r5cc7e5e  
    338338    owl_editwin_post_process_char(e, j);
    339339  }
    340   owl_global_set_needrefresh(&g);
    341340}
    342341
  • mainwin.c

    re92e2a1 r5cc7e5e  
    7373    mw->curtruncated=0;
    7474    mw->lastdisplayed=-1;
    75     owl_global_set_needrefresh(&g);
    7675    return;
    7776  }
  • owl.c

    rea7daa8 r5cc7e5e  
    459459  /* if a resize has been scheduled, deal with it */
    460460  owl_global_check_resize(&g);
    461 
    462461  /* update the terminal if we need to */
    463   if (owl_global_is_needrefresh(&g)) {
    464     /* Redraw the screen */
    465     owl_window_redraw_scheduled();
    466     doupdate();
    467     owl_global_set_noneedrefresh(&g);
    468   }
     462  owl_window_redraw_scheduled();
    469463  return 0;
    470464}
  • owl.h

    rea7daa8 r5cc7e5e  
    588588  owl_mainpanel mainpanel;
    589589  gulong typwin_erase_id;
    590   int needrefresh;
    591590  int rightshift;
    592591  volatile sig_atomic_t resizepending;
  • window.c

    r1f4ea57 r5cc7e5e  
    360360  if (w)
    361361    g_object_add_weak_pointer(G_OBJECT(w), (gpointer*) &cursor_owner);
    362   owl_global_set_needrefresh(&g);
     362  owl_window_dirty(owl_window_get_screen());
    363363}
    364364
     
    370370  if (w)
    371371    g_object_add_weak_pointer(G_OBJECT(w), (gpointer*) &default_cursor);
    372   owl_global_set_needrefresh(&g);
     372  owl_window_dirty(owl_window_get_screen());
    373373}
    374374
     
    392392      w = w->parent;
    393393    }
    394     owl_global_set_needrefresh(&g);
    395394  }
    396395}
     
    432431{
    433432  owl_window *cursor;
    434 
    435   _owl_window_redraw_subtree(owl_window_get_screen());
     433  owl_window *screen = owl_window_get_screen();
     434
     435  if (!screen->dirty_subtree)
     436    return;
     437  _owl_window_redraw_subtree(screen);
    436438  update_panels();
    437439  cursor = _get_cursor();
     
    444446    wnoutrefresh(cursor->win);
    445447  }
     448  doupdate();
    446449}
    447450
Note: See TracChangeset for help on using the changeset viewer.