Hi all,

I have several Word documents with an embedded Visio symbol that causes the screen to turn grey when the document is opened in a rdesktop session.

When the mouse is moved around the screen the touched regions become visible again.

The problems has been encountered  with all versions of rdesktop (1.4.1, 1.5.0 and the latest CVS). If X11 runs with VESA driver, one can see that just the Visio symbol is not drawn correctly. (horizontal and vertical lines are drawn outside the window) When X11 runs with a Via driver, the effect is more dramatic as described above.

I have spent some hours now to debug the problem and figured out that negative cx or cy values are passed to ui_ellipse in xwin.c gets. This probably causes the problem in the X11 driver.

I don't know why the server sends negative values to the clients, but it happens. Whoever is interested in investigating the problem more may receive a copy of the Word document from me. (Sorry i can post the document publically only after it has been approved)

This is my fix in xwin.c

ui_ellipse(uint8 opcode,
           /* mode */ uint8 fillmode,
           /* dest */ int x, int y, int cx, int cy,
           /* brush */ BRUSH * brush, int bgcolour, int fgcolour)
        uint8 style, i, ipattern[8];
        Pixmap fill;

/*** fix begin ********************/
        if (cx < 0 || cy < 0) {
                warning("Skip drawing ellipse with x=%d, y=%d, cx=%d, cy=%d\n",
                        x, y, cx, cy);
/*** fix end ********************/

Would you consider integrating this fix in the CVS? For me it's the only solution right now.

Best regards