1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

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

This commit is contained in:
Gerard Patel 2000-04-30 12:35:32 +00:00 committed by Alexandre Julliard
parent 4d48dd3048
commit 32bf62e45a

View file

@ -581,12 +581,16 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
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)