*** empty log message ***
authorroot <root>
Wed, 23 Jan 2008 06:49:30 +0000 (06:49 +0000)
committerroot <root>
Wed, 23 Jan 2008 06:49:30 +0000 (06:49 +0000)
src/rxvtfont.C
src/screen.C

index 67f3f305743b5f30b44a83c9194f5c776877b5e8..2c6742eb13591916bf4436c9a4fdf96623fea821 100644 (file)
@@ -239,10 +239,12 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color)
     {
 #if XFT
       bool done = false;
-#ifdef HAVE_BG_PIXMAP
-      if (term->bgPixmap.pixmap && color >= 0 && term->pix_colors[color].c.color.alpha < 0x0ff00)
+
+# ifdef HAVE_BG_PIXMAP
+      if (term->bgPixmap.pixmap && color >= 0 && !term->pix_colors[color].is_opaque ())
         {
           Picture dst = XftDrawPicture (d);
+
           if (dst != 0)
             {
               XClearArea (disp, d, x, y, w, h, false);
@@ -251,9 +253,10 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color)
               done = true;
             }
         }
-#endif
+# endif
       if (!done)
         XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h);
+
 #else
       XSetForeground (disp, gc, term->pix_colors[color]);
       XFillRectangle (disp, d, gc, x, y, w, h);
index cb4ff5174ab1e8c5cff576f1d47ac3d29fb7c8b7..554e05b235e363f18b0c12cbbf4b520cca81df0d 100644 (file)
@@ -89,24 +89,22 @@ static inline void fill_text (text_t *start, text_t value, int len)
  * CLEAR_CHARS: clear <num> chars starting from pixel position <x,y>
  * ERASE_ROWS : set <num> rows starting from row <row> to the foreground colour
  */
-#define drawBuffer      vt
-
 #define CLEAR_ROWS(row, num)                                           \
-    if (mapped)                                                \
-        XClearArea (dpy, drawBuffer, 0,                   \
-                    Row2Pixel (row), (unsigned int)width,      \
+    if (mapped)                                                        \
+        XClearArea (dpy, vt, 0,                                        \
+                    Row2Pixel (row), (unsigned int)width,              \
                     (unsigned int)Height2Pixel (num), False)
 
 #define CLEAR_CHARS(x, y, num)                                         \
-    if (mapped)                                                \
-        XClearArea (dpy, drawBuffer, x, y,                \
+    if (mapped)                                                        \
+        XClearArea (dpy, vt, x, y,                                     \
                     (unsigned int)Width2Pixel (num),                   \
                     (unsigned int)Height2Pixel (1), False)
 
 #define ERASE_ROWS(row, num)                                           \
-    XFillRectangle (dpy, drawBuffer, gc,          \
+    XFillRectangle (dpy, vt, gc,                                       \
                     0, Row2Pixel (row),                                \
-                    (unsigned int)width,                       \
+                    (unsigned int)width,                               \
                     (unsigned int)Height2Pixel (num))
 
 /* ------------------------------------------------------------------------- *
@@ -2377,7 +2375,7 @@ rxvt_term::scr_refresh () NOTHROW
 #endif
                 XSetForeground (dpy, gc, pix_colors[fore]);
 
-              XDrawLine (dpy, drawBuffer, gc,
+              XDrawLine (dpy, vt, gc,
                          xpixel, ypixel + font->ascent + 1,
                          xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1);
             }
@@ -2425,7 +2423,7 @@ rxvt_term::scr_refresh () NOTHROW
 #endif
             XSetForeground (dpy, gc, pix_colors[ccol1]);
 
-          XDrawRectangle (dpy, drawBuffer, gc,
+          XDrawRectangle (dpy, vt, gc,
                           Col2Pixel (col),
                           Row2Pixel (oldcursor.row),
                           (unsigned int) (Width2Pixel (cursorwidth) - 1),