huchi pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e3f68561b3f820cb27c93428ccd011355b03f370

commit e3f68561b3f820cb27c93428ccd011355b03f370
Author: Thiep Ha <thie...@gmail.com>
Date:   Thu Jul 31 05:28:42 2014 +0200

    ecore_evas_extn: fix wrong plug image display after connect
    
    Summary:
    Plug image is displayed incorrect after connect to socket.
    
    Test case: Run ecore_evas_extn_socket_example -> run 
ecore_evas_extn_plug_example -> click Change bg to change bg color.
    Run 2nd ecore_evas_extn_plug_example. The plug area image of 2nd plug is 
incorrect display (different with 1st plug image).
    Reason: When a plug connects to socket, socket sends incorrect buffer 
information.
    Fix: Change buffer information.
    
    @fix
    
    Reviewers: Hermet, huchi
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1232
---
 src/modules/ecore_evas/engines/extn/ecore_evas_extn.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c 
b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index 2da2f02..8ce77aa 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -1503,7 +1503,7 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
    Extn *extn;
    Ipc_Data_Resize ipc;
    Ipc_Data_Update ipc2;
-   int i;
+   int i, prev_b;
 
    if (ee != ecore_ipc_server_data_get(ecore_ipc_client_server_get(e->client)))
      return ECORE_CALLBACK_PASS_ON;
@@ -1536,8 +1536,10 @@ _ipc_client_add(void *data, int type EINA_UNUSED, void 
*event)
    ipc2.x = 0; ipc2.y = 0; ipc2.w = ee->w; ipc2.h = ee->h;
    ecore_ipc_client_send(e->client, MAJOR, OP_UPDATE, 0, 0, 0, &ipc2,
                          sizeof(ipc2));
+   prev_b = extn->cur_b - 1;
+   if (prev_b < 0) prev_b = NBUF - 1;
    ecore_ipc_client_send(e->client, MAJOR, OP_UPDATE_DONE, 0, 0,
-                         extn->cur_b, NULL, 0);
+                         prev_b, NULL, 0);
    _ecore_evas_extn_event(ee, ECORE_EVAS_EXTN_CLIENT_ADD);
    return ECORE_CALLBACK_PASS_ON;
 }

-- 


Reply via email to