(svn r7202) -Codechange: Move _viewports and _active_viewports local to viewport.c and have them

called from the appropiate places in window.c
This commit is contained in:
Darkvater
2006-11-18 13:54:33 +00:00
parent a448474f21
commit 62a9d7fdf3
3 changed files with 24 additions and 14 deletions

View File

@@ -302,11 +302,7 @@ void DeleteWindow(Window *w)
w = FindWindowById(wc, wn);
if (w->viewport != NULL) {
CLRBIT(_active_viewports, w->viewport - _viewports);
w->viewport->width = 0;
w->viewport = NULL;
}
if (w->viewport != NULL) DeleteWindowViewport(w);
SetWindowDirty(w);
@@ -832,8 +828,7 @@ void InitWindowSystem(void)
memset(&_windows, 0, sizeof(_windows));
_last_window = _windows;
memset(_viewports, 0, sizeof(_viewports));
_active_viewports = 0;
InitViewports();
_no_scroll = 0;
}