From 320ce8ba47d3d7c344b5de84844d1fa90e346fde Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Wed, 22 Jan 2014 10:31:05 -0800 Subject: xorg: work on xorg driver --- xorg/server/module/rdpImageText8.c | 66 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) (limited to 'xorg/server/module/rdpImageText8.c') diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c index 42fb42d5..28b45c2b 100644 --- a/xorg/server/module/rdpImageText8.c +++ b/xorg/server/module/rdpImageText8.c @@ -39,6 +39,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) +/******************************************************************************/ +void +rdpImageText8Pre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, char *chars, + BoxPtr box) +{ +} + /******************************************************************************/ void rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC, @@ -51,13 +61,65 @@ rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC, GC_OP_EPILOGUE(pGC); } +/******************************************************************************/ +void +rdpImageText8Post(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, char *chars, + BoxPtr box) +{ + RegionRec reg; + + if (cd == 0) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + rdpRegionInit(®, box, 0); + if (cd == 2) + { + rdpRegionIntersect(®, clip_reg, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + RegionUninit(®); +} + /******************************************************************************/ void rdpImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars) { - LLOGLN(0, ("rdpImageText8:")); + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + int cd; + BoxRec box; + + LLOGLN(10, ("rdpImageText8:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box); + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpImageText8: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpImageText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } /* do original call */ rdpImageText8Org(pDrawable, pGC, x, y, count, chars); - return; + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpImageText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } + RegionUninit(&clip_reg); } -- cgit v1.2.3