summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>2007-05-12 17:41:47 -0400
committerSoren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com>2007-05-15 11:13:15 -0400
commitdde0ceac4ea7639d0096bfd26f37c5851778854c (patch)
treef1fd917f55750d42c2195d7a564da2fc7546c7d5
parente037052ac522150786abf44d3a04c813cc490050 (diff)
Add new InitRegions() function called from dix/main
-rw-r--r--dix/main.c1
-rw-r--r--include/regionstr.h2
-rw-r--r--mi/miregion.c7
3 files changed, 10 insertions, 0 deletions
diff --git a/dix/main.c b/dix/main.c
index 9a67ed9bb..623ce9c28 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -253,6 +253,7 @@ main(int argc, char *argv[], char *envp[])
display = "0";
InitGlobals();
+ InitRegions();
#ifdef XPRINT
PrinterInitGlobals();
#endif
diff --git a/include/regionstr.h b/include/regionstr.h
index 8d47c028e..f44cab7b0 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -225,6 +225,8 @@ extern RegDataRec miBrokenData;
/* moved from mi.h */
+extern void InitRegions (void);
+
extern RegionPtr miRegionCreate(
BoxPtr /*rect*/,
int /*size*/);
diff --git a/mi/miregion.c b/mi/miregion.c
index 0eab6623a..4bfe9c722 100644
--- a/mi/miregion.c
+++ b/mi/miregion.c
@@ -85,6 +85,7 @@ Equipment Corporation.
#include "gc.h"
#include "mi.h"
#include "mispans.h"
+#include <pixman/pixman.h>
#undef assert
#ifdef DEBUG
@@ -218,6 +219,12 @@ _X_EXPORT RegDataRec miEmptyData = {0, 0};
RegDataRec miBrokenData = {0, 0};
static RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData };
+extern void
+InitRegions (void)
+{
+ pixman_region_set_static_pointers (&miEmptyBox, &miEmptyData, &miBrokenData);
+}
+
_X_EXPORT void
miPrintRegion(rgn)
RegionPtr rgn;