[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Ctrl+Alt+Q deactivated
On 09/19/2010 07:41 PM, Jo Even Skarstein wrote:
>> Was this Quit XaAES? You can do the same from the taskmanager.
>
> Under N.AES this key-combo starts whatever $SDMASTER points to. I find
> this very convenient.
I've attached a patch which does this. If $SDMASTER is defined, XaAES
launch the program pointed to by this variable when Ctrl+Alt+Q is
pressed. If $SDMASTER isn't set, XaAES is shutdown as before.
This patch doesn't enable HOTKEYQUIT though, this must be done to enable
this patch.
Please review this. I'm still not quite sure if I've fully understood
the create_process()-function, so my code might have side-effects. Works
fine on my Milan though, both with and without MP.
Jo Even
--- freemint.ref/xaaes/src.km/k_keybd.c Wed Jun 2 21:38:18 2010
+++ freemint/xaaes/src.km/k_keybd.c Sun Sep 19 21:25:14 2010
@@ -564,8 +564,16 @@
#if HOTKEYQUIT
case 'Q':
{
- DIAGS(("shutdown by CtlAlt Q"));
- dispatch_shutdown(0, 0);
+ struct proc *p;
+ char *sdmaster = get_env(0, "SDMASTER=");
+
+ if (sdmaster)
+ create_process(sdmaster, NULL, NULL, &p, 0, NULL);
+ else
+ {
+ DIAGS(("shutdown by CtlAlt Q"));
+ dispatch_shutdown(0, 0);
+ }
return true;
}
case 'H':