summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/panoramiXprocs.c10
-rw-r--r--dix/dispatch.c52
-rw-r--r--include/dix.h6
-rw-r--r--include/scrnintstr.h7
-rw-r--r--mi/mi.h7
-rw-r--r--mi/miexpose.c47
-rw-r--r--mi/miscrinit.c1
7 files changed, 58 insertions, 72 deletions
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 83a2e0856..aa3859fdb 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -1193,9 +1193,8 @@ PanoramiXCopyArea(ClientPtr client)
Bool overlap;
RegionValidate(&totalReg, &overlap);
- (*pDst->pScreen->SendGraphicsExpose) (client, &totalReg,
- stuff->dstDrawable,
- X_CopyArea, 0);
+ SendGraphicsExpose(client, &totalReg, stuff->dstDrawable,
+ X_CopyArea, 0);
RegionUninit(&totalReg);
}
}
@@ -1306,9 +1305,8 @@ PanoramiXCopyPlane(ClientPtr client)
Bool overlap;
RegionValidate(&totalReg, &overlap);
- (*pdstDraw->pScreen->SendGraphicsExpose) (client, &totalReg,
- stuff->dstDrawable,
- X_CopyPlane, 0);
+ SendGraphicsExpose(client, &totalReg, stuff->dstDrawable,
+ X_CopyPlane, 0);
RegionUninit(&totalReg);
}
diff --git a/dix/dispatch.c b/dix/dispatch.c
index f7a08f82e..74abecd67 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -1597,6 +1597,52 @@ ProcClearToBackground(ClientPtr client)
return Success;
}
+/* send GraphicsExpose events, or a NoExpose event, based on the region */
+void
+SendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
+ int major, int minor)
+{
+ if (pRgn && !RegionNil(pRgn)) {
+ xEvent *pEvent;
+ xEvent *pe;
+ BoxPtr pBox;
+ int i;
+ int numRects;
+
+ numRects = RegionNumRects(pRgn);
+ pBox = RegionRects(pRgn);
+ if (!(pEvent = calloc(numRects, sizeof(xEvent))))
+ return;
+ pe = pEvent;
+
+ for (i = 1; i <= numRects; i++, pe++, pBox++) {
+ pe->u.u.type = GraphicsExpose;
+ pe->u.graphicsExposure.drawable = drawable;
+ pe->u.graphicsExposure.x = pBox->x1;
+ pe->u.graphicsExposure.y = pBox->y1;
+ pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
+ pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
+ pe->u.graphicsExposure.count = numRects - i;
+ pe->u.graphicsExposure.majorEvent = major;
+ pe->u.graphicsExposure.minorEvent = minor;
+ }
+ /* GraphicsExpose is a "critical event", which TryClientEvents
+ * handles specially. */
+ TryClientEvents(client, NULL, pEvent, numRects,
+ (Mask) 0, NoEventMask, NullGrab);
+ free(pEvent);
+ }
+ else {
+ xEvent event = {
+ .u.noExposure.drawable = drawable,
+ .u.noExposure.majorEvent = major,
+ .u.noExposure.minorEvent = minor
+ };
+ event.u.u.type = NoExpose;
+ WriteEventsToClient(client, 1, &event);
+ }
+}
+
int
ProcCopyArea(ClientPtr client)
{
@@ -1628,8 +1674,7 @@ ProcCopyArea(ClientPtr client)
stuff->width, stuff->height,
stuff->dstX, stuff->dstY);
if (pGC->graphicsExposures) {
- (*pDst->pScreen->SendGraphicsExpose)
- (client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
+ SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
if (pRgn)
RegionDestroy(pRgn);
}
@@ -1676,8 +1721,7 @@ ProcCopyPlane(ClientPtr client)
stuff->srcY, stuff->width, stuff->height,
stuff->dstX, stuff->dstY, stuff->bitPlane);
if (pGC->graphicsExposures) {
- (*pdstDraw->pScreen->SendGraphicsExpose)
- (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
+ SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
if (pRgn)
RegionDestroy(pRgn);
}
diff --git a/include/dix.h b/include/dix.h
index 61ecc8df2..116da2e2c 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -254,6 +254,12 @@ extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
+extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ ,
+ RegionPtr /*pRgn */ ,
+ XID /*drawable */ ,
+ int /*major */ ,
+ int /*minor */);
+
/* atom.c */
extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 7331ec1b6..269ff5a0c 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -252,12 +252,6 @@ typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
-typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
- RegionPtr /*pRgn */ ,
- XID /*drawable */ ,
- int /*major */ ,
- int /*minor */ );
-
typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen,
void *pTimeout,
void *pReadmask);
@@ -540,7 +534,6 @@ typedef struct _Screen {
/* Region procedures */
BitmapToRegionProcPtr BitmapToRegion;
- SendGraphicsExposeProcPtr SendGraphicsExpose;
/* os layer procedures */
diff --git a/mi/mi.h b/mi/mi.h
index 700bb116e..8cb3ce7a5 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -232,13 +232,6 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ ,
int /*dsty */
);
-extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,
- RegionPtr /*pRgn */ ,
- XID /*drawable */ ,
- int /*major */ ,
- int /*minor */
- );
-
extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
RegionPtr /*pRgn */ ,
int /*dx */ ,
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 7a1c17225..555f3b20a 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -306,53 +306,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
}
}
-/* send GraphicsExpose events, or a NoExpose event, based on the region */
-
-void
-miSendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
- int major, int minor)
-{
- if (pRgn && !RegionNil(pRgn)) {
- xEvent *pEvent;
- xEvent *pe;
- BoxPtr pBox;
- int i;
- int numRects;
-
- numRects = RegionNumRects(pRgn);
- pBox = RegionRects(pRgn);
- if (!(pEvent = calloc(numRects, sizeof(xEvent))))
- return;
- pe = pEvent;
-
- for (i = 1; i <= numRects; i++, pe++, pBox++) {
- pe->u.u.type = GraphicsExpose;
- pe->u.graphicsExposure.drawable = drawable;
- pe->u.graphicsExposure.x = pBox->x1;
- pe->u.graphicsExposure.y = pBox->y1;
- pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
- pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
- pe->u.graphicsExposure.count = numRects - i;
- pe->u.graphicsExposure.majorEvent = major;
- pe->u.graphicsExposure.minorEvent = minor;
- }
- /* GraphicsExpose is a "critical event", which TryClientEvents
- * handles specially. */
- TryClientEvents(client, NULL, pEvent, numRects,
- (Mask) 0, NoEventMask, NullGrab);
- free(pEvent);
- }
- else {
- xEvent event = {
- .u.noExposure.drawable = drawable,
- .u.noExposure.majorEvent = major,
- .u.noExposure.minorEvent = minor
- };
- event.u.u.type = NoExpose;
- WriteEventsToClient(client, 1, &event);
- }
-}
-
void
miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
{
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 00c15f713..ec4d10819 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -259,7 +259,6 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
/* ListInstalledColormaps, StoreColors, ResolveColor */
/* BitmapToRegion */
- pScreen->SendGraphicsExpose = miSendGraphicsExpose;
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA;
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA;
pScreen->MarkWindow = miMarkWindow;