--- sourceforge.net/trunk/rdesktop/xwin.c 2002/09/15 11:39:16 157 +++ sourceforge.net/trunk/rdesktop/xwin.c 2002/09/15 12:42:26 160 @@ -351,6 +351,9 @@ height = HeightOfScreen(screen); } + /* make sure width is a multiple of 4 */ + width = (width + 3) & ~3; + xkeymap_init(); return True; } @@ -568,22 +571,21 @@ MOUSE_FLAG_MOVE, xevent.xmotion.x, xevent.xmotion.y); break; - case FocusIn: - /* fall through */ case EnterNotify: if (grab_keyboard) XGrabKeyboard(display, wnd, True, GrabModeAsync, GrabModeAsync, CurrentTime); break; - case FocusOut: - xwin_reset_keys(); - /* fall through */ case LeaveNotify: if (grab_keyboard) XUngrabKeyboard(display, CurrentTime); break; + case FocusOut: + xwin_reset_keys(); + break; + case Expose: XCopyArea(display, backstore, wnd, gc, xevent.xexpose.x, xevent.xexpose.y,