Changeset f7cf6c2


Ignore:
Timestamp:
Apr 28, 2010, 2:27:58 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
f92acd7
Parents:
263320f
git-author:
David Benjamin <davidben@mit.edu> (04/28/10 13:39:29)
git-committer:
David Benjamin <davidben@mit.edu> (04/28/10 14:27:58)
Message:
Allow scheduling of relayouts as well as resizes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r263320f rf7cf6c2  
    5757  g->curmsg_vert_offset=0;
    5858  g->resizepending=0;
     59  g->relayoutpending = 0;
    5960  g->direction=OWL_DIRECTION_DOWNWARDS;
    6061  g->zaway=0;
     
    394395}
    395396
     397void owl_global_set_relayout_pending(owl_global *g) {
     398  g->relayoutpending = 1;
     399}
     400
    396401const char *owl_global_get_homedir(const owl_global *g) {
    397402  if (g->homedir) return(g->homedir);
     
    504509
    505510  owl_function_debugmsg("New size is %i lines, %i cols.", g->lines, g->cols);
    506   owl_global_relayout(g);
     511  owl_global_set_relayout_pending(g);
    507512}
    508513
    509514void owl_global_relayout(owl_global *g) {
     515  if (!g->relayoutpending) return;
     516  g->relayoutpending = 0;
     517
    510518  owl_function_debugmsg("Relayouting...");
    511519
  • owl.c

    r1cfcab7 rf7cf6c2  
    618618    /* if a resize has been scheduled, deal with it */
    619619    owl_global_resize(&g, 0, 0);
    620 
    621     /* these are here in case a resize changes the windows */
     620    /* also handle relayouts */
     621    owl_global_relayout(&g);
     622
     623    /* these are here in case a relayout changes the windows */
    622624    sepwin=owl_global_get_curs_sepwin(&g);
    623625    typwin=owl_global_get_curs_typwin(&g);
  • owl.h

    r7892963 rf7cf6c2  
    569569  int rightshift;
    570570  volatile sig_atomic_t resizepending;
     571  int relayoutpending;
    571572  int recwinlines;
    572573  char *thishost;
Note: See TracChangeset for help on using the changeset viewer.