summaryrefslogtreecommitdiffstats
path: root/xorg/server/module/rdpPolyText16.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/server/module/rdpPolyText16.c')
-rw-r--r--xorg/server/module/rdpPolyText16.c66
1 files changed, 65 insertions, 1 deletions
diff --git a/xorg/server/module/rdpPolyText16.c b/xorg/server/module/rdpPolyText16.c
index 2c690978..0b8b6c51 100644
--- a/xorg/server/module/rdpPolyText16.c
+++ b/xorg/server/module/rdpPolyText16.c
@@ -32,12 +32,24 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h"
#include "rdpDraw.h"
+#include "rdpClientCon.h"
+#include "rdpReg.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
/******************************************************************************/
+void
+rdpPolyText16Pre(rdpPtr dev, rdpClientCon *clientCon,
+ int cd, RegionPtr clip_reg,
+ DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short *chars,
+ BoxPtr box)
+{
+}
+
+/******************************************************************************/
int
rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
@@ -52,14 +64,66 @@ rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
}
/******************************************************************************/
+void
+rdpPolyText16Post(rdpPtr dev, rdpClientCon *clientCon,
+ int cd, RegionPtr clip_reg,
+ DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short *chars,
+ BoxPtr box)
+{
+ RegionRec reg;
+
+ if (cd == 0)
+ {
+ return;
+ }
+ if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
+ {
+ return;
+ }
+ rdpRegionInit(&reg, box, 0);
+ if (cd == 2)
+ {
+ rdpRegionIntersect(&reg, clip_reg, &reg);
+ }
+ rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
+ RegionUninit(&reg);
+}
+
+/******************************************************************************/
int
rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
{
int rv;
+ rdpPtr dev;
+ rdpClientCon *clientCon;
+ RegionRec clip_reg;
+ int cd;
+ BoxRec box;
- LLOGLN(0, ("rdpPolyText16:"));
+ LLOGLN(10, ("rdpPolyText16:"));
+ 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, ("rdpPolyText16: cd %d", cd));
+ clientCon = dev->clientConHead;
+ while (clientCon != NULL)
+ {
+ rdpPolyText16Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
+ x, y, count, chars, &box);
+ clientCon = clientCon->next;
+ }
/* do original call */
rv = rdpPolyText16Org(pDrawable, pGC, x, y, count, chars);
+ clientCon = dev->clientConHead;
+ while (clientCon != NULL)
+ {
+ rdpPolyText16Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
+ x, y, count, chars, &box);
+ clientCon = clientCon->next;
+ }
+ RegionUninit(&clip_reg);
return rv;
}