Changeset 719173c4 for global.c


Ignore:
Timestamp:
Apr 28, 2010, 2:27:59 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:
fe4c786
Parents:
06cc8d9
git-author:
David Benjamin <davidben@mit.edu> (04/28/10 13:58:50)
git-committer:
David Benjamin <davidben@mit.edu> (04/28/10 14:27:59)
Message:
Recreate the popwin on relayout

This should fix redraws when resizing. We don't actually need to do it
on every relayout, but I think that should wait until owl_window. The
actual logic we want is probably something like parent-changed =>
relayout-children.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r0e3cdf1 r719173c4  
    511511
    512512void owl_global_relayout(owl_global *g) {
     513  owl_popwin *pw;
     514  owl_viewwin *vw;
     515
    513516  if (!g->relayoutpending) return;
    514517  g->relayoutpending = 0;
     
    525528   * screen */
    526529  owl_function_calculate_topmsg(OWL_DIRECTION_NONE);
     530
     531  /* recreate the popwin */
     532  pw = owl_global_get_popwin(g);
     533  if (owl_popwin_is_active(pw)) {
     534    /*
     535     * This is somewhat hacky; we probably want a proper windowing layer. We
     536     * destroy the popwin and recreate it. Then the viewwin is redirected to
     537     * the new window.
     538     */
     539    vw = owl_global_get_viewwin(g);
     540    owl_popwin_close(pw);
     541    owl_popwin_up(pw);
     542    owl_viewwin_set_curswin(vw, owl_popwin_get_curswin(pw),
     543        owl_popwin_get_lines(pw), owl_popwin_get_cols(pw));
     544    owl_viewwin_redisplay(vw);
     545  }
    527546
    528547  /* refresh stuff */
Note: See TracChangeset for help on using the changeset viewer.