From bd582fba62869dec9dfd1a6efb6888f64601c4b0 Mon Sep 17 00:00:00 2001 From: pcg Date: Sat, 31 Jan 2004 02:14:55 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 1 + autoconf/configure.in | 8 -------- src/init.C | 15 ++++++++------- src/rxvt.h | 3 --- src/rxvtlib.h.in | 2 +- src/screen.C | 11 +++++------ src/scrollbar.C | 10 +++++----- src/version.h | 6 +++--- src/xpm.C | 5 +++-- 9 files changed, 26 insertions(+), 35 deletions(-) diff --git a/Changes b/Changes index 2e48883..d96e819 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ 1.8 - almost total conversion to C++. Except for introducing new bugs, this should not change much. + - fix and re-enable background pixmap and inherit pixmap support. 1.7 Fri Jan 30 16:50:11 CET 2004 - further cleanups. diff --git a/autoconf/configure.in b/autoconf/configure.in index 97ca1db..14b6f27 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -106,14 +106,6 @@ AC_ARG_ENABLE(everything, fi]) echo -if test x$support_inheritpixmap = xyes; then - support_inheritpixmap=no - echo "******* transparency support disabled, does not work" -fi -if test x$support_xpm = xyes; then - support_xpm=no - echo "******* pixmap support disabled, does not work" -fi if test x$support_menubar = xyes; then support_menubar=no echo "******* menubar support disabled, does not work" diff --git a/src/init.C b/src/init.C index 86d191a..b97f966 100644 --- a/src/init.C +++ b/src/init.C @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: init.c *----------------------------------------------------------------------* - * $Id: init.C,v 1.20 2004-01-31 00:20:21 pcg Exp $ + * $Id: init.C,v 1.21 2004-01-31 02:14:58 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1992 John Bovey, University of Kent at Canterbury @@ -1002,25 +1002,26 @@ rxvt_term::Get_Colours () xcol[1] = PixColors[Color_scroll]; # ifdef PREFER_24BIT - xcol[0].set (R, 65535, 65535, 65535); + xcol[0].set (this, 65535, 65535, 65535); /* XFreeColors(Xdisplay, XCMAP, &(xcol[0].pixel), 1, ~0); */ # else - xcol[0].set (WhitePixel(Xdisplay, Xscreen)); + xcol[0].set (this, WhitePixel (Xdisplay, Xscreen)); # endif unsigned short pr1, pg1, pb1, pr0, pg0, pb0; - xcol[0].get (R, pr0, pg0, pb0); - xcol[1].get (R, pr1, pg1, pb1); + xcol[0].get (this, pr0, pg0, pb0); + xcol[1].get (this, pr1, pg1, pb1); /* bottomShadowColor */ - if (!xcol[2].set (pr1 / 2, pg1 / 2, pb1 / 2)) + if (!xcol[2].set (this, pr1 / 2, pg1 / 2, pb1 / 2)) xcol[2] = PixColors[Color_Black]; PixColors[Color_bottomShadow] = xcol[2]; /* topShadowColor */ - if (!xcol[1].set ( min (pr0, max (pr0 / 5, pr1) * 7 / 5), + if (!xcol[1].set (this, + min (pr0, max (pr0 / 5, pr1) * 7 / 5), min (pg0, max (pg0 / 5, pg1) * 7 / 5), min (pb0, max (pb0 / 5, pb1) * 7 / 5))) xcol[1] = PixColors[Color_White]; diff --git a/src/rxvt.h b/src/rxvt.h index 748b922..592694c 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -1294,20 +1294,17 @@ struct rxvt_term : rxvt_vars { void init_scrollbar_stuff (); void drawBevel (Drawable d, int x1, int y1, int w, int h); int scrollbar_show_next (int update, int last_top, int last_bot, int scrollbar_len); -# define scrollbar_update scrollbar_show_next // HACK #endif #if defined(RXVT_SCROLLBAR) // scrollbar-rxvt.C void Draw_button (int x, int y, int state, int dirn); int scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len); -# define scrollbar_update scrollbar_show_rxvt // HACK #endif #if defined(XTERM_SCROLLBAR) // scrollbar-xterm.C int scrollbar_show_xterm (int update, int last_top, int last_bot, int scrollbar_len); -# define scrollbar_update scrollbar_show_xterm // HACK #endif // scrollbar.C diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in index baeffc5..5801c1a 100644 --- a/src/rxvtlib.h.in +++ b/src/rxvtlib.h.in @@ -249,7 +249,7 @@ typedef struct { short style; /* style: rxvt, xterm, next */ short width; /* scrollbar width */ Window win; - //int (*update)(int, int, int, int); + int (rxvt_term::*update)(int, int, int, int); void setIdle() { state = 1 ; } void setMotion() { state = 'm'; } diff --git a/src/screen.C b/src/screen.C index 62daade..62c0985 100644 --- a/src/screen.C +++ b/src/screen.C @@ -1873,10 +1873,10 @@ rxvt_term::scr_refresh (unsigned char refresh_type) refresh_type &= ~REFRESH_BOUNDS; } -#if defined(XPM_BACKGROUND) +#ifdef XPM_BACKGROUND must_clear |= (bgPixmap.pixmap != None); #endif -#if defined(TRANSPARENT) +#ifdef TRANSPARENT must_clear |= ((Options & Opt_transparent) && am_transparent); #endif ocrow = oldcursor.row; /* is there an old outline cursor on screen? */ @@ -2168,15 +2168,14 @@ rxvt_term::scr_refresh (unsigned char refresh_type) { if (must_clear) { + CLEAR_CHARS (xpixel, ypixel, count); + for (i = 0; i < count; i++) /* don't draw empty strings */ if (text[i] != ' ') { font->draw (xpixel, ypixel, text, count, fore, -1); - goto nodraw; + break; } - - CLEAR_CHARS (xpixel, ypixel, count); -nodraw: ; } else font->draw (xpixel, ypixel, text, count, fore, Color_bg); diff --git a/src/scrollbar.C b/src/scrollbar.C index 3343152..cd958b3 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: scrollbar.c *----------------------------------------------------------------------* - * $Id: scrollbar.C,v 1.8 2004-01-31 00:20:21 pcg Exp $ + * $Id: scrollbar.C,v 1.9 2004-01-31 02:15:02 pcg Exp $ * * Copyright (c) 1997,1998 mj olesen * Copyright (c) 1998 Alfredo K. Kojima @@ -74,21 +74,21 @@ rxvt_term::resize_scrollbar () if (scrollBar.style == R_SB_XTERM) { scrollBar.beg = R_SCROLLBEG_XTERM; scrollBar.end = R_SCROLLEND_XTERM; - //scrollBar.update = rxvt_scrollbar_show_xterm; + scrollBar.update = &rxvt_term::scrollbar_show_xterm; } #endif #if defined(NEXT_SCROLLBAR) if (scrollBar.style == R_SB_NEXT) { scrollBar.beg = R_SCROLLBEG_NEXT; scrollBar.end = R_SCROLLEND_NEXT; - //scrollBar.update = rxvt_scrollbar_show_next; + scrollBar.update = &rxvt_term::scrollbar_show_next; } #endif #if defined(RXVT_SCROLLBAR) if (scrollBar.style == R_SB_RXVT) { scrollBar.beg = R_SCROLLBEG_RXVT; scrollBar.end = R_SCROLLEND_RXVT; - //scrollBar.update = rxvt_scrollbar_show_rxvt; + scrollBar.update = &rxvt_term::scrollbar_show_rxvt; } #endif @@ -148,7 +148,7 @@ rxvt_term::scrollbar_show (int update) return 0; } - ret = scrollbar_update (update, last_top, last_bot, scrollbar_len); + ret = (this->*scrollBar.update) (update, last_top, last_bot, scrollbar_len); last_top = scrollBar.top; last_bot = scrollBar.bot; diff --git a/src/version.h b/src/version.h index 3f88c13..58e9151 100644 --- a/src/version.h +++ b/src/version.h @@ -1,5 +1,5 @@ -#define VERSION "1.7" -#define VSTRING "10700" +#define VERSION "1.8" +#define VSTRING "10800" #define DATE "2004-01-30" #define LSMDATE "30JAN04" -#define LIBVERSION "1:7:0" +#define LIBVERSION "1:8:0" diff --git a/src/xpm.C b/src/xpm.C index cd5b6f3..77e0608 100644 --- a/src/xpm.C +++ b/src/xpm.C @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: xpm.c *----------------------------------------------------------------------* - * $Id: xpm.C,v 1.5 2004-01-31 00:20:21 pcg Exp $ + * $Id: xpm.C,v 1.6 2004-01-31 02:15:02 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1997 Carsten Haitzler @@ -245,7 +245,8 @@ rxvt_term::resize_pixmap () * Calculate tiling sizes and increments * At start, p == 0, incr == xpmwidthheight */ -void +/* INTPROTO */ +static void rxvt_pixmap_incr(unsigned int *wh, unsigned int *xy, float *incr, float *p, unsigned int widthheight, unsigned int xpmwidthheight) { unsigned int cwh, cxy; -- 1.9.1