Hack to keep from deactivation app.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2002-10-20 02:42:55 +00:00
parent 5a499508aa
commit 643b3f366c
2 changed files with 19 additions and 4 deletions

View file

@ -1,3 +1,12 @@
2002-10-19 Adam Fedor <fedor@gnu.org>
* Source/x11/XGServerEvent.m ([XGServer
-receivedEvent:type:extra:forMode:] (ClientMessage:TAKE_FOCUS)):
Don't set desiredFocusWindow to 0.
([XGServer
-receivedEvent:type:extra:forMode:] (FocusOut): Hack: if focus
went nowhere, don't deactivate app.
2002-10-18 Adam Fedor <fedor@gnu.org>
* Source/x11/XGServerEvent.m ([XGServer

View file

@ -507,8 +507,6 @@ static inline int check_modifier (XEvent *xEvent, KeyCode key_code)
NSDebugLLog(@"Focus", @" but desired focus is %d",
generic.desiredFocusWindow);
}
generic.desiredFocusWindow = 0;
generic.focusRequestNumber = 0;
/* Only send an event if we don't have a key
window already (If we have a key window, that
means the AppKit originated whatever event got us
@ -904,10 +902,18 @@ static inline int check_modifier (XEvent *xEvent, KeyCode key_code)
{
nswin = GSWindowWithNumber(cWin->number);
}
NSDebugLLog(@"Focus", @"Focus went to %p\n", nswin);
NSDebugLLog(@"Focus", @"Focus went to %d (xwin %d)\n",
(cWin) ? cWin->number : 0, fw);
if (nswin == nil)
{
[NSApp deactivate];
if (fw == 0)
{
/* What? This is bogus. Focus has to go somewhere. */
}
else
{
[NSApp deactivate];
}
}
cWin = [XGServer _windowForXWindow: xEvent.xfocus.window];
NSDebugLLog(@"Focus", @"%d lost focus on %d\n",