From 20aa60eb1165a0397d82ed2a89c60869833dbf85 Mon Sep 17 00:00:00 2001 From: caro Date: Thu, 7 Jan 2010 06:42:42 +0000 Subject: [PATCH] Fix a crash in the xcb engine It is still broken when shm is used. I don't know why Fix other possible issues when shapes are used git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@44940 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/software_x11/evas_xcb_buffer.c | 3 +-- src/modules/engines/software_x11/evas_xcb_outbuf.c | 26 +++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/modules/engines/software_x11/evas_xcb_buffer.c b/src/modules/engines/software_x11/evas_xcb_buffer.c index b091d14..74516c9 100644 --- a/src/modules/engines/software_x11/evas_xcb_buffer.c +++ b/src/modules/engines/software_x11/evas_xcb_buffer.c @@ -395,7 +395,6 @@ evas_software_xcb_x_output_buffer_free(Xcb_Output_Buffer *xcbob, xcb_get_input_focus_unchecked(xcbob->connection), NULL)); xcb_shm_detach(xcbob->connection, xcbob->shm_info->shmseg); - free(xcbob->image->data); xcb_image_destroy(xcbob->image); shmdt(xcbob->shm_info->shmaddr); shmctl(xcbob->shm_info->shmid, IPC_RMID, 0); @@ -424,7 +423,7 @@ evas_software_xcb_x_output_buffer_paste(Xcb_Output_Buffer *xcbob, xcbob->image, *xcbob->shm_info, 0, 0, x, y, - xcbob->image->width, xcbob->image->height, + xcbob->w, xcbob->h, 0); if (sync) free(xcb_get_input_focus_reply(xcbob->connection, diff --git a/src/modules/engines/software_x11/evas_xcb_outbuf.c b/src/modules/engines/software_x11/evas_xcb_outbuf.c index 2065dda..b4932ce 100644 --- a/src/modules/engines/software_x11/evas_xcb_outbuf.c +++ b/src/modules/engines/software_x11/evas_xcb_outbuf.c @@ -54,7 +54,7 @@ _find_xcbob(xcb_connection_t *conn, int depth, int w, int h, int shm, void *data sz = lbytes * h; EINA_LIST_FOREACH(shmpool, l, xcbob2) { - int szdif; + int szdif; if ((xcbob2->image->depth != depth) || (xcbob2->connection != conn)) @@ -466,10 +466,10 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, NULL); if (buf->priv.x11.xcb.mask) obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn, - buf->priv.x11.xcb.depth, - buf->w, buf->h, - use_shm, - NULL); + 1, + buf->w, buf->h, + use_shm, + NULL); } else if ((buf->rot == 90) || (buf->rot == 270)) { @@ -480,10 +480,10 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, NULL); if (buf->priv.x11.xcb.mask) obr->mxcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x11.xcb.conn, - buf->priv.x11.xcb.depth, - buf->h, buf->w, - use_shm, - NULL); + 1, + buf->h, buf->w, + use_shm, + NULL); } } /* FIXME: We should be able to remove this memset, but somewhere in the process @@ -533,7 +533,7 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, im->extended_info = obr; if (buf->priv.x11.xcb.mask) obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn, - buf->priv.x11.xcb.depth, + 1, w, h, use_shm, NULL); @@ -559,8 +559,8 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, NULL); if (buf->priv.x11.xcb.mask) obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn, - buf->priv.x11.xcb.depth, - w, h, + 1, + w, h, use_shm, NULL); } @@ -579,7 +579,7 @@ evas_software_xcb_outbuf_new_region_for_update(Outbuf *buf, NULL); if (buf->priv.x11.xcb.mask) obr->mxcbob = _find_xcbob(buf->priv.x11.xcb.conn, - buf->priv.x11.xcb.depth, + 1, h, w, use_shm, NULL); -- 2.7.4