summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;