diff options
author | Keith Whitwell <[email protected]> | 2003-05-02 17:31:42 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2003-05-02 17:31:42 +0000 |
commit | f92291e02e6c0457dbf3fd44a14202b9e6517422 (patch) | |
tree | 4b5eee59fcdd8b0392f8f8604e27f0a7de4779b0 | |
parent | 15ebff0419200ddc42f4186881a9ebe2f50906ea (diff) |
mprotect sarea until focus gained
-rw-r--r-- | src/miniglx/dri_util.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/miniglx/dri_util.c b/src/miniglx/dri_util.c index ba1d619d9fa..f67a2a31375 100644 --- a/src/miniglx/dri_util.c +++ b/src/miniglx/dri_util.c @@ -24,6 +24,7 @@ #include "miniglxP.h" #include <linux/vt.h> #include <sys/ioctl.h> +#include <sys/mman.h> #include "sarea.h" @@ -381,7 +382,7 @@ static void *driCreateDrawable(Display *dpy, int scrn, pdp->y = 0; pdp->w = pdp->draw->w; pdp->h = pdp->draw->h; - pdp->numClipRects = 1; + pdp->numClipRects = 0; pdp->pClipRects = (XF86DRIClipRectPtr) malloc(sizeof(XF86DRIClipRectRec)); (pdp->pClipRects)[0].x1 = 0; (pdp->pClipRects)[0].y1 = 0; @@ -415,7 +416,6 @@ static void *driCreateDrawable(Display *dpy, int scrn, pdp->swapBuffers = psp->DriverAPI.SwapBuffers; pdp->pStamp = &(psp->pSAREA->drawableTable[pdp->index].stamp); - __driUtilUpdateDrawableInfo( pdp ); return (void *) pdp; } @@ -692,6 +692,11 @@ __driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, free(psp); return NULL; } + +#if !_HAVE_FULL_GL + mprotect(psp->pSAREA, dpy->driverContext.shared.SAREASize, PROT_READ); +#endif + } else { psp->pFB = dpy->driverContext.FBAddress; psp->pSAREA = dpy->driverContext.pSAREA; |