xserver: Branch 'master' - 3 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Thu Oct 23 16:33:19 PDT 2008


 hw/xquartz/pbproxy/main.m        |    1 
 hw/xquartz/pbproxy/pbproxy.h     |   11 ++----
 hw/xquartz/pbproxy/x-selection.h |    4 +-
 hw/xquartz/pbproxy/x-selection.m |    2 -
 miext/rootless/rootlessGC.c      |   71 ++++++++++++++++++++++++++++-----------
 miext/rootless/rootlessValTree.c |   32 +++++++----------
 miext/rootless/rootlessWindow.c  |   24 +++++++++----
 7 files changed, 89 insertions(+), 56 deletions(-)

New commits:
commit b7cc6ca22a4ff7a94abee6962a07fdd0b563d26a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Oct 23 16:33:11 2008 -0700

    miext/rootless: Silence some warnings by using proper C prototypes.
    (cherry picked from commit 050e46e09efcc7e6f090fa4a749e9076c972b760)

diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 1c787b6..d60cd27 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -61,6 +61,8 @@ static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue,
 static void RootlessDestroyClip(GCPtr pGC);
 static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
 
+Bool RootlessCreateGC(GCPtr pGC);
+
 GCFuncs rootlessGCFuncs = {
     RootlessValidateGC,
     RootlessChangeGC,
@@ -72,26 +74,55 @@ GCFuncs rootlessGCFuncs = {
 };
 
 // GC operations
-static void RootlessFillSpans();
-static void RootlessSetSpans();
-static void RootlessPutImage();
-static RegionPtr RootlessCopyArea();
-static RegionPtr RootlessCopyPlane();
-static void RootlessPolyPoint();
-static void RootlessPolylines();
-static void RootlessPolySegment();
-static void RootlessPolyRectangle();
-static void RootlessPolyArc();
-static void RootlessFillPolygon();
-static void RootlessPolyFillRect();
-static void RootlessPolyFillArc();
-static int RootlessPolyText8();
-static int RootlessPolyText16();
-static void RootlessImageText8();
-static void RootlessImageText16();
-static void RootlessImageGlyphBlt();
-static void RootlessPolyGlyphBlt();
-static void RootlessPushPixels();
+static void RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit,
+			      DDXPointPtr pptInit, int *pwidthInit, 
+			      int sorted);
+static void RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc,
+			     DDXPointPtr pptInit, int *pwidthInit,
+			     int nspans, int sorted);
+static void RootlessPutImage(DrawablePtr dst, GCPtr pGC,
+			     int depth, int x, int y, int w, int h,
+			     int leftPad, int format, char *pBits);
+static RegionPtr RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC,
+				  int srcx, int srcy, int w, int h,
+				  int dstx, int dsty);
+static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst,
+                                   GCPtr pGC, int srcx, int srcy,
+                                   int w, int h, int dstx, int dsty,
+                                   unsigned long plane);
+static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC,
+                              int mode, int npt, DDXPointPtr pptInit);
+static void RootlessPolylines(DrawablePtr dst, GCPtr pGC,
+                              int mode, int npt, DDXPointPtr pptInit);
+static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC,
+                                int nseg, xSegment *pSeg);
+static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC,
+                                  int nRects, xRectangle *pRects);
+static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs);
+static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC,
+                                int shape, int mode, int count,
+                                DDXPointPtr pptInit);
+static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC,
+                                 int nRectsInit, xRectangle *pRectsInit);
+static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC,
+                                int narcsInit, xArc *parcsInit);
+static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC,
+			     int x, int y, int count, char *chars);
+static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC,
+			      int x, int y, int count, unsigned short *chars);
+static void RootlessImageText8(DrawablePtr dst, GCPtr pGC,
+                               int x, int y, int count, char *chars);
+static void RootlessImageText16(DrawablePtr dst, GCPtr pGC,
+                                int x, int y, int count, unsigned short *chars);
+static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC,
+                                  int x, int y, unsigned int nglyphInit,
+                                  CharInfoPtr *ppciInit, pointer unused);
+static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC,
+                                 int x, int y, unsigned int nglyph,
+                                 CharInfoPtr *ppci, pointer pglyphBase);
+static void RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst,
+			       int dx, int dy, int xOrg, int yOrg);
+
 
 static GCOps rootlessGCOps = {
     RootlessFillSpans,
diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c
index d52a2af..47cd679 100644
--- a/miext/rootless/rootlessValTree.c
+++ b/miext/rootless/rootlessValTree.c
@@ -104,15 +104,17 @@ Equipment Corporation.
 
 #include    "globals.h"
 
+int RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe,
+			RegionPtr bounding, BoxPtr rect, int x, int y);
+
+int RootlessMiValidateTree (WindowPtr pRoot, WindowPtr pChild, VTKind kind);
+
 /*
  * Compute the visibility of a shaped window
  */
 int
-RootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y)
-    ScreenPtr	pScreen;
-    RegionPtr	universe, bounding;
-    BoxPtr	rect;
-    register int x, y;
+RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe,
+			RegionPtr bounding, BoxPtr rect, int x, int y)
 {
     BoxRec  box;
     register BoxPtr  boundBox;
@@ -189,12 +191,8 @@ RootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y)
  *-----------------------------------------------------------------------
  */
 static void
-RootlessComputeClips (pParent, pScreen, universe, kind, exposed)
-    register WindowPtr	pParent;
-    register ScreenPtr	pScreen;
-    register RegionPtr	universe;
-    VTKind		kind;
-    RegionPtr		exposed; /* for intermediate calculations */
+RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, 
+		      RegionPtr universe, VTKind kind, RegionPtr exposed)
 {
     int			dx,
 			dy;
@@ -510,8 +508,7 @@ RootlessComputeClips (pParent, pScreen, universe, kind, exposed)
 }
 
 static void
