summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-04-04 09:58:53 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-04-04 09:58:53 +1000
commita52049de2f846fe984d4db5ac8d2c1826c7b2d0b (patch)
tree2dbc6d4e1a5cbf42b6f72258085acbfb1284009a /hw
parentd044d3675635f037bf0eb30e47f82460f78227d1 (diff)
parent266ea63bc3e052b753c5484fa08dcc4fb67c8952 (diff)
Merge branch 'master' of git://people.freedesktop.org/~herrb/xserver into for-keith
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/glxProxy/glxserver.h8
-rw-r--r--hw/kdrive/src/kdrive.c93
-rw-r--r--hw/kdrive/src/kdrive.h3
-rw-r--r--hw/xfree86/common/xf86Helper.c104
-rw-r--r--hw/xfree86/dri/dri.c4
-rw-r--r--hw/xfree86/modes/xf86RandR12.c2
-rw-r--r--hw/xfree86/parser/Pointer.c2
-rw-r--r--hw/xquartz/GL/indirect.c24
-rw-r--r--hw/xquartz/applewm.c2
-rw-r--r--hw/xquartz/darwin.c110
-rw-r--r--hw/xquartz/darwin.h1
-rw-r--r--hw/xquartz/quartz.c2
-rw-r--r--hw/xquartz/threadSafety.h2
-rw-r--r--hw/xquartz/xpr/xprScreen.c2
-rw-r--r--hw/xwin/glx/indirect.c10
-rw-r--r--hw/xwin/winrandr.c104
16 files changed, 14 insertions, 459 deletions
diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
index 17adce46a..cd833f853 100644
--- a/hw/dmx/glxProxy/glxserver.h
+++ b/hw/dmx/glxProxy/glxserver.h
@@ -92,14 +92,6 @@ extern GLint __glXNumActiveScreens;
extern __GLXcontext *__glXLastContext;
extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
-/*
-** Macros to set, unset, and retrieve the flag that says whether a context
-** has unflushed commands.
-*/
-#define __GLX_NOTE_UNFLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_TRUE
-#define __GLX_NOTE_FLUSHED_CMDS(glxc) glxc->hasUnflushedCommands = GL_FALSE
-#define __GLX_HAS_UNFLUSHED_CMDS(glxc) (glxc->hasUnflushedCommands)
-
/************************************************************************/
typedef struct {
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index c688eb038..f034ce463 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -92,95 +92,6 @@ static Bool kdCaughtSignal = FALSE;
KdOsFuncs *kdOsFuncs;
void
-KdSetRootClip (ScreenPtr pScreen, BOOL enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable;
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (!pWin)
- return;
- WasViewable = (Bool)(pWin->viewable);
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- RegionReset(&pWin->borderClip, &box);
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
-}
-
-void
KdDisableScreen (ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
@@ -188,7 +99,7 @@ KdDisableScreen (ScreenPtr pScreen)
if (!pScreenPriv->enabled)
return;
if (!pScreenPriv->closed)
- KdSetRootClip (pScreen, FALSE);
+ SetRootClip (pScreen, FALSE);
KdDisableColormap (pScreen);
if (!pScreenPriv->screen->dumb && pScreenPriv->card->cfuncs->disableAccel)
(*pScreenPriv->card->cfuncs->disableAccel) (pScreen);
@@ -271,7 +182,7 @@ KdEnableScreen (ScreenPtr pScreen)
if (!pScreenPriv->screen->dumb && pScreenPriv->card->cfuncs->enableAccel)
(*pScreenPriv->card->cfuncs->enableAccel) (pScreen);
KdEnableColormap (pScreen);
- KdSetRootClip (pScreen, TRUE);
+ SetRootClip (pScreen, TRUE);
if (pScreenPriv->card->cfuncs->dpms)
(*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState);
return TRUE;
diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index 3ca98146b..2ab535aef 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -387,9 +387,6 @@ KdStoreColors (ColormapPtr pCmap, int ndef, xColorItem *pdefs);
extern miPointerScreenFuncRec kdPointerScreenFuncs;
void
-KdSetRootClip (ScreenPtr pScreen, BOOL enable);
-
-void
KdDisableScreen (ScreenPtr pScreen);
void
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 1a5bf8a1c..399883886 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -983,106 +983,6 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen)
}
/*
- * xf86SetRootClip --
- * Enable or disable rendering to the screen by
- * setting the root clip list and revalidating
- * all of the windows
- */
-
-static void
-xf86SetRootClip (ScreenPtr pScreen, Bool enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- if (WasViewable)
- RegionReset(&pWin->borderClip, &box);
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
-
-/*
* Function to enable/disable access to the frame buffer
*
* This is used when VT switching and when entering/leaving DGA direct mode.
@@ -1115,7 +1015,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
* Restore all of the clip lists on the screen
*/
if (!xf86Resetting)
- xf86SetRootClip (pScreen, TRUE);
+ SetRootClip (pScreen, TRUE);
}
else
@@ -1123,7 +1023,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
/*
* Empty all of the clip lists on the screen
*/
- xf86SetRootClip (pScreen, FALSE);
+ SetRootClip (pScreen, FALSE);
}
}
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 3c64ae443..bb5482a0b 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1497,10 +1497,6 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
*stamp = pDRIPriv->pSAREA->drawableTable[*index].stamp;
*X = (int)(pWin->drawable.x);
*Y = (int)(pWin->drawable.y);
-#if 0
- *W = (int)(pWin->winSize.extents.x2 - pWin->winSize.extents.x1);
- *H = (int)(pWin->winSize.extents.y2 - pWin->winSize.extents.y1);
-#endif
*W = (int)(pWin->drawable.width);
*H = (int)(pWin->drawable.height);
*numClipRects = RegionNumRects(&pWin->clipList);
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 744a03abe..2ebe0aec2 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1755,6 +1755,7 @@ xf86RandR12EnterVT (int screen_index, int flags)
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
Bool ret;
+ int i;
if (randrp->orig_EnterVT) {
pScrn->EnterVT = randrp->orig_EnterVT;
@@ -1766,7 +1767,6 @@ xf86RandR12EnterVT (int screen_index, int flags)
}
/* reload gamma */
- int i;
for (i = 0; i < rp->numCrtcs; i++)
xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]);
diff --git a/hw/xfree86/parser/Pointer.c b/hw/xfree86/parser/Pointer.c
index 65397cd81..e8ad290f9 100644
--- a/hw/xfree86/parser/Pointer.c
+++ b/hw/xfree86/parser/Pointer.c
@@ -189,7 +189,7 @@ xf86parsePointerSection (void)
if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) {
Error (ZAXISMAPPING_MSG, NULL);
}
- if (asprintf(&s, "%ul %ul", val1, val.num) == -1)
+ if (asprintf(&s, "%lu %u", val1, val.num) == -1)
s = NULL;
break;
case XAXIS:
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index bdc7c3d50..32fb12a5f 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -174,7 +174,6 @@ static __GLXdrawable * __glXAquaScreenCreateDrawable(ClientPtr client, __GLXscre
static void __glXAquaContextDestroy(__GLXcontext *baseContext);
static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext);
static int __glXAquaContextLoseCurrent(__GLXcontext *baseContext);
-static int __glXAquaContextForceCurrent(__GLXcontext *baseContext);
static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, unsigned long mask);
static CGLPixelFormatObj makeFormat(__GLXconfig *conf);
@@ -235,7 +234,6 @@ __glXAquaScreenCreateContext(__GLXscreen *screen,
context->base.makeCurrent = __glXAquaContextMakeCurrent;
context->base.loseCurrent = __glXAquaContextLoseCurrent;
context->base.copy = __glXAquaContextCopy;
- context->base.forceCurrent = __glXAquaContextForceCurrent;
/*FIXME verify that the context->base is fully initialized. */
context->pixelFormat = makeFormat(conf);
@@ -458,19 +456,6 @@ static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, un
return gl_err == 0;
}
-static int __glXAquaContextForceCurrent(__GLXcontext *baseContext)
-{
- CGLError gl_err;
- __GLXAquaContext *context = (__GLXAquaContext *) baseContext;
- GLAQUA_DEBUG_MSG("glAquaForceCurrent (ctx %p)\n", context->ctx);
-
- gl_err = CGLSetCurrentContext(context->ctx);
- if (gl_err != 0)
- ErrorF("CGLSetCurrentContext error: %s\n", CGLErrorString(gl_err));
-
- return gl_err == 0;
-}
-
/* Drawing surface notification callbacks */
static GLboolean __glXAquaDrawableSwapBuffers(ClientPtr client, __GLXdrawable *base) {
CGLError err;
@@ -681,17 +666,8 @@ GLuint __glFloorLog2(GLuint val)
return c;
}
-void warn_func(void * p1, char *format, ...) {
- va_list v;
- va_start(v, format);
- vfprintf(stderr, format, v);
- va_end(v);
-}
-
static void setup_dispatch_table(void) {
struct _glapi_table *disp=_glapi_get_dispatch();
- _glapi_set_warning_func((_glapi_warning_func)warn_func);
- _glapi_noop_enable_warnings(TRUE);
/* to update:
* for f in $(grep 'define SET_' ../../../glx/dispatch.h | cut -f2 -d' ' | cut -f1 -d\( | sort -u); do grep -q $f indirect.c || echo $f ; done | grep -v by_offset | sed 's:SET_\(.*\)$:SET_\1(disp, gl\1)\;:' | pbcopy
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index ec20534e0..2f26e61d9 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -437,7 +437,7 @@ ProcAppleWMSetWindowLevel(register ClientPtr client)
DixReadAccess))
return BadValue;
- if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) {
+ if (stuff->level >= AppleWMNumWindowLevels) {
return BadValue;
}
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 33276c389..3b6f0a29e 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -767,113 +767,3 @@ void AbortDDX( void )
OsAbort();
}
-#include "mivalidate.h" // for union _Validate used by windowstr.h
-#include "windowstr.h" // for struct _Window
-#include "scrnintstr.h" // for struct _Screen
-
-// This is copied from Xserver/hw/xfree86/common/xf86Helper.c.
-// Quartz mode uses this when switching in and out of Quartz.
-// Quartz or IOKit can use this when waking from sleep.
-// Copyright (c) 1997-1998 by The XFree86 Project, Inc.
-
-/*
- * xf86SetRootClip --
- * Enable or disable rendering to the screen by
- * setting the root clip list and revalidating
- * all of the windows
- */
-
-void
-xf86SetRootClip (ScreenPtr pScreen, int enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = TRUE;
- RegionPtr pOldClip = NULL;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionReset(&pWin->borderClip, &box);
- RegionBreak(&pWin->clipList);
- }
- else
- {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->backStorage)
- {
- pOldClip = RegionCreate(NullBox, 1);
- RegionCopy(pOldClip, &pWin->clipList);
- }
-
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 350eadeb6..e874af24c 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -42,7 +42,6 @@
void DarwinPrintBanner(void);
int DarwinParseModifierList(const char *constmodifiers, int separatelr);
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
-void xf86SetRootClip (ScreenPtr pScreen, int enable);
#define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \
dixLookupPrivate(&pScreen->devPrivates, darwinScreenKey))
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 11e5a74d7..4b72a89d3 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -442,7 +442,7 @@ void QuartzSetRootClip(
for (i = 0; i < screenInfo.numScreens; i++) {
if (screenInfo.screens[i]) {
- xf86SetRootClip(screenInfo.screens[i], enable);
+ SetRootClip(screenInfo.screens[i], enable);
}
}
}
diff --git a/hw/xquartz/threadSafety.h b/hw/xquartz/threadSafety.h
index 7b009103a..3ff9eaf7e 100644
--- a/hw/xquartz/threadSafety.h
+++ b/hw/xquartz/threadSafety.h
@@ -53,4 +53,4 @@ const char *threadSafetyID(pthread_t tid);
#define TA_APPKIT()
#endif
-#endif _XQ_THREAD_SAFETY_H_
+#endif /* _XQ_THREAD_SAFETY_H_ */
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 972278b75..f6a712906 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -326,7 +326,9 @@ xprAddScreen(int index, ScreenPtr pScreen)
#endif
}
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
have_depth:
+#endif
switch(depth) {
case 8: // pseudo-working
dfb->visuals = PseudoColorMask;
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index c9831f3ea..bd2a1ad30 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -859,7 +859,7 @@ glxWinDrawableDestroy(__GLXdrawable *base)
// on the next context change)
// (GLX core considers it an error when we try to select a new current context if the old one
// has unflushed commands, but the window has disappeared..)
- __GLX_NOTE_FLUSHED_CMDS(__glXLastContext);
+ __glXLastContext->hasUnflushedCommands = FALSE;
__glXLastContext = NULL;
}
@@ -1480,13 +1480,6 @@ glxWinContextCopy(__GLXcontext *dst_base, __GLXcontext *src_base, unsigned long
return ret;
}
-static int
-glxWinContextForceCurrent(__GLXcontext *base)
-{
- /* wglMakeCurrent always flushes the previous context, so this is equivalent to glxWinContextMakeCurrent */
- return glxWinContextMakeCurrent(base);
-}
-
static void
glxWinContextDestroy(__GLXcontext *base)
{
@@ -1541,7 +1534,6 @@ glxWinCreateContext(__GLXscreen *screen,
context->base.makeCurrent = glxWinContextMakeCurrent;
context->base.loseCurrent = glxWinContextLoseCurrent;
context->base.copy = glxWinContextCopy;
- context->base.forceCurrent = glxWinContextForceCurrent;
context->base.textureFromPixmap = &glxWinTextureFromPixmap;
context->base.config = modes;
context->base.pGlxScreen = screen;
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index 248404800..c58119360 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -63,106 +63,6 @@ winRandRGetInfo (ScreenPtr pScreen, Rotation *pRotations)
return TRUE;
}
-
-/*
- Copied from the xfree86 DDX
-
- Why can't this be in DIX?
- Does union _Validate vary depending on DDX??
- */
-static void
-xf86SetRootClip (ScreenPtr pScreen, Bool enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool)(pWin->viewable);
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable)
- {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
- {
- (void) (*pScreen->MarkOverlappedWindows)(pChild,
- pChild,
- &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata)
- {
- if (HasBorder (pWin))
- {
- RegionPtr borderVisible;
-
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use REGION_BREAK to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable)
- {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- REGION_INIT (pScreen, &pWin->winSize, &box, 1);
- REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
- if (WasViewable)
- REGION_RESET(pScreen, &pWin->borderClip, &box);
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
- }
- else
- {
- REGION_EMPTY(pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
- }
-
- ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
-
- if (WasViewable)
- {
- if (pWin->firstChild)
- {
- anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *)NULL);
- }
- else
- {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
-
- if (anyMarked)
- (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
- }
-
- if (WasViewable)
- {
- if (anyMarked)
- (*pScreen->HandleExposures)(pWin);
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured ();
- FlushAllOutput ();
-}
-
/*
*/
@@ -178,7 +78,7 @@ winDoRandRScreenSetSize (ScreenPtr pScreen,
WindowPtr pRoot = pScreen->root;
// Prevent screen updates while we change things around
- xf86SetRootClip(pScreen, FALSE);
+ SetRootClip(pScreen, FALSE);
/* Update the screen size as requested */
pScreenInfo->dwWidth = width;
@@ -205,7 +105,7 @@ winDoRandRScreenSetSize (ScreenPtr pScreen,
// does this emit a ConfigureNotify??
// Restore the ability to update screen, now with new dimensions
- xf86SetRootClip(pScreen, TRUE);
+ SetRootClip(pScreen, TRUE);
// and arrange for it to be repainted
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);