discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=8db5763d087b1fb05ccaf8fe62eb0f91b7f04039

commit 8db5763d087b1fb05ccaf8fe62eb0f91b7f04039
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Feb 8 11:52:46 2016 -0500

    ensure that clipboard pastes are handled asynchronously
    
    if more status calls occur before the queue updates, the clipboard
    data would be erroneously consumed here, preventing the operation from
    succeeding (and ruining the queue)
---
 src/bin/empc.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/bin/empc.c b/src/bin/empc.c
index b03e180..3d08551 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -2094,11 +2094,13 @@ empc_status(void *d EINA_UNUSED, int t EINA_UNUSED, 
Empd_Empdd_Status_Data *ev)
      {
         long num = ev->queue_length - clipboard_paste_length;
 
-        empd_empdd_move_list_call(empd_proxy, clipboard_paste_length, num, 
clipboard_paste_id);
-        /* handle paste insertions */
-        clipboard_paste_length = 0;
-        clipboard_paste_id = -1;
-        empd_empdd_status_call(empd_proxy);
+        if (num)
+          {
+             empd_empdd_move_list_call(empd_proxy, clipboard_paste_length, 
num, clipboard_paste_id);
+             /* handle paste insertions */
+             clipboard_paste_length = 0;
+             clipboard_paste_id = -1;
+          }
      }
 
    /* this should only run on startup...other updates are automatic */

-- 


Reply via email to