aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xorg-server/Xext/xvmain.c7
-rw-r--r--xorg-server/composite/compinit.c12
-rw-r--r--xorg-server/composite/compint.h17
-rw-r--r--xorg-server/composite/compwindow.c68
-rw-r--r--xorg-server/configure.ac13
-rw-r--r--xorg-server/glx/glxdri2.c3
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c9
-rw-r--r--xorg-server/hw/xwin/winallpriv.c9
-rw-r--r--xorg-server/hw/xwin/winglobals.c7
-rw-r--r--xorg-server/include/list.h6
-rw-r--r--xorg-server/mi/miwindow.c2
-rw-r--r--xorg-server/os/access.c5
-rw-r--r--xorg-server/os/utils.c55
-rw-r--r--xorg-server/randr/rrtransform.c28
-rw-r--r--xorg-server/record/record.c22
-rw-r--r--xorg-server/xorg-server.pc.in3
16 files changed, 160 insertions, 106 deletions
diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c
index 330d323cb..7cd900117 100644
--- a/xorg-server/Xext/xvmain.c
+++ b/xorg-server/Xext/xvmain.c
@@ -1133,12 +1133,13 @@ XvdiSetPortAttribute(
Atom attribute,
INT32 value
){
+ int status;
+ status = (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value);
+ if (status == Success)
XvdiSendPortNotify(pPort, attribute, value);
- return
- (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value);
-
+ return status;
}
int
diff --git a/xorg-server/composite/compinit.c b/xorg-server/composite/compinit.c
index 389cf0bfb..d3910c4b4 100644
--- a/xorg-server/composite/compinit.c
+++ b/xorg-server/composite/compinit.c
@@ -66,6 +66,9 @@ compCloseScreen (int index, ScreenPtr pScreen)
pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes;
pScreen->ReparentWindow = cs->ReparentWindow;
pScreen->ConfigNotify = cs->ConfigNotify;
+ pScreen->MoveWindow = cs->MoveWindow;
+ pScreen->ResizeWindow = cs->ResizeWindow;
+ pScreen->ChangeBorderWidth = cs->ChangeBorderWidth;
pScreen->ClipNotify = cs->ClipNotify;
pScreen->UnrealizeWindow = cs->UnrealizeWindow;
@@ -366,6 +369,15 @@ compScreenInit (ScreenPtr pScreen)
cs->ConfigNotify = pScreen->ConfigNotify;
pScreen->ConfigNotify = compConfigNotify;
+ cs->MoveWindow = pScreen->MoveWindow;
+ pScreen->MoveWindow = compMoveWindow;
+
+ cs->ResizeWindow = pScreen->ResizeWindow;
+ pScreen->ResizeWindow = compResizeWindow;
+
+ cs->ChangeBorderWidth = pScreen->ChangeBorderWidth;
+ pScreen->ChangeBorderWidth = compChangeBorderWidth;
+
cs->ReparentWindow = pScreen->ReparentWindow;
pScreen->ReparentWindow = compReparentWindow;
diff --git a/xorg-server/composite/compint.h b/xorg-server/composite/compint.h
index e02d22c6b..8213c1605 100644
--- a/xorg-server/composite/compint.h
+++ b/xorg-server/composite/compint.h
@@ -127,9 +127,14 @@ typedef struct _CompScreen {
UnrealizeWindowProcPtr UnrealizeWindow;
ClipNotifyProcPtr ClipNotify;
/*
- * Called from ConfigureWindow.
+ * Called from ConfigureWindow, these
+ * three track changes to the offscreen storage
+ * geometry
*/
ConfigNotifyProcPtr ConfigNotify;
+ MoveWindowProcPtr MoveWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
/*
* Reparenting has an effect on Subwindows redirect
*/
@@ -281,6 +286,16 @@ void
compClipNotify (WindowPtr pWin, int dx, int dy);
void
+compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind);
+
+void
+compResizeWindow (WindowPtr pWin, int x, int y,
+ unsigned int w, unsigned int h, WindowPtr pSib);
+
+void
+compChangeBorderWidth (WindowPtr pWin, unsigned int border_width);
+
+void
compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent);
Bool
diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c
index 82f9b4cfd..0efae97eb 100644
--- a/xorg-server/composite/compwindow.c
+++ b/xorg-server/composite/compwindow.c
@@ -334,6 +334,65 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent)
return FALSE;
}
+static void compFreeOldPixmap(WindowPtr pWin)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ if (pWin->redirectDraw != RedirectDrawNone)
+ {
+ CompWindowPtr cw = GetCompWindow (pWin);
+ if (cw->pOldPixmap)
+ {
+ (*pScreen->DestroyPixmap) (cw->pOldPixmap);
+ cw->pOldPixmap = NullPixmap;
+ }
+ }
+}
+void
+compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->MoveWindow = cs->MoveWindow;
+ (*pScreen->MoveWindow) (pWin, x, y, pSib, kind);
+ cs->MoveWindow = pScreen->MoveWindow;
+ pScreen->MoveWindow = compMoveWindow;
+
+ compFreeOldPixmap(pWin);
+ compCheckTree (pScreen);
+}
+
+void
+compResizeWindow (WindowPtr pWin, int x, int y,
+ unsigned int w, unsigned int h, WindowPtr pSib)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->ResizeWindow = cs->ResizeWindow;
+ (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
+ cs->ResizeWindow = pScreen->ResizeWindow;
+ pScreen->ResizeWindow = compResizeWindow;
+
+ compFreeOldPixmap(pWin);
+ compCheckTree (pWin->drawable.pScreen);
+}
+
+void
+compChangeBorderWidth (WindowPtr pWin, unsigned int bw)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->ChangeBorderWidth = cs->ChangeBorderWidth;
+ (*pScreen->ChangeBorderWidth) (pWin, bw);
+ cs->ChangeBorderWidth = pScreen->ChangeBorderWidth;
+ pScreen->ChangeBorderWidth = compChangeBorderWidth;
+
+ compFreeOldPixmap(pWin);
+ compCheckTree (pWin->drawable.pScreen);
+}
+
void
compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent)
{
@@ -705,7 +764,6 @@ compConfigNotify(WindowPtr pWin, int x, int y, int w, int h,
CompScreenPtr cs = GetCompScreen (pScreen);
Bool ret = 0;
WindowPtr pParent = pWin->parent;
- CompWindowPtr cw;
int draw_x, draw_y;
Bool alloc_ret;
@@ -728,14 +786,6 @@ compConfigNotify(WindowPtr pWin, int x, int y, int w, int h,
draw_x = pParent->drawable.x + x + bw;
draw_y = pParent->drawable.y + y + bw;
alloc_ret = compReallocPixmap (pWin, draw_x, draw_y, w, h, bw);
-
- cw = GetCompWindow (pWin);
- if (cw->pOldPixmap)
- {
- (*pScreen->DestroyPixmap) (cw->pOldPixmap);
- cw->pOldPixmap = NullPixmap;
- }
- compCheckTree (pScreen);
if (alloc_ret == FALSE)
return BadAlloc;
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index 161f9cda0..2b611b8ed 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.8.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2010-06-15"
+AC_INIT([xorg-server], 1.8.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-06-22"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
@@ -793,9 +793,13 @@ WINDOWSWMPROTO="windowswmproto"
APPLEWMPROTO="applewmproto >= 1.4"
dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.17] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
+SDK_REQUIRED_MODULES="[xproto >= 7.0.17] [randrproto >= 1.2.99.3] [renderproto >= 0.11] [xextproto >= 7.0.99.3] [inputproto >= 1.9.99.902] [kbproto >= 1.0.3] fontsproto"
+REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES"
REQUIRED_LIBS="xfont xau"
+# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
+AC_SUBST(SDK_REQUIRED_MODULES)
+
dnl List of libraries that require a specific version
LIBAPPLEWM="applewm >= 1.4"
LIBDMX="dmx >= 1.0.99.1"
@@ -947,6 +951,7 @@ if test "x$XV" = xyes; then
AC_DEFINE(XV, 1, [Support Xv extension])
AC_DEFINE(XvExtension, 1, [Build Xv extension])
REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO"
+ SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO"
else
XVMC=no
fi
@@ -1036,6 +1041,7 @@ case "$DRI2,$HAVE_DRI2PROTO" in
yes,yes | auto,yes)
AC_DEFINE(DRI2, 1, [Build DRI2 extension])
DRI2=yes
+ SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
;;
esac
AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
@@ -1074,6 +1080,7 @@ if test "x$XINERAMA" = xyes; then
AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama])
REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO"
+ SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO"
fi
AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index f4cb76383..4419972b3 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -435,7 +435,8 @@ __glXDRIinvalidateBuffers(DrawablePtr pDraw, void *priv)
__GLXDRIdrawable *private = priv;
__GLXDRIscreen *screen = private->screen;
- (*screen->flush->invalidate)(private->driDrawable);
+ if (screen->flush)
+ (*screen->flush->invalidate)(private->driDrawable);
#endif
}
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 4cf6147bb..090f29c2f 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -325,10 +325,13 @@ xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
xf86CursorScreenKey);
struct pict_f_vector v;
- v.v[0] = x + ScreenPriv->HotX; v.v[1] = y + ScreenPriv->HotY; v.v[2] = 1;
+ v.v[0] = (x + ScreenPriv->HotX) + 0.5;
+ v.v[1] = (y + ScreenPriv->HotY) + 0.5;
+ v.v[2] = 1;
pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v);
- x = floor (v.v[0] + 0.5);
- y = floor (v.v[1] + 0.5);
+ /* cursor will have 0.5 added to it already so floor is sufficent */
+ x = floor (v.v[0]);
+ y = floor (v.v[1]);
/*
* Transform position of cursor upper left corner
*/
diff --git a/xorg-server/hw/xwin/winallpriv.c b/xorg-server/hw/xwin/winallpriv.c
index 6a6dc60db..f4078207e 100644
--- a/xorg-server/hw/xwin/winallpriv.c
+++ b/xorg-server/hw/xwin/winallpriv.c
@@ -72,7 +72,7 @@ winAllocatePrivates (ScreenPtr pScreen)
/* Intialize private structure members */
pScreenPriv->fActive = TRUE;
- /* Reserve screen memory for our privates */
+ /* Register our screen private */
if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0))
{
ErrorF ("winAllocatePrivates - dixRegisterPrivateKey () failed\n");
@@ -162,6 +162,13 @@ winAllocateCmapPrivates (ColormapPtr pCmap)
/* Initialize the memory of the private structure */
ZeroMemory (pCmapPriv, sizeof (winPrivCmapRec));
+ /* Register our colourmap private */
+ if (!dixRegisterPrivateKey(g_iCmapPrivateKey, PRIVATE_COLORMAP, 0))
+ {
+ ErrorF ("winAllocateCmapPrivates - AllocateCmapPrivate () failed\n");
+ return FALSE;
+ }
+
/* Save the cmap private pointer */
winSetCmapPriv (pCmap, pCmapPriv);
diff --git a/xorg-server/hw/xwin/winglobals.c b/xorg-server/hw/xwin/winglobals.c
index b698270b7..80a6c9feb 100644
--- a/xorg-server/hw/xwin/winglobals.c
+++ b/xorg-server/hw/xwin/winglobals.c
@@ -126,13 +126,6 @@ Atom g_atomLastOwnedSelection = None;
void
winInitializeGlobals (void)
{
- if (!dixRegisterPrivateKey(&g_iScreenPrivateKeyRec, PRIVATE_SCREEN, 0) ||
- !dixRegisterPrivateKey(&g_iCmapPrivateKeyRec, PRIVATE_COLORMAP, 0) ||
- !dixRegisterPrivateKey(&g_iGCPrivateKeyRec, PRIVATE_GC, 0) ||
- !dixRegisterPrivateKey(&g_iPixmapPrivateKeyRec, PRIVATE_PIXMAP, 0) ||
- !dixRegisterPrivateKey(&g_iWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) {
- FatalError("cannot register private key");
- }
g_dwCurrentThreadID = GetCurrentThreadId ();
g_hwndKeyboardFocus = NULL;
#ifdef XWIN_CLIPBOARD
diff --git a/xorg-server/include/list.h b/xorg-server/include/list.h
index 3a07a0b77..9479d2d92 100644
--- a/xorg-server/include/list.h
+++ b/xorg-server/include/list.h
@@ -94,10 +94,10 @@ list_is_empty(struct list *head)
&pos->member != (head); \
pos = __container_of(pos->member.next, pos, member))
-#define list_for_each_entry_safe(pos, next, head, member) \
+#define list_for_each_entry_safe(pos, tmp, head, member) \
for (pos = __container_of((head)->next, pos, member), \
- next = __container_of(pos->member.next, pos, member); \
+ tmp = __container_of(pos->member.next, pos, member); \
&pos->member != (head); \
- pos = next, next = __container_of(next->member.next, next, member))
+ pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
#endif
diff --git a/xorg-server/mi/miwindow.c b/xorg-server/mi/miwindow.c
index 6c1b59e23..0fc6d1138 100644
--- a/xorg-server/mi/miwindow.c
+++ b/xorg-server/mi/miwindow.c
@@ -50,7 +50,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/extensions/shape.h>
+#include <X11/extensions/shapeconst.h>
#include "regionstr.h"
#include "region.h"
#include "mi.h"
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index 862d98a96..bce861d34 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -1123,6 +1123,11 @@ Bool LocalClient(ClientPtr client)
pointer addr;
register HOST *host;
+ if (!client->osPrivate)
+ return FALSE;
+ if (!((OsCommPtr)client->osPrivate)->trans_conn)
+ return FALSE;
+
if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
&notused, &alen, &from))
{
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index f3ecf781c..9919fba83 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -205,8 +205,6 @@ int auditTrailLevel = 1;
#define HAS_SAVED_IDS_AND_SETEUID
#endif
-static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */
-
OsSigHandlerPtr
OsSignal(int sig, OsSigHandlerPtr handler)
{
@@ -892,8 +890,7 @@ ProcessCommandLine(int argc, char *argv[])
}
else if (strncmp (argv[i], "tty", 3) == 0)
{
- /* just in case any body is interested */
- dev_tty_from_init = argv[i];
+ /* init supplies us with this useless information */
}
#ifdef XDMCP
else if ((skip = XdmcpOptions(argc, argv, i)) != i)
@@ -1873,53 +1870,3 @@ error:
free(list);
return NULL;
}
-
-#ifdef __SCO__
-#include <fcntl.h>
-
-static void
-lockit (int fd, short what)
-{
- struct flock lck;
-
- lck.l_whence = 0;
- lck.l_start = 0;
- lck.l_len = 1;
- lck.l_type = what;
-
- (void)fcntl (fd, F_SETLKW, &lck);
-}
-
-/* SCO OpenServer 5 lacks pread/pwrite. Emulate them. */
-ssize_t
-pread (int fd, void *buf, size_t nbytes, off_t offset)
-{
- off_t saved;
- ssize_t ret;
-
- lockit (fd, F_RDLCK);
- saved = lseek (fd, 0, SEEK_CUR);
- lseek (fd, offset, SEEK_SET);
- ret = read (fd, buf, nbytes);
- lseek (fd, saved, SEEK_SET);
- lockit (fd, F_UNLCK);
-
- return ret;
-}
-
-ssize_t
-pwrite (int fd, const void *buf, size_t nbytes, off_t offset)
-{
- off_t saved;
- ssize_t ret;
-
- lockit (fd, F_WRLCK);
- saved = lseek (fd, 0, SEEK_CUR);
- lseek (fd, offset, SEEK_SET);
- ret = write (fd, buf, nbytes);
- lseek (fd, saved, SEEK_SET);
- lockit (fd, F_UNLCK);
-
- return ret;
-}
-#endif /* __SCO__ */
diff --git a/xorg-server/randr/rrtransform.c b/xorg-server/randr/rrtransform.c
index 03c5c97ba..102a0f48e 100644
--- a/xorg-server/randr/rrtransform.c
+++ b/xorg-server/randr/rrtransform.c
@@ -183,21 +183,21 @@ RRTransformCompute (int x,
break;
case RR_Rotate_90:
f_rot_cos = 0; f_rot_sin = 1;
- f_rot_dx = height-1; f_rot_dy = 0;
+ f_rot_dx = height; f_rot_dy = 0;
rot_cos = F ( 0); rot_sin = F ( 1);
- rot_dx = F (height-1); rot_dy = F (0);
+ rot_dx = F ( height); rot_dy = F (0);
break;
case RR_Rotate_180:
f_rot_cos = -1; f_rot_sin = 0;
- f_rot_dx = width - 1; f_rot_dy = height - 1;
+ f_rot_dx = width; f_rot_dy = height;
rot_cos = F (-1); rot_sin = F ( 0);
- rot_dx = F (width-1); rot_dy = F ( height-1);
+ rot_dx = F (width); rot_dy = F ( height);
break;
case RR_Rotate_270:
f_rot_cos = 0; f_rot_sin = -1;
- f_rot_dx = 0; f_rot_dy = width-1;
+ f_rot_dx = 0; f_rot_dy = width;
rot_cos = F ( 0); rot_sin = F (-1);
- rot_dx = F ( 0); rot_dy = F ( width-1);
+ rot_dx = F ( 0); rot_dy = F ( width);
break;
}
@@ -220,11 +220,11 @@ RRTransformCompute (int x,
f_scale_x = -1;
scale_x = F(-1);
if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
- f_scale_dx = width-1;
- scale_dx = F(width-1);
+ f_scale_dx = width;
+ scale_dx = F(width);
} else {
- f_scale_dx = height-1;
- scale_dx = F(height-1);
+ f_scale_dx = height;
+ scale_dx = F(height);
}
}
if (rotation & RR_Reflect_Y)
@@ -232,11 +232,11 @@ RRTransformCompute (int x,
f_scale_y = -1;
scale_y = F(-1);
if (rotation & (RR_Rotate_0|RR_Rotate_180)) {
- f_scale_dy = height-1;
- scale_dy = F(height-1);
+ f_scale_dy = height;
+ scale_dy = F(height);
} else {
- f_scale_dy = width-1;
- scale_dy = F(width-1);
+ f_scale_dy = width;
+ scale_dy = F(width);
}
}
diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c
index 53125079e..5e15c956a 100644
--- a/xorg-server/record/record.c
+++ b/xorg-server/record/record.c
@@ -997,10 +997,11 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient)
ClientPtr pClient = clients[CLIENT_ID(client)];
int c;
Bool otherRCAPwantsProcVector = FALSE;
- RecordClientPrivatePtr pClientPriv =
- RecordClientPrivate(pClient);
+ RecordClientPrivatePtr pClientPriv = NULL;
- assert (pClient && RecordClientPrivate(pClient));
+ assert (pClient);
+ pClientPriv = RecordClientPrivate(pClient);
+ assert (pClientPriv);
memcpy(pClientPriv->recordVector, pClientPriv->originalVector,
sizeof (pClientPriv->recordVector));
@@ -2813,6 +2814,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
int i;
ClientPtr pClient = pci->client;
+ RecordContextPtr *ppAllContextsCopy = NULL;
+ int numContextsCopy = 0;
switch (pClient->clientState)
{
@@ -2834,10 +2837,17 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda
case ClientStateGone:
case ClientStateRetained: /* client disconnected */
- for (i = 0; i < numContexts; i++)
+
+ /* RecordDisableContext modifies contents of ppAllContexts. */
+ numContextsCopy = numContexts;
+ ppAllContextsCopy = malloc(numContextsCopy * sizeof(RecordContextPtr));
+ assert(ppAllContextsCopy);
+ memcpy(ppAllContextsCopy, ppAllContexts, numContextsCopy * sizeof(RecordContextPtr));
+
+ for (i = 0; i < numContextsCopy; i++)
{
RecordClientsAndProtocolPtr pRCAP;
- RecordContextPtr pContext = ppAllContexts[i];
+ RecordContextPtr pContext = ppAllContextsCopy[i];
int pos;
if (pContext->pRecordingClient == pClient)
@@ -2851,6 +2861,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda
RecordDeleteClientFromRCAP(pRCAP, pos);
}
}
+
+ free(ppAllContextsCopy);
break;
default:
diff --git a/xorg-server/xorg-server.pc.in b/xorg-server/xorg-server.pc.in
index e1a7e1ea3..643da1542 100644
--- a/xorg-server/xorg-server.pc.in
+++ b/xorg-server/xorg-server.pc.in
@@ -15,6 +15,7 @@ abi_extension=@abi_extension@
Name: xorg-server
Description: Modular X.Org X Server
Version: @PACKAGE_VERSION@
-Requires: pixman-1 pciaccess xproto >= 7.0.17
+Requires: pixman-1 pciaccess
+Requires.private: @SDK_REQUIRED_MODULES@
Cflags: -I${sdkdir} @symbol_visibility@
Libs: -L${libdir}