summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-08 11:52:46 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-06 21:05:30 -0500
commit8db5763d087b1fb05ccaf8fe62eb0f91b7f04039 (patch)
tree41c6f6fa424d2b06a773caaaf99b7d3bcd010e39 /src
parent1daabc4f2b963d3d87198249bfa0d827486cb704 (diff)
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)
Diffstat (limited to 'src')
-rw-r--r--src/bin/empc.c12
1 files 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)
2094 { 2094 {
2095 long num = ev->queue_length - clipboard_paste_length; 2095 long num = ev->queue_length - clipboard_paste_length;
2096 2096
2097 empd_empdd_move_list_call(empd_proxy, clipboard_paste_length, num, clipboard_paste_id); 2097 if (num)
2098 /* handle paste insertions */ 2098 {
2099 clipboard_paste_length = 0; 2099 empd_empdd_move_list_call(empd_proxy, clipboard_paste_length, num, clipboard_paste_id);
2100 clipboard_paste_id = -1; 2100 /* handle paste insertions */
2101 empd_empdd_status_call(empd_proxy); 2101 clipboard_paste_length = 0;
2102 clipboard_paste_id = -1;
2103 }
2102 } 2104 }
2103 2105
2104 /* this should only run on startup...other updates are automatic */ 2106 /* this should only run on startup...other updates are automatic */