Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
172:a38aed19690b | 173:8eaf7971accc |
---|---|
1947 ****************************************************************************/ | 1947 ****************************************************************************/ |
1948 static void | 1948 static void |
1949 x_clear_region (Lisp_Object locale, face_index findex, int x, int y, | 1949 x_clear_region (Lisp_Object locale, face_index findex, int x, int y, |
1950 int width, int height) | 1950 int width, int height) |
1951 { | 1951 { |
1952 struct window *w = 0; | 1952 struct window *w = NULL; |
1953 struct frame *f = 0; | 1953 struct frame *f = NULL; |
1954 struct device *d; | 1954 struct device *d; |
1955 Lisp_Object background_pixmap; | 1955 Lisp_Object background_pixmap; |
1956 | 1956 |
1957 Display *dpy; | 1957 Display *dpy; |
1958 Window x_win; | 1958 Window x_win; |
1962 w = XWINDOW (locale); | 1962 w = XWINDOW (locale); |
1963 f = XFRAME (w->frame); | 1963 f = XFRAME (w->frame); |
1964 } | 1964 } |
1965 else if (FRAMEP (locale)) | 1965 else if (FRAMEP (locale)) |
1966 { | 1966 { |
1967 w = 0; | 1967 w = NULL; |
1968 f = XFRAME (locale); | 1968 f = XFRAME (locale); |
1969 } | 1969 } |
1970 else | 1970 else |
1971 abort (); | 1971 abort (); |
1972 | 1972 |
1975 x_win = XtWindow (FRAME_X_TEXT_WIDGET (f)); | 1975 x_win = XtWindow (FRAME_X_TEXT_WIDGET (f)); |
1976 | 1976 |
1977 /* #### This function is going to have to be made cursor aware. */ | 1977 /* #### This function is going to have to be made cursor aware. */ |
1978 if (width && height) | 1978 if (width && height) |
1979 { | 1979 { |
1980 int values_set = 0; | 1980 GC gc = NULL; |
1981 GC gc; | |
1982 | 1981 |
1983 /* #### This isn't quite right for when this function is called | 1982 /* #### This isn't quite right for when this function is called |
1984 from the toolbar code. */ | 1983 from the toolbar code. */ |
1985 background_pixmap = Qunbound; | 1984 background_pixmap = Qunbound; |
1986 | 1985 |
2029 { | 2028 { |
2030 fcolor = FACE_FOREGROUND (Vdefault_face, locale); | 2029 fcolor = FACE_FOREGROUND (Vdefault_face, locale); |
2031 bcolor = FACE_BACKGROUND (Vdefault_face, locale); | 2030 bcolor = FACE_BACKGROUND (Vdefault_face, locale); |
2032 } | 2031 } |
2033 | 2032 |
2034 gc = x_get_gc (d, Qnil, fcolor, bcolor, background_pixmap, | 2033 gc = x_get_gc (d, Qnil, fcolor, bcolor, background_pixmap, Qnil); |
2035 Qnil); | |
2036 values_set = 1; | |
2037 } | 2034 } |
2038 else | 2035 else |
2039 { | 2036 { |
2040 Lisp_Object color; | 2037 Lisp_Object color = (w ? |
2038 WINDOW_FACE_CACHEL_BACKGROUND (w, findex) : | |
2039 FACE_BACKGROUND (Vdefault_face, locale)); | |
2041 | 2040 |
2042 if (UNBOUNDP (background_pixmap)) | 2041 if (UNBOUNDP (background_pixmap)) |
2043 background_pixmap = Qnil; | 2042 background_pixmap = Qnil; |
2044 | 2043 |
2045 if (w) | 2044 gc = x_get_gc (d, Qnil, color, Qnil, background_pixmap, Qnil); |
2046 color = WINDOW_FACE_CACHEL_BACKGROUND (w, findex); | |
2047 else | |
2048 color = FACE_BACKGROUND (Vdefault_face, locale); | |
2049 | |
2050 gc = x_get_gc (d, Qnil, color, Qnil, background_pixmap, | |
2051 Qnil); | |
2052 values_set = 1; | |
2053 } | 2045 } |
2054 } | 2046 } |
2055 | 2047 |
2056 if (values_set) | 2048 if (gc) |
2057 { | 2049 XFillRectangle (dpy, x_win, gc, x, y, width, height); |
2058 XFillRectangle (dpy, x_win, gc, x, y, width, height); | |
2059 } | |
2060 else | 2050 else |
2061 { | 2051 XClearArea (dpy, x_win, x, y, width, height, False); |
2062 XClearArea (dpy, x_win, x, y, width, height, False); | |
2063 } | |
2064 } | 2052 } |
2065 } | 2053 } |
2066 | 2054 |
2067 /***************************************************************************** | 2055 /***************************************************************************** |
2068 x_output_eol_cursor | 2056 x_output_eol_cursor |