2018-03-07 17:58:39 +01:00
|
|
|
Index: pidgin-2.12.0/finch/libgnt/gntwm.c
|
2015-09-19 06:52:39 +02:00
|
|
|
===================================================================
|
2018-03-07 17:58:39 +01:00
|
|
|
--- pidgin-2.12.0.orig/finch/libgnt/gntwm.c
|
|
|
|
+++ pidgin-2.12.0/finch/libgnt/gntwm.c
|
2015-09-19 06:52:39 +02:00
|
|
|
@@ -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;
|
2018-03-07 17:58:39 +01:00
|
|
|
+ sx = getbegx(panel_window(panel));
|
|
|
|
+ ex = getmaxx(panel_window(panel)) + sx;
|
|
|
|
+ sy = getbegy(panel_window(panel));
|
|
|
|
+ ey = getmaxy(panel_window(panel)) + sy;
|
2015-09-19 06:52:39 +02:00
|
|
|
|
|
|
|
while ((below = panel_below(below)) != NULL) {
|
|
|
|
- if (sy > below->win->_begy + below->win->_maxy ||
|
|
|
|
- ey < below->win->_begy)
|
2018-03-07 17:58:39 +01:00
|
|
|
+ if (sy > getbegy(panel_window(below)) + getmaxy(panel_window(below)) ||
|
|
|
|
+ ey < getbegy(panel_window(below)))
|
2015-09-19 06:52:39 +02:00
|
|
|
continue;
|
|
|
|
- if (sx > below->win->_begx + below->win->_maxx ||
|
|
|
|
- ex < below->win->_begx)
|
2018-03-07 17:58:39 +01:00
|
|
|
+ if (sx > getbegx(panel_window(below)) + getmaxx(panel_window(below)) ||
|
|
|
|
+ ex < getbegx(panel_window(below)))
|
2015-09-19 06:52:39 +02:00
|
|
|
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)
|
2018-03-07 17:58:39 +01:00
|
|
|
+ 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)
|
2015-09-19 06:52:39 +02:00
|
|
|
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);
|
2018-03-07 17:58:39 +01:00
|
|
|
+ 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);
|
2015-09-19 06:52:39 +02:00
|
|
|
}
|
|
|
|
right:
|
|
|
|
- if (mvwin_wch(below->win, y - below->win->_begy, ex + 1 - below->win->_begx, &ch) != OK)
|
2018-03-07 17:58:39 +01:00
|
|
|
+ if (mvwin_wch(panel_window(below), y - getbegy(panel_window(below)), ex + 1 - getbegx(panel_window(below)), &ch) != OK)
|
2015-09-19 06:52:39 +02:00
|
|
|
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);
|
2018-03-07 17:58:39 +01:00
|
|
|
+ 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);
|
2015-09-19 06:52:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|