78 |
XFillRectangle(display, backstore, gc, x, y, cx, cy); \ |
XFillRectangle(display, backstore, gc, x, y, cx, cy); \ |
79 |
} |
} |
80 |
|
|
81 |
#define FILL_RECTANGLE_FAST(x,y,cx,cy)\ |
#define FILL_RECTANGLE_BACKSTORE(x,y,cx,cy)\ |
82 |
{ \ |
{ \ |
83 |
XFillRectangle(display, ownbackstore ? backstore : wnd, gc, x, y, cx, cy); \ |
XFillRectangle(display, ownbackstore ? backstore : wnd, gc, x, y, cx, cy); \ |
84 |
} |
} |
128 |
hintsatom = XInternAtom(display, "_MOTIF_WM_HINTS", False); |
hintsatom = XInternAtom(display, "_MOTIF_WM_HINTS", False); |
129 |
if (!hintsatom) |
if (!hintsatom) |
130 |
{ |
{ |
131 |
error("Failed to get atom _MOTIF_WM_HINTS\n"); |
warning("Failed to get atom _MOTIF_WM_HINTS: probably your window manager does not support MWM hints\n"); |
132 |
return; |
return; |
133 |
} |
} |
134 |
|
|
300 |
{ |
{ |
301 |
xcolmap = DefaultColormapOfScreen(screen); |
xcolmap = DefaultColormapOfScreen(screen); |
302 |
if (depth <= 8) |
if (depth <= 8) |
303 |
{ |
warning("Screen depth is 8 bits or lower: you may want to use -C for a private colourmap\n"); |
|
printf("You're using a screen depth of 8-bits or lower\n"); |
|
|
printf("If you get scewed colours, try the -C switch\n"); |
|
|
} |
|
304 |
} |
} |
305 |
|
|
306 |
gc = XCreateGC(display, RootWindowOfScreen(screen), 0, NULL); |
gc = XCreateGC(display, RootWindowOfScreen(screen), 0, NULL); |
319 |
|
|
320 |
if (get_current_workarea(&xpos, &ypos, &width, &height) < 0) |
if (get_current_workarea(&xpos, &ypos, &width, &height) < 0) |
321 |
{ |
{ |
322 |
error("Failed to get workarea.\n"); |
warning("Failed to get workarea: probably your window manager does not support extended hints\n"); |
|
error("Perhaps your window manager does not support EWMH?\n"); |
|
|
error("Defaulting to geometry 800x600\n"); |
|
323 |
width = 800; |
width = 800; |
324 |
height = 600; |
height = 600; |
325 |
} |
} |
1187 |
XSetStipple(display, gc, (Pixmap) glyph); |
XSetStipple(display, gc, (Pixmap) glyph); |
1188 |
XSetTSOrigin(display, gc, x, y); |
XSetTSOrigin(display, gc, x, y); |
1189 |
|
|
1190 |
FILL_RECTANGLE_FAST(x, y, cx, cy); |
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy); |
1191 |
|
|
1192 |
XSetFillStyle(display, gc, FillSolid); |
XSetFillStyle(display, gc, FillSolid); |
1193 |
} |
} |
1239 |
|
|
1240 |
if (boxcx > 1) |
if (boxcx > 1) |
1241 |
{ |
{ |
1242 |
FILL_RECTANGLE_FAST(boxx, boxy, boxcx, boxcy); |
FILL_RECTANGLE_BACKSTORE(boxx, boxy, boxcx, boxcy); |
1243 |
} |
} |
1244 |
else if (mixmode == MIX_OPAQUE) |
else if (mixmode == MIX_OPAQUE) |
1245 |
{ |
{ |
1246 |
FILL_RECTANGLE_FAST(clipx, clipy, clipcx, clipcy); |
FILL_RECTANGLE_BACKSTORE(clipx, clipy, clipcx, clipcy); |
1247 |
} |
} |
1248 |
|
|
1249 |
/* Paint text, character by character */ |
/* Paint text, character by character */ |