Resetting X focus should not be done with SetFocus32. Called
the windowing (X11) driver's SetFocus routine directly instead.
This apparently fixes a big heap of user interface problems.

diff --git a/windows/winpos.c b/windows/winpos.c
index 892b243..7dd7354 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -2499,8 +2499,9 @@
 	    focus = curr = GetFocus32();
 	    while (curr) {
 		if (curr == hwnd) {
-		    SetFocus32( 0 );
-		    SetFocus32( focus );
+		    WND *pFocus = WIN_FindWndPtr( focus );
+		    if (pFocus)
+			pFocus->pDriver->pSetFocus(pFocus);
 		    break;
 		}
 		curr = GetParent32(curr);