xserver: Branch 'input-hotplug' - 5 commits

Daniel Stone daniels at kemper.freedesktop.org
Fri Aug 18 18:11:46 EEST 2006


 configure.ac            |    7 +++++++
 dix/globals.c           |    1 +
 dix/main.c              |   12 ++++++++++++
 dix/window.c            |   21 +++++++++++++++------
 include/dix-config.h.in |    3 +++
 include/opaque.h        |    1 +
 os/utils.c              |    3 +++
 7 files changed, 42 insertions(+), 6 deletions(-)

New commits:
diff-tree a56b98bb047003a05e26ca9365c212a2da7ac200 (from 0704bb298cc826cd117815898c6bc015a693c2c9)
Author: Daniel Stone <daniel.stone at nokia.com>
Date:   Fri Aug 18 18:03:41 2006 +0300

    dix: enable null root cursor
    
    Enable a blank root cursor, selectable with --enable-null-root-cursor at
    configure time.

diff --git a/configure.ac b/configure.ac
index e68021d..19ef8d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)]),
                                 [BUILTIN_FONTS=$enableval],
                                 [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.
 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/libxkb
 AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
                                         [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"])
 if test "x$have_libxdmcp" = xyes; then
 	AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS])
diff --git a/dix/main.c b/dix/main.c
index 7449c5a..f2e494e 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -249,6 +249,7 @@ main(int argc, char *argv[], char *envp[
     int		i, j, k, error;
     char	*xauthfile;
     HWEventQueueType	alwaysCheckForInput[2];
+    CursorMetricRec cm;
 
     display = "0";
 
@@ -415,9 +416,20 @@ main(int argc, char *argv[], char *envp[
 	}
 	if (!SetDefaultFont(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)))
 	    FatalError("could not open default cursor font '%s'",
 		       defaultCursorFont);
+#endif
 #ifdef DPMSExtension
  	/* check all screens, looking for DPMS Capabilities */
  	DPMSCapableFlag = DPMSSupported();
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 2cf9eaf..2e05e04 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -445,4 +445,7 @@
 /* Avoid using font servers */
 #undef NOFONTSERVERACCESS
 
+/* Use an empty root cursor */
+#undef NULL_ROOT_CURSOR
+
 #endif /* _DIX_CONFIG_H_ */
diff-tree 0704bb298cc826cd117815898c6bc015a693c2c9 (from parents)
Merge: c14036977fef7b8787c0b68f5262fa0b6a2834f5 a1ac0440bba690368aa4226468ce571be1a09d95
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Aug 18 17:30:14 2006 +0300

    Merge branch 'master' into input-hotplug

diff-tree a1ac0440bba690368aa4226468ce571be1a09d95 (from 19f673b7788d32c220e7e06734f1074b0e4a999c)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Aug 18 17:30:00 2006 +0300

    dix: fix whiteroot thinko
    Note to self: run git update-index _after_ testing, not just before.

diff --git a/dix/window.c b/dix/window.c
index c16f514..0beeb3a 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -519,9 +519,9 @@ InitRootWindow(WindowPtr pWin)
     }
     else {
         if (blackRoot)
-            pWin->background.pixel = blackPixel;
+            pWin->background.pixel = pScreen->blackPixel;
         else
-            pWin->background.pixel = whitePixel;
+            pWin->background.pixel = pScreen->whitePixel;
         backFlag |= CWBackPixel;
     } 
 
diff-tree 19f673b7788d32c220e7e06734f1074b0e4a999c (from parents)
Merge: cb0a565d2b2cf8823abbd77b4426cc2237731dc1 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Aug 18 17:05:41 2006 +0300

    Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver

diff-tree cb0a565d2b2cf8823abbd77b4426cc2237731dc1 (from 7da51447eaab34292e14077fb5a48e6b2e587781)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Fri Aug 18 17:04:48 2006 +0300

    dix: add whiteroot flag
    Add a -wr option to use a white root window, and use a BackPixel rather
    than BackPixmap for both white and black root windows.

diff --git a/dix/globals.c b/dix/globals.c
index 5b854aa..fc77ca7 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -143,6 +143,7 @@ FontPtr defaultFont;   /* not declared i
 Bool loadableFonts = FALSE;
 CursorPtr rootCursor;
 Bool blackRoot=FALSE;
+Bool whiteRoot=FALSE;
 ClientPtr requestingClient;	/* XXX this should be obsolete now, remove? */
 
 _X_EXPORT TimeStamp currentTime;
diff --git a/dix/window.c b/dix/window.c
index ebc6923..c16f514 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -343,9 +343,6 @@ MakeRootTile(WindowPtr pWin)
 	for (j = len; j > 0; j--)
 	    *to++ = *from;
 
-   if (blackRoot)
-       bzero(back, sizeof(back));
-
    (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1,
 		    0, 0, len, 4, 0, XYBitmap, (char *)back);
 
@@ -506,6 +503,7 @@ void
 InitRootWindow(WindowPtr pWin)
 {
     ScreenPtr pScreen = pWin->drawable.pScreen;
+    int backFlag = CWBorderPixel | CWCursor | CWBackingStore;
 
     if (!(*pScreen->CreateWindow)(pWin))
 	return; /* XXX */
@@ -514,12 +512,23 @@ InitRootWindow(WindowPtr pWin)
     pWin->cursorIsNone = FALSE;
     pWin->optional->cursor = rootCursor;
     rootCursor->refcnt++;
-    MakeRootTile(pWin);
+
+    if (!blackRoot && !whiteRoot) {
+        MakeRootTile(pWin);
+        backFlag |= CWBackPixmap;
+    }
+    else {
+        if (blackRoot)
+            pWin->background.pixel = blackPixel;
+        else
+            pWin->background.pixel = whitePixel;
+        backFlag |= CWBackPixel;
+    } 
+
     pWin->backingStore = defaultBackingStore;
     pWin->forcedBS = (defaultBackingStore != NotUseful);
     /* We SHOULD check for an error value here XXX */
-    (*pScreen->ChangeWindowAttributes)(pWin,
-		       CWBackPixmap|CWBorderPixel|CWCursor|CWBackingStore);
+    (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
 
     MapWindow(pWin, serverClient);
 }
diff --git a/include/opaque.h b/include/opaque.h
index 4ccccd0..3d19d27 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -73,6 +73,7 @@ extern int limitNoFile;
 extern Bool defeatAccessControl;
 extern long maxBigRequestSize;
 extern Bool blackRoot;
+extern Bool whiteRoot;
 
 extern Bool CoreDump;
 
diff --git a/os/utils.c b/os/utils.c
index 6bf8624..31ae26a 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -642,6 +642,7 @@ void UseMsg(void)
     ErrorF("v                      video blanking for screen-saver\n");
     ErrorF("-v                     screen-saver without video blanking\n");
     ErrorF("-wm                    WhenMapped default backing-store\n");
+    ErrorF("-wr                    create root window with white background\n");
     ErrorF("-x string              loads named extension at init time \n");
     ErrorF("-maxbigreqsize         set maximal bigrequest size \n");
 #ifdef PANORAMIX
@@ -983,6 +984,8 @@ ProcessCommandLine(int argc, char *argv[
 	    defaultScreenSaverBlanking = DontPreferBlanking;
 	else if ( strcmp( argv[i], "-wm") == 0)
 	    defaultBackingStore = WhenMapped;
+        else if ( strcmp( argv[i], "-wr") == 0)
+            whiteRoot = TRUE;
         else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
              if(++i < argc) {
                  long reqSizeArg = atol(argv[i]);



More information about the xorg-commit mailing list