diff -uwrN microwindows-0.90/src/engine/devmouse.c mw-dev/src/engine/devmouse.c --- microwindows-0.90/src/engine/devmouse.c 2005-07-26 16:00:34.000000000 +0200 +++ mw-dev/src/engine/devmouse.c 2005-08-29 14:29:17.000000000 +0200 @@ -64,6 +64,9 @@ static int filter_absrotate(int, int *xpos, int *ypos); #endif +/* if TRUE -> load null mouse driver though mouse is compiled in */ +int no_mouse = FALSE; + /** * Initialize the mouse. * This sets its position to (0, 0) with no boundaries and no buttons pressed. @@ -93,8 +96,15 @@ curmaxx = curminx + MWMAX_CURSOR_SIZE - 1; curmaxy = curminy + MWMAX_CURSOR_SIZE - 1; + /* startup nano-X with null mouse driver */ + if ( no_mouse ) { + fd = -2; + } + /* open mouse device */ + else { if ((fd = mousedev.Open(&mousedev)) == -1) return -1; + } /* get default acceleration settings*/ mousedev.GetDefaultAccel(&scale, &thresh); diff -uwrN microwindows-0.90/src/nanox/serv.h mw-dev/src/nanox/serv.h --- microwindows-0.90/src/nanox/serv.h 2003-05-18 07:58:50.000000000 +0200 +++ mw-dev/src/nanox/serv.h 2005-08-29 13:43:59.000000000 +0200 @@ -560,6 +560,7 @@ extern int autoportrait; /* auto portrait mode switching*/ extern MWCOORD nxres; /* requested server x res*/ extern MWCOORD nyres; /* requested server y res*/ +extern int no_mouse; /* if TRUE, load null mouse driver in any case */ /* * The filename to use for the named socket. The environment variable diff -uwrN microwindows-0.90/src/nanox/srvmain.c mw-dev/src/nanox/srvmain.c --- microwindows-0.90/src/nanox/srvmain.c 2003-05-18 07:58:42.000000000 +0200 +++ mw-dev/src/nanox/srvmain.c 2005-08-29 14:29:42.000000000 +0200 @@ -102,6 +102,9 @@ static int persistent_mode = FALSE; static int portraitmode = MWPORTRAIT_NONE; +/* if TRUE -> load null mouse driver though mouse is compiled in */ +int no_mouse; + SERVER_LOCK_DECLARE /* Mutex for all public functions (only if NONETWORK and THREADSAFE) */ #if !NONETWORK @@ -110,7 +113,7 @@ static void usage(void) { - printf("Usage: %s [-e] [-p] [-A] [-NLRD] [-x#] [-y#] [-c ...]\n", + printf("Usage: %s [-e] [-p] [-A] [--no-mouse] [-NLRD] [-x#] [-y#] [-c ...]\n", progname); exit(1); } @@ -128,6 +131,12 @@ t = 1; while ( t < argc ) { + /*load nano-X with null mouse driver though mouse is compiled in */ + if ( !strcmp("--no-mouse",argv[t]) ) { + no_mouse = TRUE; + ++t; + continue; + } if ( !strcmp("-e",argv[t])) { escape_quits = FALSE; ++t;