Fixed SetFocus that was broken when moved to x11drv.
This commit is contained in:
parent
c6e45ed546
commit
6842064fd7
|
@ -434,6 +434,7 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
|
||||||
{
|
{
|
||||||
HWND32 hwnd = wndPtr->hwndSelf;
|
HWND32 hwnd = wndPtr->hwndSelf;
|
||||||
XWindowAttributes win_attr;
|
XWindowAttributes win_attr;
|
||||||
|
Window win;
|
||||||
|
|
||||||
/* Only mess with the X focus if there's */
|
/* Only mess with the X focus if there's */
|
||||||
/* no desktop window and no window manager. */
|
/* no desktop window and no window manager. */
|
||||||
|
@ -448,13 +449,12 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
|
||||||
|
|
||||||
/* Set X focus and install colormap */
|
/* Set X focus and install colormap */
|
||||||
|
|
||||||
if (!X11DRV_WND_GetXWindow(wndPtr)) return;
|
if (!(win = X11DRV_WND_FindXWindow(wndPtr))) return;
|
||||||
|
if (!TSXGetWindowAttributes( display, win, &win_attr ) ||
|
||||||
if (!TSXGetWindowAttributes( display, X11DRV_WND_GetXWindow(wndPtr), &win_attr ) ||
|
|
||||||
(win_attr.map_state != IsViewable))
|
(win_attr.map_state != IsViewable))
|
||||||
return; /* If window is not viewable, don't change anything */
|
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)
|
if (COLOR_GetSystemPaletteFlags() & COLOR_PRIVATE)
|
||||||
TSXInstallColormap( display, COLOR_GetColormap() );
|
TSXInstallColormap( display, COLOR_GetColormap() );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue