From 6842064fd72edca6183a352e1a92c68a40a1b64b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 27 Dec 1998 15:26:28 +0000 Subject: [PATCH] Fixed SetFocus that was broken when moved to x11drv. --- windows/x11drv/wnd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c index 2575e381f4d..7ac624a19c9 100644 --- a/windows/x11drv/wnd.c +++ b/windows/x11drv/wnd.c @@ -434,6 +434,7 @@ void X11DRV_WND_SetFocus(WND *wndPtr) { HWND32 hwnd = wndPtr->hwndSelf; XWindowAttributes win_attr; + Window win; /* Only mess with the X focus if there's */ /* no desktop window and no window manager. */ @@ -448,13 +449,12 @@ void X11DRV_WND_SetFocus(WND *wndPtr) /* Set X focus and install colormap */ - if (!X11DRV_WND_GetXWindow(wndPtr)) return; - - if (!TSXGetWindowAttributes( display, X11DRV_WND_GetXWindow(wndPtr), &win_attr ) || + if (!(win = X11DRV_WND_FindXWindow(wndPtr))) return; + if (!TSXGetWindowAttributes( display, win, &win_attr ) || (win_attr.map_state != IsViewable)) return; /* If window is not viewable, don't change anything */ - TSXSetInputFocus( display, X11DRV_WND_GetXWindow(wndPtr), RevertToParent, CurrentTime ); + TSXSetInputFocus( display, win, RevertToParent, CurrentTime ); if (COLOR_GetSystemPaletteFlags() & COLOR_PRIVATE) TSXInstallColormap( display, COLOR_GetColormap() );