--- sourceforge.net/trunk/rdesktop/xwin.c 2002/11/03 12:33:02 250 +++ sourceforge.net/trunk/rdesktop/xwin.c 2002/11/05 11:09:26 253 @@ -345,7 +345,7 @@ } input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | - VisibilityChangeMask | FocusChangeMask; + VisibilityChangeMask | FocusChangeMask | LeaveWindowMask; if (sendmotion) input_mask |= PointerMotionMask; @@ -535,6 +535,10 @@ XSetInputFocus(display, wnd, RevertToPointerRoot, CurrentTime); break; + case LeaveNotify: + XUngrabKeyboard(display, CurrentTime); + break; + case Expose: XCopyArea(display, backstore, wnd, gc, xevent.xexpose.x, xevent.xexpose.y,