Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/xrender_x11
Modified Files:
evas_engine_ximage.c evas_engine_xrender.c
Log Message:
handle shm addr return right
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/xrender_x11/evas_engine_ximage.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine_ximage.c 2 Oct 2005 15:15:44 -0000 1.1
+++ evas_engine_ximage.c 8 Oct 2005 14:59:45 -0000 1.2
@@ -77,7 +77,7 @@
if (shm_info.shmid >= 0)
{
shm_info.shmaddr = xim->data = shmat(shm_info.shmid, 0, 0);
- if (shm_info.shmaddr != NULL)
+ if ((shm_info.shmaddr != NULL) && (shm_info.shmaddr != -1))
{
XErrorHandler ph;
@@ -166,7 +166,7 @@
if (xim->shm_info->shmid >= 0)
{
xim->shm_info->shmaddr = xim->xim->data =
shmat(xim->shm_info->shmid, 0, 0);
- if (xim->shm_info->shmaddr != NULL)
+ if ((xim->shm_info->shmaddr != NULL) &&
(xim->shm_info->shmaddr != -1))
{
XErrorHandler ph;
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/xrender_x11/evas_engine_xrender.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_engine_xrender.c 8 Oct 2005 04:57:57 -0000 1.6
+++ evas_engine_xrender.c 8 Oct 2005 14:59:45 -0000 1.7
@@ -21,6 +21,7 @@
rs->depth = fmt->depth;
rs->allocated = 1;
rs->draw = XCreatePixmap(xinf->disp, xinf->root, w, h, fmt->depth);
+ rs->xinf->references++;
att.dither = 0;
att.component_alpha = 0;
att.repeat = 0;
@@ -46,6 +47,7 @@
if (fmt->depth == 32) rs->alpha = 1;
rs->allocated = 0;
rs->draw = draw;
+ rs->xinf->references++;
att.dither = 0;
att.component_alpha = 0;
att.repeat = 0;
@@ -67,6 +69,7 @@
rs->alpha = alpha;
rs->depth = fmt->depth;
if (fmt->depth == 32) rs->alpha = 1;
+ rs->xinf->references++;
rs->allocated = 0;
rs->draw = draw;
att.dither = 0;
@@ -81,6 +84,8 @@
{
if (rs->allocated) XFreePixmap(rs->xinf->disp, rs->draw);
XRenderFreePicture(rs->xinf->disp, rs->pic);
+ _xr_image_info_free(rs->xinf);
+ rs->xinf = NULL;
free(rs);
}
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs