Changeset 5f0bcde for window.c


Ignore:
Timestamp:
Sep 18, 2010, 5:07:40 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
4811422
Parents:
38e2250
git-author:
David Benjamin <davidben@mit.edu> (08/15/10 16:14:27)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 17:07:40)
Message:
Make the check for _owl_window_realize more readable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • window.c

    r38e2250 r5f0bcde  
    322322}
    323323
     324static bool _owl_window_should_realize(owl_window *w)
     325{
     326  return owl_window_is_shown(w) &&
     327    (!w->parent || owl_window_is_realized(w->parent));
     328}
     329
    324330static void _owl_window_realize(owl_window *w)
    325331{
    326332  /* check if we can create a window */
    327   if ((w->parent && w->parent->win == NULL)
    328       || !w->shown
    329       || w->win != NULL)
     333  if (owl_window_is_realized(w) || !_owl_window_should_realize(w))
    330334    return;
    331335  if (w->nlines <= 0 || w->ncols <= 0)
Note: See TracChangeset for help on using the changeset viewer.