New global variable. (KdProcessArgument): Set it to TRUE on -nozap switch.

(KdUseMsg): Add help for -nozap and -rgba switches.
Declare.
Honour dontZap flag.
This commit is contained in:
Phil Blundell 2004-11-13 16:41:00 +00:00
parent 3b0dce3620
commit 36d9e01c0d
3 changed files with 11 additions and 2 deletions

View File

@ -68,6 +68,7 @@ unsigned long kdVideoTestTime;
Bool kdEmulateMiddleButton;
Bool kdRawPointerCoordinates;
Bool kdDisableZaphod;
Bool kdDontZap;
Bool kdEnabled;
int kdSubpixelOrder;
int kdVirtualTerminal = -1;
@ -673,6 +674,7 @@ KdUseMsg (void)
ErrorF("\nTinyX Device Dependent Usage:\n");
ErrorF("-card pcmcia Use PCMCIA card as additional screen\n");
ErrorF("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP{,DEPTH/BPP}[xFREQ]] Specify screen characteristics\n");
ErrorF("-rgba rgb/bgr/vrgb/vbgr/none Specify subpixel ordering for LCD panels\n");
ErrorF("-zaphod Disable cursor screen switching\n");
ErrorF("-2button Emulate 3 button mouse\n");
ErrorF("-3button Disable 3 button mouse emulation\n");
@ -683,8 +685,8 @@ KdUseMsg (void)
ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n");
ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n");
ErrorF("-switchCmd Command to execute on vt switch\n");
ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n");
ErrorF("vtxx Use virtual terminal xx instead of the next available\n");
/* XXX: what does -rgba do? */
#ifdef PSEUDO8
p8UseMsg ();
#endif
@ -729,6 +731,11 @@ KdProcessArgument (int argc, char **argv, int i)
kdDisableZaphod = TRUE;
return 1;
}
if (!strcmp (argv[i], "-nozap"))
{
kdDontZap = TRUE;
return 1;
}
if (!strcmp (argv[i], "-3button"))
{
kdEmulateMiddleButton = FALSE;

View File

@ -410,6 +410,7 @@ extern Bool kdEnabled;
extern Bool kdSwitchPending;
extern Bool kdEmulateMiddleButton;
extern Bool kdDisableZaphod;
extern Bool kdDontZap;
extern int kdVirtualTerminal;
extern char *kdSwitchCmd;
extern KdOsFuncs *kdOsFuncs;

View File

@ -1209,7 +1209,8 @@ KdCheckSpecialKeys(xEvent *xE)
* Set the dispatch exception flag so the server will terminate the
* next time through the dispatch loop.
*/
dispatchException |= DE_TERMINATE;
if (kdDontZap == FALSE)
dispatchException |= DE_TERMINATE;
break;
}
}