diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:49:22 +0000 |
commit | d568221710959cf7d783e6ff0fb80fb43a231124 (patch) | |
tree | 8d6f039393294c6ffac8533639afdebe5d68bfc1 /mi/miexpose.c | |
parent | 9508a382f8a9f241dab097d921b6d290c1c3a776 (diff) |
XFree86 4.3.0.1
Diffstat (limited to 'mi/miexpose.c')
-rw-r--r-- | mi/miexpose.c | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c index cacb2f983..ca896b9e0 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.9 2001/12/14 20:00:22 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -64,7 +65,12 @@ SOFTWARE. #include "mi.h" #include "Xmd.h" -extern WindowPtr *WindowTable; +#include "globals.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif /* machine-independent graphics exposure code. any device that uses @@ -103,7 +109,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable, int dstx, dsty; unsigned long plane; { - register ScreenPtr pscr = pGC->pScreen; + register ScreenPtr pscr; RegionPtr prgnSrcClip; /* drawable-relative source clip */ RegionRec rgnSrcRec; RegionPtr prgnDstClip; /* drawable-relative dest clip */ @@ -120,6 +126,9 @@ miHandleExposures(pSrcDrawable, pDstDrawable, BoxRec expBox; Bool extents; + /* This prevents warning about pscr not being used. */ + pGC->pScreen = pscr = pGC->pScreen; + /* avoid work if we can */ if (!pGC->graphicsExposures && (pDstDrawable->type == DRAWABLE_PIXMAP) && @@ -388,6 +397,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor) } } + void miSendExposures(pWin, pRgn, dx, dy) WindowPtr pWin; @@ -414,7 +424,40 @@ miSendExposures(pWin, pRgn, dx, dy) pe->u.expose.height = pBox->y2 - pBox->y1; pe->u.expose.count = i; } + +#ifdef PANORAMIX + if(!noPanoramiXExtension) { + int scrnum = pWin->drawable.pScreen->myNum; + int x = 0, y = 0; + XID realWin = 0; + + if(!pWin->parent) { + x = panoramiXdataPtr[scrnum].x; + y = panoramiXdataPtr[scrnum].y; + pWin = WindowTable[0]; + realWin = pWin->drawable.id; + } else if (scrnum) { + PanoramiXRes *win; + win = PanoramiXFindIDByScrnum(XRT_WINDOW, + pWin->drawable.id, scrnum); + if(!win) { + DEALLOCATE_LOCAL(pEvent); + return; + } + realWin = win->info[0].id; + pWin = LookupIDByType(realWin, RT_WINDOW); + } + if(x || y || scrnum) + for (i = 0; i < numRects; i++) { + pEvent[i].u.expose.window = realWin; + pEvent[i].u.expose.x += x; + pEvent[i].u.expose.y += y; + } + } +#endif + DeliverEvents(pWin, pEvent, numRects, NullWindow); + DEALLOCATE_LOCAL(pEvent); } @@ -540,9 +583,9 @@ static GCPtr screenContext[MAXSCREENS]; /*ARGSUSED*/ static int -tossGC (value, id) -pointer value; -XID id; +tossGC ( + pointer value, + XID id) { GCPtr pGC = (GCPtr)value; screenContext[pGC->pScreen->myNum] = (GCPtr)NULL; @@ -550,6 +593,8 @@ XID id; numGCs--; if (!numGCs) ResType = 0; + + return 0; } @@ -807,6 +852,7 @@ int what; /* MICLEARDRAWABLE -- sets the entire drawable to the background color of * the GC. Useful when we have a scratch drawable and need to initialize * it. */ +void miClearDrawable(pDraw, pGC) DrawablePtr pDraw; GCPtr pGC; |