discomfitor pushed a commit to branch enlightenment-0.20.


commit d546536c60f22da74919af835b2e3b826ddaac8a
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Mar 30 10:42:11 2016 -0400

    selectively reject comp object signal emissions based on action_client state
    in the case where a mouse binding is active and a signal binding is 
    by the same mouse-up event which also ends the mouse binding, the deferred
    nature of edje emissions will result in the signal being received by the
    corresponding callback some time after the mouse-up event has been handled 
    the client and the mouse binding has ended
    to accurately handle these cases, signal bindings triggered in the same 
    loop in which a mouse binding has ended after a mouse-up must be rejected in
    order to enforce the compositor's mouse grab
    fix T3347
 src/bin/e_comp_object.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index 1b815f7..fd26527 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -93,6 +93,8 @@ typedef struct _E_Comp_Object
    Evas_Native_Surface *ns; //for custom gl rendering
+   double               action_client_loop_time; //loop time when client's 
action ended
    unsigned int         update_count;  // how many updates have happened to 
this obj
    unsigned int         opacity;  // opacity set with _NET_WM_WINDOW_OPACITY
@@ -343,8 +345,9 @@ _e_comp_object_cb_signal_bind(void *data, Evas_Object *obj 
EINA_UNUSED, const ch
    if (e_dnd_active()) return;
    if (cw->ec->iconic || cw->ec->cur_mouse_action) return;
-   e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(cw->ec),
-                            emission, source);
+   if (!dblequal(cw->action_client_loop_time, ecore_loop_time_get()))
+     e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(cw->ec),
+                              emission, source);
@@ -410,11 +413,15 @@ _e_comp_object_cb_mouse_up(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj EIN
    Evas_Event_Mouse_Down *ev = event_info;
    E_Comp_Object *cw = data;
    E_Binding_Event_Mouse_Button ev2;
+   Eina_Bool acting;
    if (!cw->ec) return;
    if (e_client_action_get() && (e_client_action_get() != cw->ec)) return;
    e_bindings_evas_event_mouse_button_convert(ev, &ev2);
+   acting = !!cw->ec->cur_mouse_action;
    e_client_mouse_up(cw->ec, ev->button, &ev->output, &ev2);
+   if (acting && (!e_client_action_get()))
+     cw->action_client_loop_time = ecore_loop_time_get();
 /* handle evas mouse movement events on client object */


Reply via email to