Index: pidgin-2.12.0/finch/libgnt/gntwm.c =================================================================== --- pidgin-2.12.0.orig/finch/libgnt/gntwm.c +++ pidgin-2.12.0/finch/libgnt/gntwm.c @@ -174,37 +174,37 @@ work_around_for_ncurses_bug(void) cchar_t ch; PANEL *below = panel; - sx = panel->win->_begx; - ex = panel->win->_maxx + sx; - sy = panel->win->_begy; - ey = panel->win->_maxy + sy; + sx = getbegx(panel_window(panel)); + ex = getmaxx(panel_window(panel)) + sx; + sy = getbegy(panel_window(panel)); + ey = getmaxy(panel_window(panel)) + sy; while ((below = panel_below(below)) != NULL) { - if (sy > below->win->_begy + below->win->_maxy || - ey < below->win->_begy) + if (sy > getbegy(panel_window(below)) + getmaxy(panel_window(below)) || + ey < getbegy(panel_window(below))) continue; - if (sx > below->win->_begx + below->win->_maxx || - ex < below->win->_begx) + if (sx > getbegx(panel_window(below)) + getmaxx(panel_window(below)) || + ex < getbegx(panel_window(below))) continue; - for (y = MAX(sy, below->win->_begy); y <= MIN(ey, below->win->_begy + below->win->_maxy); y++) { - if (mvwin_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch) != OK) + for (y = MAX(sy, getbegy(panel_window(below))); y <= MIN(ey, getbegy(panel_window(below)) + getmaxy(panel_window(below))); y++) { + if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch) != OK) goto right; w = widestringwidth(ch.chars); if (w > 1 && (ch.attr & 1)) { ch.chars[0] = ' '; ch.attr &= ~ A_CHARTEXT; - mvwadd_wch(below->win, y - below->win->_begy, sx - 1 - below->win->_begx, &ch); - touchline(below->win, y - below->win->_begy, 1); + mvwadd_wch(panel_window(below), y - getbegy(panel_window(below)), sx - 1 - getbegx(panel_window(below)), &ch); + touchline(panel_window(below), y - getbegy(panel_window(below)), 1); } right: - if (mvwin_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch) != OK) + if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), ex + 1 - getbegx(panel_window(below)), &ch) != OK) continue; w = widestringwidth(ch.chars); if (w > 1 && !(ch.attr & 1)) { ch.chars[0] = ' '; ch.attr &= ~ A_CHARTEXT; - mvwadd_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch); - touchline(below->win, y - below->win->_begy, 1); + mvwadd_wch(panel_window(below), y - getbegy(panel_window(below)), ex + 1 - getbegx(panel_window(below)), &ch); + touchline(panel_window(below), y - getbegy(panel_window(below)), 1); } } }