diff --git a/ChangeLog b/ChangeLog index f05f3d4..699c4af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-31 Matt Rice + + * Source/x11/XGServerEvent.m (_handleTakeFocusAtom:forContext:): + Unset ignore_take_focus for the key window. + 2006-10-29 Richard Frith-Macdonald * Source/xlib/XGFont.m: Use encodingFromCharset (undeprecated and diff --git a/Source/x11/XGServerEvent.m b/Source/x11/XGServerEvent.m index 3485f2f..32be6e3 100644 --- a/Source/x11/XGServerEvent.m +++ b/Source/x11/XGServerEvent.m @@ -1521,6 +1521,12 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym, NSDebugLLog(@"Focus", @"take focus:%d (current=%d key=%d)", cWin->number, generic.currentFocusWindow, key_num); + /* Sometimes window managers lose the setinputfocus on the key window + * e.g. when ordering out a window with focus then ordering in the key window. * it might search for a window until one accepts its take focus request. + */ + if (key_num == cWin->number) + cWin->ignore_take_focus = NO; + /* Invalidate the previous request. It's possible the app lost focus before this request was fufilled and we are being focused again, or ??? */