From 4c4866d151bbf664273b74e1cee817633881d38f Mon Sep 17 00:00:00 2001 From: scuri Date: Mon, 30 Nov 2009 19:26:36 +0000 Subject: Fixed: Clear method was affected by WriteMode in the X11 base driver. --- src/x11/cdx11.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/x11') 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) -- cgit v1.2.3