Mercurial > hg > xemacs-beta
diff src/redisplay-x.c @ 173:8eaf7971accc r20-3b13
Import from CVS: tag r20-3b13
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:49:09 +0200 |
parents | 5a88923fcbfe |
children | e121b013d1f0 |
line wrap: on
line diff
--- a/src/redisplay-x.c Mon Aug 13 09:47:55 2007 +0200 +++ b/src/redisplay-x.c Mon Aug 13 09:49:09 2007 +0200 @@ -1949,8 +1949,8 @@ x_clear_region (Lisp_Object locale, face_index findex, int x, int y, int width, int height) { - struct window *w = 0; - struct frame *f = 0; + struct window *w = NULL; + struct frame *f = NULL; struct device *d; Lisp_Object background_pixmap; @@ -1964,7 +1964,7 @@ } else if (FRAMEP (locale)) { - w = 0; + w = NULL; f = XFRAME (locale); } else @@ -1977,8 +1977,7 @@ /* #### This function is going to have to be made cursor aware. */ if (width && height) { - int values_set = 0; - GC gc; + GC gc = NULL; /* #### This isn't quite right for when this function is called from the toolbar code. */ @@ -2031,36 +2030,25 @@ bcolor = FACE_BACKGROUND (Vdefault_face, locale); } - gc = x_get_gc (d, Qnil, fcolor, bcolor, background_pixmap, - Qnil); - values_set = 1; + gc = x_get_gc (d, Qnil, fcolor, bcolor, background_pixmap, Qnil); } else { - Lisp_Object color; + Lisp_Object color = (w ? + WINDOW_FACE_CACHEL_BACKGROUND (w, findex) : + FACE_BACKGROUND (Vdefault_face, locale)); if (UNBOUNDP (background_pixmap)) background_pixmap = Qnil; - if (w) - color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); - else - color = FACE_BACKGROUND (Vdefault_face, locale); - - gc = x_get_gc (d, Qnil, color, Qnil, background_pixmap, - Qnil); - values_set = 1; + gc = x_get_gc (d, Qnil, color, Qnil, background_pixmap, Qnil); } } - if (values_set) - { - XFillRectangle (dpy, x_win, gc, x, y, width, height); - } + if (gc) + XFillRectangle (dpy, x_win, gc, x, y, width, height); else - { - XClearArea (dpy, x_win, x, y, width, height, False); - } + XClearArea (dpy, x_win, x, y, width, height, False); } }