X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=blobdiff_plain;f=windows.c;h=8b82d60a1aac1007a0748fc3186cc26210d2c46d;hb=e0f6898722d88af212b9fd658aa8a54226deabc3;hp=01981e5e883cd6372b5e90c404d164587798695f;hpb=b076502bbd602e544bd58e7b33fb76cf3c43b624;p=plomrogue diff --git a/windows.c b/windows.c index 01981e5..8b82d60 100644 --- a/windows.c +++ b/windows.c @@ -7,8 +7,8 @@ struct WinMeta init_win_meta (WINDOW * screen) { // Create and populate WinMeta struct with sane default values. struct WinMeta win_meta; win_meta.screen = screen; - win_meta.height = screen->_maxy + 1; - win_meta.width = screen->_maxx + 1; + win_meta.height = getmaxy(screen); + win_meta.width = getmaxx(screen); win_meta.chain_start = 0; win_meta.chain_end = 0; win_meta.pad_offset = 0; @@ -151,14 +151,9 @@ void draw_windows_borders (struct Win * win, struct Win * win_active, struct Cor if (0 != win->next) { draw_windows_borders (win->next, win_active, corners, ccount + 1); } } -void draw_window(struct Win * win) { -// Draw window content if visible. - if (win->height > 1 && win->width > 1) ; - win->draw(win); } - void draw_windows (struct Win * win) { // Draw contents of all windows in window chain from win on. - draw_window(win); + win->draw(win); if (0 != win->next) { draw_windows (win->next); } }