Changeset ab88b05 for global.c


Ignore:
Timestamp:
Jan 23, 2012, 5:27:42 PM (9 years ago)
Author:
Jason Gross <jgross@mit.edu>
Branches:
master, release-1.9
Children:
219f52c
Parents:
8135737
git-author:
Jason Gross <jgross@mit.edu> (07/23/11 22:33:17)
git-committer:
Jason Gross <jgross@mit.edu> (01/23/12 17:27:42)
Message:
Allocate the mainwin on the heap

This lets us return NULL from owl_global_get_mainwin before the mainwin
has been initilized.

Since g has static duration, g.mw is automatically initialized to NULL.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r9078f69 rab88b05  
    109109
    110110  /* Create the widgets */
    111   owl_mainwin_init(&(g->mw), g->mainpanel.recwin);
     111  g->mw = owl_mainwin_new(g->mainpanel.recwin);
    112112  owl_msgwin_init(&(g->msgwin), g->mainpanel.msgwin);
    113113  owl_sepbar_init(g->mainpanel.sepwin);
     
    241241/* windows */
    242242
    243 owl_mainwin *owl_global_get_mainwin(owl_global *g) {
    244   return(&(g->mw));
     243owl_mainwin *owl_global_get_mainwin(owl_global *g)
     244{
     245  return g->mw;
    245246}
    246247
Note: See TracChangeset for help on using the changeset viewer.