dix: enable null root cursor

Enable a blank root cursor, selectable with --enable-null-root-cursor at
configure time.
This commit is contained in:
Daniel Stone 2006-08-18 18:03:41 +03:00 committed by Daniel Stone
parent 0704bb298c
commit a56b98bb04
3 changed files with 22 additions and 0 deletions

View File

@ -396,6 +396,9 @@ AC_ARG_ENABLE(install-libxf86config,
AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: use external)]), AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: use external)]),
[BUILTIN_FONTS=$enableval], [BUILTIN_FONTS=$enableval],
[BUILTIN_FONTS=no]) [BUILTIN_FONTS=no])
AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]),
[NULL_ROOT_CURSOR=$enableval],
[NULL_ROOT_CURSOR=no])
dnl Extensions. dnl Extensions.
AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
@ -745,6 +748,10 @@ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1, AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
[Do not have `strcasecmp'.])) [Do not have `strcasecmp'.]))
if test "x$NULL_ROOT_CURSOR" = xyes; then
AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor])
fi
PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"]) PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"])
if test "x$have_libxdmcp" = xyes; then if test "x$have_libxdmcp" = xyes; then
AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS]) AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS])

View File

@ -249,6 +249,7 @@ main(int argc, char *argv[], char *envp[])
int i, j, k, error; int i, j, k, error;
char *xauthfile; char *xauthfile;
HWEventQueueType alwaysCheckForInput[2]; HWEventQueueType alwaysCheckForInput[2];
CursorMetricRec cm;
display = "0"; display = "0";
@ -415,9 +416,20 @@ main(int argc, char *argv[], char *envp[])
} }
if (!SetDefaultFont(defaultTextFont)) if (!SetDefaultFont(defaultTextFont))
FatalError("could not open default font '%s'", defaultTextFont); FatalError("could not open default font '%s'", defaultTextFont);
#ifdef NULL_ROOT_CURSOR
cm.width = 0;
cm.height = 0;
cm.xhot = 0;
cm.yhot = 0;
if (!(rootCursor = AllocCursor(NULL, NULL, &cm, 0, 0, 0, 0, 0, 0)))
FatalError("could not create empty root cursor");
AddResource(FakeClientID(0), RT_CURSOR, (pointer)rootCursor);
#else
if (!(rootCursor = CreateRootCursor(defaultCursorFont, 0))) if (!(rootCursor = CreateRootCursor(defaultCursorFont, 0)))
FatalError("could not open default cursor font '%s'", FatalError("could not open default cursor font '%s'",
defaultCursorFont); defaultCursorFont);
#endif
#ifdef DPMSExtension #ifdef DPMSExtension
/* check all screens, looking for DPMS Capabilities */ /* check all screens, looking for DPMS Capabilities */
DPMSCapableFlag = DPMSSupported(); DPMSCapableFlag = DPMSSupported();

View File

@ -445,4 +445,7 @@
/* Avoid using font servers */ /* Avoid using font servers */
#undef NOFONTSERVERACCESS #undef NOFONTSERVERACCESS
/* Use an empty root cursor */
#undef NULL_ROOT_CURSOR
#endif /* _DIX_CONFIG_H_ */ #endif /* _DIX_CONFIG_H_ */