diff options
Diffstat (limited to 'src/x11/cdx11.c')
-rw-r--r-- | src/x11/cdx11.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/x11/cdx11.c b/src/x11/cdx11.c index 4f427e3..bbc9420 100644 --- a/src/x11/cdx11.c +++ b/src/x11/cdx11.c @@ -1107,13 +1107,17 @@ static void cdxCheckSolidStyle(cdCtxCanvas *ctxcanvas, int set) cdinteriorstyle(ctxcanvas, ctxcanvas->canvas->interior_style); } +static int cdwritemode(cdCtxCanvas *ctxcanvas, int write_mode); + static void cdclear(cdCtxCanvas* ctxcanvas) { + if (ctxcanvas->canvas->write_mode!= CD_REPLACE) cdwritemode(ctxcanvas, CD_REPLACE); cdxCheckSolidStyle(ctxcanvas, 1); XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, cdxGetPixel(ctxcanvas, ctxcanvas->canvas->background)); XFillRectangle(ctxcanvas->dpy, ctxcanvas->wnd, ctxcanvas->gc, 0, 0, ctxcanvas->canvas->w, ctxcanvas->canvas->h); XSetForeground(ctxcanvas->dpy, ctxcanvas->gc, cdxGetPixel(ctxcanvas, ctxcanvas->canvas->foreground)); cdxCheckSolidStyle(ctxcanvas, 0); + if (ctxcanvas->canvas->write_mode!= CD_REPLACE) cdwritemode(ctxcanvas, ctxcanvas->canvas->write_mode); } static void cdline(cdCtxCanvas *ctxcanvas, int x1, int y1, int x2, int y2) |