<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Ctrl + Alt + Del =&gt; window closes</title>
		<link>http://www.allegro.cc/forums/view/547778</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 28 Nov 2005 07:51:00 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Why again do we want this behavior?  Hehe, please enlighten me.</p><p>(<a href="http://www.allegro.cc/forums/view_thread.php?_id=247559">Previous discussion</a>)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Sat, 26 Nov 2005 04:55:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s control-alt-end.  </p><p>I personally am fond of it, and have gone so far as to build that into some of my SDL programs too.  It quits a program instantly, without fuss, even if it&#39;s stuck in an infinite loop or somesuch.  And on the rare freezes where even that doesn&#39;t work, the fact that it doesn&#39;t work tells you something about the nature of the crash.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (orz)</author>
		<pubDate>Sat, 26 Nov 2005 04:59:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh, I&#39;m fond of Ctrl + Alt + End also.  I&#39;m talking about Alegro 4.20 and WinXP Pro.  A windowed app is run, and I press Ctrl + Alt + Del.  The &quot;Window Security&quot; dialog pops up, and the Allegro app unexpectedly closes.  If the app is run from the commandline, I get this:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
This application has requested the Runtime to terminate it in an unusual way.<br />Please contact the application&#39;s support team for more information.
</p></div></div><p>

Running under gdb yields exit code 03.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Sat, 26 Nov 2005 06:16:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Blurp!</p><p>I was not aware of that.  Dunno why it would be.  Excessive worship at the altar of DOS?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (orz)</author>
		<pubDate>Sat, 26 Nov 2005 06:19:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ctrl+alt+del is a throw back from the old DOS days. When you had a program running and it locked up form a bug, you couldn&#39;t press ctrl+c to kill it. And because DOS wasn&#39;t multitasking, you couldn&#39;t switch away from the program and kill it. All you could do was press ctrl+alt+del to reboot the computer. That&#39;s not very nice when testing though, so ctrl+alt+del was hijacked and made to close the program via SIGINT. When Windows came along, it took over ctrl+alt+del even from a DOS program, thus ctrl+alt+end was added.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Sat, 26 Nov 2005 06:22:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I understand the story behind it.  The fact remains, though:  This shouldn&#39;t happen on a multi-tasking OS.  So.  Can we change it?  Where in Allegro would one look?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Sat, 26 Nov 2005 06:35:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>To summarize the discussion for those that have not seen the previous posts: <i>this thread is not about CTRL-ALT-END</i>.</p><p>Under Windows, CTRL-ALT-DEL closes an Allegro application if it has focus. Allegro should always ignore CTRL-ALT-DELETE, letting Windows run the Task Manager. The <tt>three_finger_flag</tt> should do nothing with CTRL-ALT-DELETE.</p><p>I just checked <tt>wkeybd.c</tt> and saw that Allegro only is checking for CTRL-ALT-END (either the literal END key, or number 1 on the number pad). So, I logged the output, and I got this when I pressed CTRL-ALT-DEL:</p><pre>
CTRL-ALT-d3   *** DELETE
CTRL-ALT-0
CTRL-ALT-2
CTRL-ALT-3
CTRL-ALT-4
CTRL-ALT-5
CTRL-ALT-6
CTRL-ALT-7
... snip ...
CTRL-ALT-4e
CTRL-ALT-4f   *** NUMPAD1  &lt;-- allegro exits
</pre><p>

