Changeset f91767d for window.c


Ignore:
Timestamp:
Jun 2, 2010, 9:41:22 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:
d15ea5f
Parents:
678a505c
Message:
untouchwin any subwin before interacting with it

subwins maintain dirtiness information that is useless. It messes up the
wnoutrefresh when setting the cursor. Also, make the wsyncup more
direct.

I think there is still a cursor bug with begy/begx and subwins and
mvderwin, but that can be fixed later.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • window.c

    r678a505c rf91767d  
    4242static void _owl_window_unrealize(owl_window *w);
    4343
    44 static void _owl_window_redraw_cleanup(owl_window *w, WINDOW *win);
    45 
    4644static owl_window *cursor_owner;
    4745
     
    5654  gobject_class->finalize = owl_window_finalize;
    5755
    58   klass->redraw = _owl_window_redraw_cleanup;
     56  klass->redraw = NULL;
    5957  klass->resized = NULL;
    6058
     
    362360  if (!w->dirty) return;
    363361  if (w->win) {
     362    if (!owl_window_is_toplevel(w)) {
     363      /* If a subwin, we might have gotten random touched lines from wsyncup or
     364       * past drawing. That information is useless, so we discard it all */
     365      untouchwin(w->win);
     366    }
    364367    g_signal_emit(w, window_signals[REDRAW], 0, w->win);
     368    wsyncup(w->win);
    365369  }
    366370  w->dirty = 0;
     
    383387  _owl_window_redraw_subtree(owl_window_get_screen());
    384388  update_panels();
    385   if (cursor_owner && cursor_owner->win)
     389  if (cursor_owner && cursor_owner->win) {
     390    /* untouch it to avoid drawing; window should be clean now, but we must
     391     * clean up in case there was junk left over on a subwin (cleaning up after
     392     * subwin drawing isn't sufficient because a wsyncup messes up subwin
     393     * ancestors */
     394    untouchwin(cursor_owner->win);
    386395    wnoutrefresh(cursor_owner->win);
    387 }
    388 
    389 static void _owl_window_redraw_cleanup(owl_window *w, WINDOW *win)
    390 {
    391   wsyncup(win);
     396  }
    392397}
    393398
Note: See TracChangeset for help on using the changeset viewer.