Re: [AD] Program continues running in background when CTRL-ALT-DEL used, but not when ALT-TAB used.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
On 2006-12-28, Andrei Ellman <ae-a-alleg@xxxxxxxxxx> wrote:
Hi,

I've noticed that whenever I switch out of an Allegro app using the CTRL-ALT-DEL combination and then press the task-manager button, my allegro app continues to run in the background (the app's cpu-usage is 99% and when I switch back in, the app looks like it's been running continuously).

Does the program get the WM_ACTIVATE message in this case? (line ~259 in
src/win/wwnd.c)

Forgot to mention that I've only tried this with fullscreen apps (windowed Allegro apps cannot be minimised).

I just tried placing a breakpoint on the line after 'case WM_ACTIVATE:' in wwnd.c and when using both ALT+TAB and CTRL+ALT+DEL, the breakpoint is hit. I even tried moving the breakpoint to _win_switch_out(); one line later and again, in both cases, the breakpoint was hit.

One thing I do notice is that when not using breakpoints, If I switch out using ALT+TAB, the resolution and colourdepth are immediately restored, whereas if I switch out with CTRL+ALT+DEL, my resolution and colourdepth remain the same as that of the app while the "Windows Security" dialog is displayed, until I press the "Task Manager" button and then they return to that of the desktop.

Unfortunately, this meant that when debugging and switching out the CTRL+ALT+DEL way, the breakpoint was hit before the resolution,etc. could be restored, and instead of seeing MSVC, I saw a white background, so further debugging was made difficult. Fortunately, I've set up MSVC to make a noise whenever a breakpoint is hit, so I at least know that _win_switch_out() was called while (or before?) the "Windows Security" dialog is displayed.

I also tried running a mingw build of the app, and the same thing happened (but I did not debug the mingw version).


AE.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/