X11DRV_SetFocus: really don't mess with focus for managed windows.

diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c
index c8272ba..58858d7 100644
--- a/windows/x11drv/wnd.c
+++ b/windows/x11drv/wnd.c
@@ -581,12 +581,16 @@
   HWND hwnd =  wndPtr->hwndSelf;
   XWindowAttributes win_attr;
   Window win;
+  WND *w = wndPtr;
   
   /* Only mess with the X focus if there's */
   /* no desktop window and if the window is not managed by the WM. */
-  if ((X11DRV_GetXRootWindow() != DefaultRootWindow(display))
-      || (wndPtr->flags & WIN_MANAGED)) return;
-  
+  if ((X11DRV_GetXRootWindow() != DefaultRootWindow(display))) return;
+  while (w && !((X11DRV_WND_DATA *) w->pDriverData)->window)
+      w = w->parent;
+  if (!w) w = wndPtr;
+  if (w->flags & WIN_MANAGED) return;
+
   if (!hwnd)	/* If setting the focus to 0, uninstall the colormap */
     {
       if (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_PRIVATE)