--- rxvt-unicode/src/rxvtperl.xs 2008/08/22 15:36:45 1.125 +++ rxvt-unicode/src/rxvtperl.xs 2008/11/05 14:43:54 1.126 @@ -109,13 +109,11 @@ #define SvOVERLAY(sv) (overlay *)SvPTR (sv, "urxvt::overlay") -class overlay { +class overlay : overlay_base +{ rxvt_term *THIS; AV *overlay_av; - int x, y, w, h; int border; - text_t **text; - rend_t **rend; public: HV *self; @@ -132,8 +130,13 @@ }; overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border) -: THIS(THIS), x(x_), y(y_), w(w_), h(h_), border(border == 2), overlay_av (0) +: THIS(THIS), border(border == 2), overlay_av (0) { + x = x_; + y = y_; + w = w_; + h = h_; + if (w < 0) w = 0; if (h < 0) h = 0; @@ -247,6 +250,11 @@ int ov_w = min (w, THIS->ncol - ov_x); int ov_h = min (h, THIS->nrow - ov_y); + // hide cursor if it is within the overlay area + if (IN_RANGE_EXC (THIS->screen.cur.col - ov_x, 0, ov_w) + && IN_RANGE_EXC (THIS->screen.cur.row - ov_y, 0, ov_h)) + THIS->screen.flags &= ~Screen_VisibleCursor; + for (int y = ov_h; y--; ) { text_t *t1 = text [y];