forked from pool/xorg-x11-server
Accepting request 80236 from X11:XOrg
- U_xserver_fix-pixmaps-lifetime-tracking.patch * avoid crash when enabling the desktop icons in gnome3 (bnc#701199) - u_xf4nvc_missing-libz.patch * Xvnc no longer can rely on the toolchain to add the required libs, it uses directly. OBS-URL: https://build.opensuse.org/request/show/80236 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=218
This commit is contained in:
commit
a195b727a9
83
U_xserver_fix-pixmaps-lifetime-tracking.patch
Normal file
83
U_xserver_fix-pixmaps-lifetime-tracking.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From 6a433b67ca15fd1ea58334e607f867554f227451 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Mon, 28 Mar 2011 16:30:09 +0000
|
||||
Subject: glx: Fix lifetime tracking for pixmaps
|
||||
|
||||
GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
|
||||
IDs can be destroyed in either order with no error. Only windows need
|
||||
to be tracked under both XIDs.
|
||||
|
||||
Fixes piglit/glx-pixmap-life.
|
||||
|
||||
Reviewed-by: Michel Dänzer <michel@daenzer.net>
|
||||
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
Index: xorg-server-1.9.3/glx/glxcmds.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/glx/glxcmds.c
|
||||
+++ xorg-server-1.9.3/glx/glxcmds.c
|
||||
@@ -1132,10 +1132,11 @@ DoCreateGLXDrawable(ClientPtr client, __
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
- /* Add the glx drawable under the XID of the underlying X drawable
|
||||
- * too. That way we'll get a callback in DrawableGone and can
|
||||
- * clean up properly when the drawable is destroyed. */
|
||||
- if (drawableId != glxDrawableId &&
|
||||
+ /*
|
||||
+ * 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;
|
||||
@@ -1166,6 +1167,8 @@ DoCreateGLXPixmap(ClientPtr client, __GL
|
||||
err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
|
||||
glxDrawableId, GLX_DRAWABLE_PIXMAP);
|
||||
|
||||
+ ((PixmapPtr)pDraw)->refcnt++;
|
||||
+
|
||||
return err;
|
||||
}
|
||||
|
||||
Index: xorg-server-1.9.3/glx/glxext.c
|
||||
===================================================================
|
||||
--- xorg-server-1.9.3.orig/glx/glxext.c
|
||||
+++ xorg-server-1.9.3/glx/glxext.c
|
||||
@@ -126,15 +126,15 @@ static Bool DrawableGone(__GLXdrawable *
|
||||
{
|
||||
__GLXcontext *c, *next;
|
||||
|
||||
- /* If this drawable was created using glx 1.3 drawable
|
||||
- * constructors, we added it as a glx drawable resource under both
|
||||
- * its glx drawable ID and it X drawable ID. Remove the other
|
||||
- * resource now so we don't a callback for freed memory. */
|
||||
- if (glxPriv->drawId != glxPriv->pDraw->id) {
|
||||
- if (xid == glxPriv->drawId)
|
||||
- FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE);
|
||||
- else
|
||||
- FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
|
||||
+ if (glxPriv->type == GLX_DRAWABLE_WINDOW) {
|
||||
+ /* 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
|
||||
+ FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE);
|
||||
+ }
|
||||
+ /* otherwise this window was implicitly created by MakeCurrent */
|
||||
}
|
||||
|
||||
for (c = glxAllContexts; c; c = next) {
|
||||
@@ -170,6 +170,10 @@ static Bool DrawableGone(__GLXdrawable *
|
||||
__glXFreeContext(c);
|
||||
}
|
||||
|
||||
+ /* drop our reference to any backing pixmap */
|
||||
+ if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
|
||||
+ glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr)glxPriv->pDraw);
|
||||
+
|
||||
glxPriv->destroy(glxPriv);
|
||||
|
||||
return True;
|
18
u_xf4nvc_missing-libz.patch
Normal file
18
u_xf4nvc_missing-libz.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Author: Stefan Dirsch <sndirsch@suse.de>
|
||||
Subject: Xvnc needs to add "-lz" itself
|
||||
Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
|
||||
|
||||
Xvnc no longer can rely on the toolchain to add the required libs,
|
||||
it uses directly.
|
||||
|
||||
--- hw/vnc/Makefile.am.orig 2011-08-29 16:11:02.000000000 +0000
|
||||
+++ hw/vnc/Makefile.am 2011-08-29 16:11:16.000000000 +0000
|
||||
@@ -47,7 +47,7 @@ Xvnc_LDADD = \
|
||||
$(JPEG_LIBS) \
|
||||
$(CRYPT_LIBS) \
|
||||
$(XSERVER_SYS_LIBS) \
|
||||
- $(VNCMODULES_LIBS)
|
||||
+ $(VNCMODULES_LIBS) -lz
|
||||
|
||||
|
||||
relink:
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 30 13:53:46 UTC 2011 - sndirsch@suse.com
|
||||
|
||||
- U_xserver_fix-pixmaps-lifetime-tracking.patch
|
||||
* avoid crash when enabling the desktop icons in gnome3
|
||||
(bnc#701199)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 29 16:24:24 UTC 2011 - sndirsch@suse.com
|
||||
|
||||
- u_xf4nvc_missing-libz.patch
|
||||
* Xvnc no longer can rely on the toolchain to add the required
|
||||
libs, it uses directly.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 8 08:20:41 UTC 2011 - eich@suse.de
|
||||
|
||||
|
@ -105,6 +105,8 @@ Patch225: xorg-server-stop-cpu-eating.diff
|
||||
Patch226: record-avoid-crash-when-calling-RecordFlushReplyBuff.patch
|
||||
Patch227: Replace-malloc-with-calloc-to-initialize-the-buffers.patch
|
||||
Patch228: EXA-mixed-ModifyPixmapHeader-pitch-fixes.-bug-33929.patch
|
||||
Patch229: u_xf4nvc_missing-libz.patch
|
||||
Patch230: U_xserver_fix-pixmaps-lifetime-tracking.patch
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
@ -180,6 +182,8 @@ An X Window System server for Virtual Network Computing (VNC).
|
||||
%patch49 -p0
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch229 -p0
|
||||
%patch230 -p1
|
||||
chmod 755 hw/vnc/symlink-vnc.sh
|
||||
%endif
|
||||
%patch45 -p0
|
||||
|
Loading…
Reference in New Issue
Block a user