Dennis Schridde schreef:
> Am Mittwoch, 9. Mai 2007 schrieb Jose Ivey:
>   
>> Dennis Schridde wrote:
>>     
>>> Am Mittwoch, 9. Mai 2007 schrieb The Watermelon:
>>>       
>>>> On 5/7/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:
>>>>         
>>>>> Author: devurandom
>>>>> Date: Mon May  7 22:24:34 2007
>>>>> New Revision: 1243
>>>>>
>>>>> URL: http://svn.gna.org/viewcvs/warzone?rev=1243&view=rev
>>>>> Log:
>>>>> - Some more housekeeping.
>>>>> - Warzone reacts on loss of focus again!
>>>>>
>>>>> Modified:
>>>>>    trunk/lib/framework/frame.c
>>>>>    trunk/lib/framework/input.c
>>>>>    trunk/lib/framework/input.h
>>>>>    trunk/lib/gamelib/gtime.c
>>>>>    trunk/src/loop.c
>>>>>    trunk/src/main.c
>>>>>    trunk/src/multiopt.c
>>>>>           
>>>> the wz window will never regain focus if other window gains focus when
>>>> wz window is active after this revision...I think that IGNORE_LOSS_FOCUS
>>>> wasnt there for no reason...
>>>>         
>>> Er... Sorry, what?
>>>
>>> You mean if something like an IM pops up while you play WZ, you will not
>>> be able to switch back? Or WZ will not reawake then? Or is the problem
>>> completely different?
>>> I was perfectly able to switch apps back and forth with WZ reacting as
>>> expected...
>>>       
>> I've seen the problem vz is describing. if the game loses focus (switch
>> to another app, etc) during startup (for certain) and some other times
>> (not sure which) I cannot regain focus/control of the app. The only
>> solution has been to restart the game.  XP, SP2, MSVC, debug.
>>     
> This must be a Windows only problem. Maybe you can make up the problem in 
> Windows specific codepaths in WZ, otherwise it would be a bug in SDL (i.e. it 
> is missing to send the regain focus event), which I would not assume, since 
> it would be a pretty obvious one.
>   
Yes it is a windows only problem. But is reproduceable every time.
Warzone will not do anything anymore after regaining focus (in fact it
won't even render a screen, so you'll hardly notice that you switched
back to warzone).

When running with `--debug all` I do get a message "WM_KILLFOCUS".
However I never receive a "WM_SETFOCUS" again (even when commenting out
the `focusState = FOCUS_SET/FOCUS_KILL` lines in frame.c, which if I do
comment them out do give me a response when switching back to WZ). Also
a noticeable difference is that when I don't comment out these lines
warzone hogs my CPU entirely, when I do its about 2~3%. So I'm guessing
it is hitting some kind of infinite loop somewhere. This is supported by
the fact that if I let the code be (i.e. don't comment it out) even
music (playlist stuff) will stop. So that supports my guess that it hits
an infinite loop.

-- 
Giel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to