-RootlessTreeObscured(pParent)
-    register WindowPtr pParent;
+RootlessTreeObscured(WindowPtr pParent)
 {
     register WindowPtr pChild;
     register int    oldVis;
@@ -577,11 +574,10 @@ RootlessTreeObscured(pParent)
 // fixme this is ugly
 // Xprint/ValTree.c doesn't work, but maybe that method can?
 int
-RootlessMiValidateTree (pRoot, pChild, kind)
-    WindowPtr	  	pRoot;      /* Parent to validate */
-    WindowPtr	  	pChild;     /* First child of pRoot that was
-				     * affected */
-    VTKind    	  	kind;       /* What kind of configuration caused call */
+RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */
+			WindowPtr pChild, /* First child of pRoot that was
+					   * affected */
+			VTKind kind /* What kind of configuration caused call */)
 {
     RegionRec	  	childClip;  /* The new borderClip for the current
 				     * child */
commit b397cc727787a854417b11b482cce4807fc8ab58
Author: George Peter Staplin <gps at Georges-Workstation.local>
Date:   Thu Oct 23 16:19:58 2008 -0600

    miext/rootless: Fix the usage of DeleteProperty so that this builds again.
    (cherry picked from commit 3de250e28a9a86bcae4464a15c2025805877ce1e)

diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 5ef1391..a2d0313 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -272,6 +272,12 @@ RootlessGetShape(WindowPtr pWin, RegionPtr pShape)
 {
     ScreenPtr pScreen = pWin->drawable.pScreen;
 
+    /* 
+     * Avoid a warning.  
+     * REGION_NULL and the other macros don't actually seem to use pScreen.
+     */
+    (void)pScreen; 
+
     if (wBoundingShape(pWin) == NULL)
         return FALSE;
 
@@ -1598,15 +1604,19 @@ RootlessDisableRoot (ScreenPtr pScreen)
 {
     WindowPtr pRoot;
     RootlessWindowRec *winRec;
-    
+
     pRoot = WindowTable[pScreen->myNum];
     winRec = WINREC (pRoot);
-    
-    if (winRec != NULL)
-    {
-        RootlessDestroyFrame (pRoot, winRec);
-        DeleteProperty (pRoot, xa_native_window_id ());
-    }
+
+    if (NULL == winRec)
+	return;
+           
+    RootlessDestroyFrame (pRoot, winRec);
+    /* 
+     * gstaplin: I fixed the usage of this DeleteProperty so that it would compile.
+     * QUESTION: Where is this xa_native_window_id set?
+     */
+    DeleteProperty (serverClient, pRoot, xa_native_window_id ());
 }
 
 void
commit 28d4f71193d2be26d1dcae724067539ac9db1123
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Oct 23 15:01:03 2008 -0700

    XQuartz: pbproxy: Fix compilation on case-sensitive file systems...
    (cherry picked from commit 6622efca216663c99d112c7a226bde691d1f3215)

diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index 231b212..f023eee 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -8,7 +8,6 @@
 
 #include <pthread.h>
 #include <X11/extensions/applewm.h>
-#include <X11/extensions/xfixes.h>
 
 Display *x_dpy;
 int x_apple_wm_event_base, x_apple_wm_error_base;
diff --git a/hw/xquartz/pbproxy/pbproxy.h b/hw/xquartz/pbproxy/pbproxy.h
index 1b0ed2b..324d56c 100644
--- a/hw/xquartz/pbproxy/pbproxy.h
+++ b/hw/xquartz/pbproxy/pbproxy.h
@@ -12,10 +12,6 @@
 #include <X11/extensions/shape.h>
 #undef   Cursor
 
-#ifndef DEBUG
-#define DEBUG 0
-#endif
-
 #ifndef INTEGRATED_XPBPROXY
 extern BOOL prefs_reload;
 #endif
@@ -36,11 +32,12 @@ extern BOOL have_xfixes;
 extern BOOL x_input_register (void);
 extern void x_input_run (void);
 
-#if DEBUG == 0
-# define DB(msg, args...) do {} while (0)
-#else
+#ifdef DEBUG
 /* BEWARE: this can cause a string memory leak, according to the leaks program. */
 # define DB(msg, args...) debug_printf("%s:%s:%d " msg, __FILE__, __FUNCTION__, __LINE__, ##args)
+#else
+# define DB(msg, args...) do {} while (0)
+#else
 #endif
 
 #define TRACE() DB("TRACE\n")
diff --git a/hw/xquartz/pbproxy/x-selection.h b/hw/xquartz/pbproxy/x-selection.h
index 0be8d81..7a26a21 100644
--- a/hw/xquartz/pbproxy/x-selection.h
+++ b/hw/xquartz/pbproxy/x-selection.h
@@ -32,8 +32,10 @@
 #define X_SELECTION_H 1
 
 #include "pbproxy.h"
+
+#include <X11/extensions/Xfixes.h>
+
 #include <AppKit/NSPasteboard.h>
-#include <X11/extensions/xfixes.h>
 
 /* This stores image data or text. */
 struct propdata {
diff --git a/hw/xquartz/pbproxy/x-selection.m b/hw/xquartz/pbproxy/x-selection.m
index 304bee7..3cc1201 100644
--- a/hw/xquartz/pbproxy/x-selection.m
+++ b/hw/xquartz/pbproxy/x-selection.m
@@ -37,8 +37,6 @@
 #include <X11/Xutil.h>
 #import <AppKit/NSBitmapImageRep.h>
 
-#include <X11/extensions/xfixes.h>
-
 /*
  * The basic design of the pbproxy code is as follows.
  *


More information about the xorg-commit mailing list