ports/176111: [PATCH] x11-servers/xorg-server v.1.10.6_2,1
Andrei Lavreniyuk
andy.lavr at gmail.com
Wed Feb 13 14:00:02 UTC 2013
>Number: 176111
>Category: ports
>Synopsis: [PATCH] x11-servers/xorg-server v.1.10.6_2,1
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Feb 13 14:00:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Andrei Lavreniyuk
>Release: FreeBSD 10.0-CURRENT
>Organization:
Technica-03, Inc.
>Environment:
FreeBSD 59.informalians.local 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r246750M(clang-r170710): Wed Feb 13 10:54:46 EET 2013 root at 59.informalians.local:/usr/obj/usr/src/sys/Kernel amd64
>Description:
Problem with new Xorg, radeon & compiz/Kwin revisited
http://freebsd.1045724.n5.nabble.com/Problem-with-new-Xorg-radeon-amp-compiz-Kwin-revisited-td5732966.html
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- glx/glxcmds.c.orig 2011-06-11 19:55:47.000000000 +0300
+++ glx/glxcmds.c 2013-02-13 15:38:12.000000000 +0200
@@ -1095,6 +1095,7 @@
drawable->pDraw = pDraw;
drawable->type = type;
drawable->drawId = drawId;
+ drawable->otherId = 0;
drawable->config = config;
drawable->eventMask = 0;
@@ -1131,12 +1132,17 @@
* Windows aren't refcounted, so track both the X and the GLX window
* so we get called regardless of destruction order.
*/
- if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW &&
- !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) {
- pGlxDraw->destroy (pGlxDraw);
- return BadAlloc;
+ if (drawableId != glxDrawableId &&
+ (type == GLX_DRAWABLE_WINDOW || type == GLX_DRAWABLE_PIXMAP)) {
+ if (!AddResource(drawableId, __glXDrawableRes, pGlxDraw)) {
+ pGlxDraw->destroy (pGlxDraw);
+ return BadAlloc;
+ }
+ pGlxDraw->otherId = drawableId;
+
}
+
return Success;
}
--- glx/glxdrawable.h.orig 2011-06-11 19:55:47.000000000 +0300
+++ glx/glxdrawable.h 2013-02-13 15:36:19.000000000 +0200
@@ -53,6 +53,7 @@
DrawablePtr pDraw;
XID drawId;
+ XID otherId; /* for glx1.3 we need to track the original Drawable as well */
/*
** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or
--- glx/glxext.c.orig 2011-06-11 19:55:47.000000000 +0300
+++ glx/glxext.c 2013-02-13 15:41:18.000000000 +0200
@@ -124,13 +124,15 @@
{
__GLXcontext *c, *next;
- if (glxPriv->type == GLX_DRAWABLE_WINDOW) {
+ if (glxPriv->type == GLX_DRAWABLE_WINDOW || glxPriv->type == GLX_DRAWABLE_PIXMAP) {
/* If this was created by glXCreateWindow, free the matching resource */
- if (glxPriv->drawId != glxPriv->pDraw->id) {
- if (xid == glxPriv->drawId)
- FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
- else
+ if (glxPriv->otherId) {
+ XID other = glxPriv->otherId;
+ glxPriv->otherId = 0;
+ if (xid == other)
FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
+ else
+ FreeResourceByType(other, __glXDrawableRes, TRUE);
}
/* otherwise this window was implicitly created by MakeCurrent */
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list