comparison src/faces.c @ 5625:6fa0c5fb6154

One comment. -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2011-12-27 Didier Verna <didier@xemacs.org> * faces.c: Add a comment about the way background pixmaps are handled right now, just above MAYBE_UNFROB_BACKGROUND_PIXMAP.
author Didier Verna <didier@xemacs.org>
date Tue, 27 Dec 2011 18:27:59 +0100
parents c39052c921b5
children 07256dcc0c8b
comparison
equal deleted inserted replaced
5624:c39052c921b5 5625:6fa0c5fb6154
1349 cachel->dirty = 1; \ 1349 cachel->dirty = 1; \
1350 } \ 1350 } \
1351 cachel->field##_specified = (bound || default_face); \ 1351 cachel->field##_specified = (bound || default_face); \
1352 } while (0) 1352 } while (0)
1353 1353
1354 /* 1354
1355 * A face's background pixmap will override the face's 1355 /* #### FIXME:
1356 * background color. But the background pixmap of the 1356
1357 * default face should not override the background color of 1357 This is shaky and might not even be what's desired from time to time. Why
1358 * a face if the background color has been specified or 1358 restrict to the default face? Somebody could want to specify the background
1359 * inherited. 1359 color of *any* face, and make it have precedence over inherited pixmaps.
1360 * 1360
1361 * To accomplish this we remove the background pixmap of the 1361 What's really needed is a more general background property:
1362 * cachel and mark it as having been specified so that cachel 1362 - type: color or pixmap
1363 * merging won't override it later. 1363 - color (for the color type)
1364 - pixmap + fg color / bg color (in case of bitmap) for the pixmap type.
1365
1366 And, BTW, the foreground property could also behave like this.
1367
1368 -- dvl
1369
1370 A face's background pixmap will override the face's background color. But
1371 the background pixmap of the default face should not override the
1372 background color of a face if the background color has been specified or
1373 inherited.
1374
1375 To accomplish this we remove the background pixmap of the cachel and mark
1376 it as having been specified so that cachel merging won't override it later.
1364 */ 1377 */
1365 #define MAYBE_UNFROB_BACKGROUND_PIXMAP \ 1378 #define MAYBE_UNFROB_BACKGROUND_PIXMAP \
1366 do \ 1379 do \
1367 { \ 1380 { \
1368 if (! default_face \ 1381 if (! default_face \