aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-07 16:40:05 +0200
committermarha <marha@users.sourceforge.net>2013-10-07 16:40:05 +0200
commit8f0ed7f7a754df710b13b9dabbaa32b5d4211182 (patch)
tree03bf52a933c29962894c2cec5f33028439cf4f5a /xorg-server/dix
parent7d29f4054380e7f42722c280b9caedce9fa4ace9 (diff)
parent81fd17c8678e89cea6610b8b2996b028b21eb5dc (diff)
downloadvcxsrv-8f0ed7f7a754df710b13b9dabbaa32b5d4211182.tar.gz
vcxsrv-8f0ed7f7a754df710b13b9dabbaa32b5d4211182.tar.bz2
vcxsrv-8f0ed7f7a754df710b13b9dabbaa32b5d4211182.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver fontconfig libXdmcp mesa pixmand xkeyboard-config git update 7 oct 2013 Conflicts: xorg-server/dix/dispatch.c xorg-server/dix/privates.c xorg-server/glx/glxcmds.c xorg-server/hw/kdrive/ephyr/ephyr.h xorg-server/hw/kdrive/ephyr/ephyrinit.c xorg-server/hw/kdrive/ephyr/hostx.c
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/cursor.c6
-rwxr-xr-x[-rw-r--r--]xorg-server/dix/dispatch.c88
-rw-r--r--xorg-server/dix/pixmap.c1
-rwxr-xr-x[-rw-r--r--]xorg-server/dix/privates.c4
-rw-r--r--xorg-server/dix/window.c6
5 files changed, 31 insertions, 74 deletions
diff --git a/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c
index cd8305c6c..8cc54bd1f 100644
--- a/xorg-server/dix/cursor.c
+++ b/xorg-server/dix/cursor.c
@@ -71,9 +71,7 @@ static GlyphSharePtr sharedGlyphs = (GlyphSharePtr) NULL;
DevScreenPrivateKeyRec cursorScreenDevPriv;
-#ifdef XFIXES
static CARD32 cursorSerial;
-#endif
static void
FreeCursorBits(CursorBitsPtr bits)
@@ -272,10 +270,8 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
bits->refcnt = -1;
CheckForEmptyMask(bits);
pCurs->bits = bits;
-#ifdef XFIXES
pCurs->serialNumber = ++cursorSerial;
pCurs->name = None;
-#endif
pCurs->foreRed = foreRed;
pCurs->foreGreen = foreGreen;
@@ -433,10 +429,8 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
CheckForEmptyMask(bits);
pCurs->bits = bits;
pCurs->refcnt = 1;
-#ifdef XFIXES
pCurs->serialNumber = ++cursorSerial;
pCurs->name = None;
-#endif
pCurs->foreRed = foreRed;
pCurs->foreGreen = foreGreen;
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index f37b5d71f..b2ca29f10 100644..100755
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -2020,7 +2020,7 @@ ProcPutImage(ClientPtr client)
static int
DoGetImage(ClientPtr client, int format, Drawable drawable,
int x, int y, int width, int height,
- Mask planemask, xGetImageReply ** im_return)
+ Mask planemask)
{
DrawablePtr pDraw, pBoundingDraw;
int nlines, linesPerBuf, rc;
@@ -2120,46 +2120,32 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
xgi.length = length;
- if (im_return) {
- pBuf = calloc(1, sz_xGetImageReply + length);
- if (!pBuf)
- return BadAlloc;
- if (widthBytesLine == 0)
- linesPerBuf = 0;
- else
+ xgi.length = bytes_to_int32(xgi.length);
+ if (widthBytesLine == 0 || height == 0)
+ linesPerBuf = 0;
+ else if (widthBytesLine >= IMAGE_BUFSIZE)
+ linesPerBuf = 1;
+ else {
+ linesPerBuf = IMAGE_BUFSIZE / widthBytesLine;
+ if (linesPerBuf > height)
linesPerBuf = height;
- *im_return = (xGetImageReply *) pBuf;
- *(xGetImageReply *) pBuf = xgi;
- pBuf += sz_xGetImageReply;
}
- else {
- xgi.length = bytes_to_int32(xgi.length);
- if (widthBytesLine == 0 || height == 0)
- linesPerBuf = 0;
- else if (widthBytesLine >= IMAGE_BUFSIZE)
- linesPerBuf = 1;
- else {
- linesPerBuf = IMAGE_BUFSIZE / widthBytesLine;
- if (linesPerBuf > height)
- linesPerBuf = height;
+ length = linesPerBuf * widthBytesLine;
+ if (linesPerBuf < height) {
+ /* we have to make sure intermediate buffers don't need padding */
+ while ((linesPerBuf > 1) &&
+ (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1))) {
+ linesPerBuf--;
+ length -= widthBytesLine;
}
- length = linesPerBuf * widthBytesLine;
- if (linesPerBuf < height) {
- /* we have to make sure intermediate buffers don't need padding */
- while ((linesPerBuf > 1) &&
- (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1))) {
- linesPerBuf--;
- length -= widthBytesLine;
- }
- while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1)) {
- linesPerBuf++;
- length += widthBytesLine;
- }
+ while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1)) {
+ linesPerBuf++;
+ length += widthBytesLine;
}
- if (!(pBuf = calloc(1, length)))
- return BadAlloc;
- WriteReplyToClient(client, sizeof(xGetImageReply), &xgi);
}
+ if (!(pBuf = calloc(1, length)))
+ return BadAlloc;
+ WriteReplyToClient(client, sizeof(xGetImageReply), &xgi);
if (pDraw->type == DRAWABLE_WINDOW) {
pVisibleRegion = NotClippedByChildren((WindowPtr) pDraw);
@@ -2188,13 +2174,10 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
/* Note that this is NOT a call to WriteSwappedDataToClient,
as we do NOT byte swap */
- if (!im_return) {
- ReformatImage(pBuf, (int) (nlines * widthBytesLine),
- BitsPerPixel(pDraw->depth), ClientOrder(client));
+ ReformatImage(pBuf, (int) (nlines * widthBytesLine),
+ BitsPerPixel(pDraw->depth), ClientOrder(client));
-/* Don't split me, gcc pukes when you do */
- WriteToClient(client, (int) (nlines * widthBytesLine), pBuf);
- }
+ WriteToClient(client, (int) (nlines * widthBytesLine), pBuf);
linesDone += nlines;
}
}
@@ -2219,18 +2202,10 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
/* Note: NOT a call to WriteSwappedDataToClient,
as we do NOT byte swap */
- if (im_return) {
- pBuf += nlines * widthBytesLine;
- }
- else {
- ReformatImage(pBuf,
- (int) (nlines * widthBytesLine),
- 1, ClientOrder(client));
-
-/* Don't split me, gcc pukes when you do */
- WriteToClient(client, (int) (nlines * widthBytesLine),
- pBuf);
- }
+ ReformatImage(pBuf, (int) (nlines * widthBytesLine),
+ 1, ClientOrder(client));
+
+ WriteToClient(client, (int)(nlines * widthBytesLine), pBuf);
linesDone += nlines;
}
}
@@ -2238,8 +2213,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable,
}
if (pVisibleRegion)
RegionDestroy(pVisibleRegion);
- if (!im_return)
- free(pBuf);
+ free(pBuf);
return Success;
}
@@ -2253,7 +2227,7 @@ ProcGetImage(ClientPtr client)
return DoGetImage(client, stuff->format, stuff->drawable,
stuff->x, stuff->y,
(int) stuff->width, (int) stuff->height,
- stuff->planeMask, (xGetImageReply **) NULL);
+ stuff->planeMask);
}
int
diff --git a/xorg-server/dix/pixmap.c b/xorg-server/dix/pixmap.c
index fe9214739..d5dc3831b 100644
--- a/xorg-server/dix/pixmap.c
+++ b/xorg-server/dix/pixmap.c
@@ -202,7 +202,6 @@ PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst)
xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) {
if (ent->src == src && ent->slave_dst == slave_dst) {
- DamageUnregister(&src->drawable, ent->damage);
DamageDestroy(ent->damage);
xorg_list_del(&ent->ent);
free(ent);
diff --git a/xorg-server/dix/privates.c b/xorg-server/dix/privates.c
index 6f03bbcdb..f9b45d816 100644..100755
--- a/xorg-server/dix/privates.c
+++ b/xorg-server/dix/privates.c
@@ -80,7 +80,6 @@ static const Bool xselinux_private[PRIVATE_LAST] = {
/* [PRIVATE_GC] =*/ TRUE,
/* [PRIVATE_CURSOR] =*/ TRUE,
/* PRIVATE_CURSOR_BITS,*/ FALSE,
- /* PRIVATE_DBE_WINDOW,*/ FALSE,
/* PRIVATE_DAMAGE,*/ FALSE,
/* PRIVATE_GLYPH,*/ FALSE,
/* [PRIVATE_GLYPHSET] =*/ TRUE,
@@ -110,7 +109,6 @@ static const char *key_names[PRIVATE_LAST] = {
/*[PRIVATE_CURSOR_BITS] =*/ "CURSOR_BITS",
/* extension privates */
- /*[PRIVATE_DBE_WINDOW] =*/ "DBE_WINDOW",
/*[PRIVATE_DAMAGE] =*/ "DAMAGE",
/*[PRIVATE_GLYPH] =*/ "GLYPH",
/*[PRIVATE_GLYPHSET] =*/ "GLYPHSET",
@@ -132,7 +130,6 @@ static const Bool screen_specific_private[PRIVATE_LAST] = {
/*[PRIVATE_GC] =*/ TRUE,
/*[PRIVATE_CURSOR] =*/ FALSE,
/*[PRIVATE_CURSOR_BITS] =*/ FALSE,
- /*[PRIVATE_DBE_WINDOW] =*/ FALSE,
/*[PRIVATE_DAMAGE] =*/ FALSE,
/*[PRIVATE_GLYPH] =*/ FALSE,
/*[PRIVATE_GLYPHSET] =*/ FALSE,
@@ -313,7 +310,6 @@ static Bool (*const allocated_early[PRIVATE_LAST]) (FixupFunc, unsigned) = {
/*PRIVATE_GC,*/ NULL,
/*PRIVATE_CURSOR,*/ NULL,
/*PRIVATE_CURSOR_BITS,*/ NULL,
- /*PRIVATE_DBE_WINDOW,*/ NULL,
/*PRIVATE_DAMAGE,*/ NULL,
/*PRIVATE_GLYPH,*/ NULL,
/*PRIVATE_GLYPHSET,*/ NULL,
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index c97d04293..804b54c32 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -2850,11 +2850,9 @@ HandleSaveSet(ClientPtr client)
for (j = 0; j < client->numSaved; j++) {
pWin = SaveSetWindow(client->saveSet[j]);
-#ifdef XFIXES
if (SaveSetToRoot(client->saveSet[j]))
pParent = pWin->drawable.pScreen->root;
else
-#endif
{
pParent = pWin->parent;
while (pParent && (wClient(pParent) == client))
@@ -2862,11 +2860,9 @@ HandleSaveSet(ClientPtr client)
}
if (pParent) {
if (pParent != pWin->parent) {
-#ifdef XFIXES
/* unmap first so that ReparentWindow doesn't remap */
if (!SaveSetShouldMap(client->saveSet[j]))
UnmapWindow(pWin, FALSE);
-#endif
ReparentWindow(pWin, pParent,
pWin->drawable.x - wBorderWidth(pWin) -
pParent->drawable.x,
@@ -2875,9 +2871,7 @@ HandleSaveSet(ClientPtr client)
if (!pWin->realized && pWin->mapped)
pWin->mapped = FALSE;
}
-#ifdef XFIXES
if (SaveSetShouldMap(client->saveSet[j]))
-#endif
MapWindow(pWin, client);
}
}