Changeset b9d04ad for window.c


Ignore:
Timestamp:
Jun 20, 2010, 4:27:48 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:
1f4ea57
Parents:
9379760
Message:
Remove the giant hunk of dead code

We have version control for a reason.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • window.c

    r9379760 rb9d04ad  
    461461void owl_window_move(owl_window *w, int begin_y, int begin_x)
    462462{
     463  /* It is possible to move a window efficiently with move_panel and mvderwin,
     464   * but begy and begx are then wrong. Currently, this only effects the
     465   * wnoutrefresh to move cursor. TODO: fix that and reinstate that
     466   * optimization if it's worth the trouble */
    463467  owl_window_set_position(w, w->nlines, w->ncols, begin_y, begin_x);
    464 #if 0
    465   /* This routine tries to move a window efficiently, but begy and begx are
    466    * then wrong. Currently, this only effects the wnoutrefresh to move cursor.
    467    * TODO: fix that and reinstate this code if it's worth the trouble */
    468   if (w->is_screen) return; /* can't move the screen */
    469   if (w->begin_y == begin_y && w->begin_x == begin_x) return;
    470 
    471   w->begin_y = begin_y;
    472   w->begin_x = begin_x;
    473   if (w->shown) {
    474     /* Window is shown, we must try to have a window at the end */
    475     if (w->win) {
    476       /* We actually do have a window; let's move it */
    477       if (w->pan) {
    478         if (move_panel(w->pan, begin_y, begin_x) == OK)
    479           return;
    480       } else {
    481         if (mvderwin(w->win, begin_y, begin_x) == OK) {
    482           /* now both we and the parent are dirty */
    483           owl_window_dirty(w->parent);
    484           owl_window_dirty(w);
    485           return;
    486         }
    487       }
    488     }
    489     /* We don't have a window or failed to move it. Fine. Brute force. */
    490     _owl_window_unrealize(w);
    491     _owl_window_realize(w);
    492   }
    493 #endif
    494468}
    495469
Note: See TracChangeset for help on using the changeset viewer.