Lines 22-27
Link Here
|
22 |
#include <X11/extensions/shape.h> |
22 |
#include <X11/extensions/shape.h> |
23 |
|
23 |
|
24 |
|
24 |
|
|
|
25 |
#ifndef XFT |
26 |
#define PIXEL(x) x |
27 |
#else /* XFT */ |
28 |
#define PIXEL(x) x.pixel |
29 |
#endif /* XFT */ |
30 |
|
31 |
|
32 |
|
25 |
/*{{{ Colour group lookup */ |
33 |
/*{{{ Colour group lookup */ |
26 |
|
34 |
|
27 |
|
35 |
|
Lines 86-93
Link Here
|
86 |
w--; |
94 |
w--; |
87 |
h--; |
95 |
h--; |
88 |
|
96 |
|
89 |
XSetForeground(ioncore_g.dpy, gc, tlc); |
97 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc)); |
90 |
|
|
|
91 |
|
98 |
|
92 |
a=(br!=0); |
99 |
a=(br!=0); |
93 |
b=0; |
100 |
b=0; |
Lines 104-112
Link Here
|
104 |
|
111 |
|
105 |
XDrawLines(ioncore_g.dpy, win, gc, points, 3, CoordModeOrigin); |
112 |
XDrawLines(ioncore_g.dpy, win, gc, points, 3, CoordModeOrigin); |
106 |
} |
113 |
} |
107 |
|
|
|
108 |
|
114 |
|
109 |
XSetForeground(ioncore_g.dpy, gc, brc); |
115 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(brc)); |
110 |
|
116 |
|
111 |
a=(tl!=0); |
117 |
a=(tl!=0); |
112 |
b=0; |
118 |
b=0; |
Lines 143-165
Link Here
|
143 |
GrBorderLine line) |
143 |
GrBorderLine line) |
144 |
{ |
144 |
{ |
145 |
if(line==GR_BORDERLINE_LEFT && geom->h>0 && tl>0){ |
145 |
if(line==GR_BORDERLINE_LEFT && geom->h>0 && tl>0){ |
146 |
XSetForeground(ioncore_g.dpy, gc, tlc); |
146 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc)); |
147 |
XSetBackground(ioncore_g.dpy, gc, tlc); |
147 |
XSetBackground(ioncore_g.dpy, gc, PIXEL(tlc)); |
148 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, tl, geom->h); |
148 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, tl, geom->h); |
149 |
geom->x+=tl; |
149 |
geom->x+=tl; |
150 |
}else if(line==GR_BORDERLINE_TOP && geom->w>0 && tl>0){ |
150 |
}else if(line==GR_BORDERLINE_TOP && geom->w>0 && tl>0){ |
151 |
XSetForeground(ioncore_g.dpy, gc, tlc); |
151 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc)); |
152 |
XSetBackground(ioncore_g.dpy, gc, tlc); |
152 |
XSetBackground(ioncore_g.dpy, gc, PIXEL(tlc)); |
153 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, geom->w, tl); |
153 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, geom->w, tl); |
154 |
geom->y+=tl; |
154 |
geom->y+=tl; |
155 |
}else if(line==GR_BORDERLINE_RIGHT && geom->h>0 && br>0){ |
155 |
}else if(line==GR_BORDERLINE_RIGHT && geom->h>0 && br>0){ |
156 |
XSetForeground(ioncore_g.dpy, gc, brc); |
156 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(brc)); |
157 |
XSetBackground(ioncore_g.dpy, gc, brc); |
157 |
XSetBackground(ioncore_g.dpy, gc, PIXEL(brc)); |
158 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x+geom->w-br, geom->y, br, geom->h); |
158 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x+geom->w-br, geom->y, br, geom->h); |
159 |
geom->w-=br; |
159 |
geom->w-=br; |
160 |
}else if(line==GR_BORDERLINE_BOTTOM && geom->w>0 && br>0){ |
160 |
}else if(line==GR_BORDERLINE_BOTTOM && geom->w>0 && br>0){ |
161 |
XSetForeground(ioncore_g.dpy, gc, brc); |
161 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(brc)); |
162 |
XSetBackground(ioncore_g.dpy, gc, brc); |
162 |
XSetBackground(ioncore_g.dpy, gc, PIXEL(brc)); |
163 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y+geom->h-br, geom->w, br); |
163 |
XFillRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y+geom->h-br, geom->w, br); |
164 |
geom->h-=br; |
164 |
geom->h-=br; |
165 |
} |
165 |
} |
Lines 293-299
Link Here
|
293 |
} |
299 |
} |
294 |
|
300 |
|
295 |
if(ISSET(a2, GR_ATTR(tagged)) || ISSET(a1, GR_ATTR(tagged))){ |
301 |
if(ISSET(a2, GR_ATTR(tagged)) || ISSET(a1, GR_ATTR(tagged))){ |
296 |
XSetForeground(ioncore_g.dpy, d->copy_gc, cg->fg); |
302 |
XSetForeground(ioncore_g.dpy, d->copy_gc, PIXEL(cg->fg)); |
297 |
|
303 |
|
298 |
copy_masked(brush, d->tag_pixmap, brush->win, 0, 0, |
304 |
copy_masked(brush, d->tag_pixmap, brush->win, 0, 0, |
299 |
d->tag_pixmap_w, d->tag_pixmap_h, |
305 |
d->tag_pixmap_w, d->tag_pixmap_h, |
Lines 348-354
Link Here
|
348 |
GC gc=brush->d->normal_gc; |
354 |
GC gc=brush->d->normal_gc; |
349 |
|
355 |
|
350 |
if(TRUE/*needfill*/){ |
356 |
if(TRUE/*needfill*/){ |
351 |
XSetForeground(ioncore_g.dpy, gc, cg->bg); |
357 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(cg->bg)); |
352 |
XFillRectangle(ioncore_g.dpy, brush->win, gc, geom->x, geom->y, |
358 |
XFillRectangle(ioncore_g.dpy, brush->win, gc, geom->x, geom->y, |
353 |
geom->w, geom->h); |
359 |
geom->w, geom->h); |
354 |
} |
360 |
} |
Lines 513-519
Link Here
|
513 |
attr.background_pixmap=ParentRelative; |
519 |
attr.background_pixmap=ParentRelative; |
514 |
}else{ |
520 |
}else{ |
515 |
attrflags=CWBackPixel; |
521 |
attrflags=CWBackPixel; |
516 |
attr.background_pixel=brush->d->cgrp.bg; |
522 |
attr.background_pixel=brush->d->PIXEL(cgrp.bg); |
517 |
} |
523 |
} |
518 |
|
524 |
|
519 |
XChangeWindowAttributes(ioncore_g.dpy, brush->win, attrflags, &attr); |
525 |
XChangeWindowAttributes(ioncore_g.dpy, brush->win, attrflags, &attr); |
Lines 529-535
Link Here
|
529 |
if(cg==NULL) |
535 |
if(cg==NULL) |
530 |
return; |
536 |
return; |
531 |
|
537 |
|
532 |
XSetForeground(ioncore_g.dpy, gc, cg->bg); |
538 |
XSetForeground(ioncore_g.dpy, gc, PIXEL(cg->bg)); |
533 |
XFillRectangle(ioncore_g.dpy, brush->win, gc, |
539 |
XFillRectangle(ioncore_g.dpy, brush->win, gc, |
534 |
geom->x, geom->y, geom->w, geom->h); |
540 |
geom->x, geom->y, geom->w, geom->h); |
535 |
} |
541 |
} |