--- sourceforge.net/trunk/rdesktop/xwin.c 2002/11/26 10:09:14 279 +++ sourceforge.net/trunk/rdesktop/xwin.c 2003/01/28 12:07:55 296 @@ -78,6 +78,11 @@ XFillRectangle(display, backstore, gc, x, y, cx, cy); \ } +#define FILL_RECTANGLE_BACKSTORE(x,y,cx,cy)\ +{ \ + XFillRectangle(display, ownbackstore ? backstore : wnd, gc, x, y, cx, cy); \ +} + /* colour maps */ BOOL owncolmap = False; static Colormap xcolmap; @@ -602,6 +607,9 @@ break; case MotionNotify: + if (fullscreen && !focused) + XSetInputFocus(display, wnd, RevertToPointerRoot, + CurrentTime); rdp_send_input(time(NULL), RDP_INPUT_MOUSE, MOUSE_FLAG_MOVE, xevent.xmotion.x, xevent.xmotion.y); break; @@ -1184,10 +1192,7 @@ XSetStipple(display, gc, (Pixmap) glyph); XSetTSOrigin(display, gc, x, y); - if (ownbackstore) - XFillRectangle(display, backstore, gc, x, y, cx, cy); - else - XFillRectangle(display, wnd, gc, x, y, cx, cy); + FILL_RECTANGLE_BACKSTORE(x, y, cx, cy); XSetFillStyle(display, gc, FillSolid); } @@ -1239,11 +1244,11 @@ if (boxcx > 1) { - FILL_RECTANGLE(boxx, boxy, boxcx, boxcy); + FILL_RECTANGLE_BACKSTORE(boxx, boxy, boxcx, boxcy); } else if (mixmode == MIX_OPAQUE) { - FILL_RECTANGLE(clipx, clipy, clipcx, clipcy); + FILL_RECTANGLE_BACKSTORE(clipx, clipy, clipcx, clipcy); } /* Paint text, character by character */ @@ -1277,17 +1282,17 @@ else x += text[i + 2]; } - if (i + 2 < length) - i += 3; - else - i += 2; - length -= i; - /* this will move pointer from start to first character after FE command */ - text = &(text[i]); - i = 0; for (j = 0; j < entry->size; j++) DO_GLYPH(((uint8 *) (entry->data)), j); } + if (i + 2 < length) + i += 3; + else + i += 2; + length -= i; + /* this will move pointer from start to first character after FE command */ + text = &(text[i]); + i = 0; break; default: