Changeset 9eb38bb for popexec.c


Ignore:
Timestamp:
Sep 18, 2010, 5:07:39 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:
d574d61
Parents:
8ee712e0
git-author:
David Benjamin <davidben@mit.edu> (08/01/10 14:09:34)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 17:07:39)
Message:
Likewise, don't reuse a global owl_viewwin

This means we don't have to support plugging and unplugging that thing
over and over. We also can almost entirely drop the global owl_viewwin.
Most of the code gets it from the context anyway.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • popexec.c

    r03ca005 r9eb38bb  
    1717  pid_t pid;
    1818
    19   if (owl_global_get_popwin(&g)) {
     19  if (owl_global_get_popwin(&g) || owl_global_get_viewwin(&g)) {
    2020    owl_function_error("Popwin already in use.");
    2121    return NULL;
     
    2828  pe->refcount=0;
    2929
    30   pe->vwin=v=owl_global_get_viewwin(&g);
    3130  pw = owl_popwin_new();
    3231  owl_global_set_popwin(&g, pw);
    3332  owl_popwin_up(pw);
     33  pe->vwin = v = owl_viewwin_new_text(owl_popwin_get_content(pw), "");
     34  owl_global_set_viewwin(&g, v);
     35  owl_viewwin_set_onclose_hook(v, owl_popexec_viewwin_onclose, pe);
    3436
    3537  owl_global_push_context(&g, OWL_CTX_POPLESS, v, "popless", NULL);
    36   owl_viewwin_init_text(v, owl_popwin_get_content(pw), "");
    37   owl_viewwin_set_onclose_hook(v, owl_popexec_viewwin_onclose, pe);
    3838  pe->refcount++;
    3939
Note: See TracChangeset for help on using the changeset viewer.