So it seems that Windows fires off CTRL-ALT-EVERYTHING once CTRL-ALT-DEL is pressed. Allegro eventually gets the END sequence and dies. I&#39;m assuming that Windows is responsible for generating all those messages.</p><p>I could easily put a hack together to stop it from happening, but perhaps someone knows the proper way?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 26 Nov 2005 08:31:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It might be interesting to find out if older versions of Allegro (aka, 4.0.3) show the same behavior and if it is consistent on all versions of Windows or just on XP (say).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 26 Nov 2005 19:48:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Going on what Matthew said, this would be present in every Allegro version that uses the three finger salute (Ctrl + Alt + End).  The problem, though, is Windows.  I&#39;ll try reproducing the behavior on &#39;98...</p><p>Also, as mentioned in the old discussion I linked, the behavior might be related to fast user switching--but, like Matthew said, it&#39;s Window&#39;s problem not Allegro&#39;s.  I&#39;ll also try reproducing the behavior after toggling fast switching.</p><p>-- edit --</p><p>I couldn&#39;t reproduce the behavior on Win98, All4.20.  On WinXP, fast user switching doesn&#39;t seem to make a difference, either.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Sat, 26 Nov 2005 21:47:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Going on what Matthew said, this would be present in every Allegro version that uses the three finger salute (Ctrl + Alt + End).
</p></div></div><p>
Allegro 4.2 uses a different keyboard driver than 4.0 did. I was thinking the behavior might somehow be related.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I couldn&#39;t reproduce the behavior on Win98, All4.20. On WinXP, fast user switching doesn&#39;t seem to make a difference, either.
</p></div></div><p>
Hmm... so in other words, it&#39;s a Windows XP feature?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 26 Nov 2005 23:07:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Allegro does what now? That doesn&#39;t happen with any of my programs...</p><p>[UPDATE]<br />Tested it fullscreen and windowed, regular Allegro and AllegroGL. They still stay open.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Sat, 26 Nov 2005 23:30:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Hmm... so in other words, it&#39;s a Windows XP feature?
</p></div></div><p>
That seems to be the case.  Only, I just ran an old binary of mine statically linked with a version &lt; 4.2 (probably 4.03), and it was <i>not</i> affected by Ctrl+Alt+Del.  I&#39;m not sure how to interpret that, but you might be right about the new driver.</p><p>On the other hand, this problem has been documented as far back as February of 2003...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Sun, 27 Nov 2005 00:26:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
On the other hand, this problem has been documented as far back as February of 2003...
</p></div></div><p>
Eh?<br />Can you provide a link? This is the first time I recall hearing about it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 27 Nov 2005 00:28:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc/forums/view_thread.php?_id=247559">http://www.allegro.cc/forums/view_thread.php?_id=247559</a></p><p><img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gideon Weems)</author>
		<pubDate>Sun, 27 Nov 2005 00:48:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Hmm... so in other words, it&#39;s a Windows XP feature?
</p></div></div><p>
I would say it is a feature of (I guess) Windows 2000/XP that Allegro should be aware of. I don&#39;t know what the purpose is.</p><p>Attached is a patch to ignore CTRL-ALT-END sequences that are generated by CTRL-ALT-DEL. Only if three_finger_flag is TRUE, then CTRL-ALT-END will abort() the application. Regardless of its setting, CTRL-ALT-DEL will bring up the Task Manager.</p><p>To test, use: <a href="http://www.matthewleverton.com/misc/exkeys.exe">http://www.matthewleverton.com/misc/exkeys.exe</a></p><p>I tested under Windows XP and Windows 98 (under a VM) and there doesn&#39;t seem to be any side effects. </p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Can you provide a link? This is the first time I recall hearing about it.
</p></div></div><p>
See his link at the top of the thread. I&#39;m assuming it&#39;s always been a problem under Windows XP, but not under Windows 98 due to different things happening when CTRL-ALT-DEL is pressed.</p><p>It is very annoying to be testing or using an Allegro application, only to have it exit after you hit CTRL-ALT-DEL to check its resource usage.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 27 Nov 2005 00:51:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I would say it is a feature of (I guess) Windows 2000/XP that Allegro should be aware of.
</p></div></div><p>
Of course.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
See his link at the top of the thread.
</p></div></div><p>
That&#39;s what you get for following a thread through e-mail and jumping in on the forum half way during the thread. Missed it completely.<br />Seems I did also read the thread back then, but apparently the problem was then assumed to be the `normal&#39; behavior.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m assuming it&#39;s always been a problem under Windows XP, but not under Windows 98
</p></div></div><p>
Looks to be, yes.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It is very annoying to be testing or using an Allegro application, only to have it exit after you hit CTRL-ALT-DEL to check its resource usage.
</p></div></div><p>
Sure, I wasn&#39;t about to suggest ignoring the problem. </p><p>In private I still think it&#39;s stupid that Windows now uses ctrl-alt-del for something other than an emergency shutdown of the system.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 27 Nov 2005 01:09:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well NT, 2K, and XP don&#39;t handle C+A+D as an emergency. You use that key combo to log in, lock the computer, log out, etc. Or with fast user switching, you use it to bring up the task manager. On windows 9x C+A+D totally locked out the system with the task manager, 2k/XPs is more friendly as it runs alongside everything.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BAF)</author>
		<pubDate>Sun, 27 Nov 2005 23:26:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It didn&#39;t happen to me while in allegro 4.0.3 on Windows XP (checking memory usage), I don&#39;t have a 4.2 build, so I won&#39;t try it to see.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Felipe Maia)</author>
		<pubDate>Mon, 28 Nov 2005 07:51:00 +0000</pubDate>
	</item>
</rss>
