Tilman Sauerbeck <[EMAIL PROTECTED]> [2004-07-11 18:05]:
> when you register an event handler for ECORE_X_MOUSE_IN/OUT for a
> specific window, your callbacks will also be called if a
> EnterNotify/LeaveNotify event occured in a subwindow/child of the window
> you registered a callback on.

Looks like we solved this one ;)

I'm experiencing another problem with OpenBox; whenever I click in an
ecore_evas window, it's generating a pair of EnterNotify and LeaveNotify
events o_O

I don't want to tell you what I tried to fix the bug (?), it's a long
story ;)

Anyway, this behaviour seems broken to me, do we want to work around it
in ecore_evas?

The attached patch seems to work well for me, but I don't know whether
it's okay for us to ignore Enter/LeaveNotify if it's coming from a
released/instantiated grab?

-- 
Regards,
Tilman
Index: ecore_evas_x.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_x.c,v
retrieving revision 1.20
diff -u -r1.20 ecore_evas_x.c
--- ecore_evas_x.c      12 Jul 2004 17:53:37 -0000      1.20
+++ ecore_evas_x.c      12 Jul 2004 19:53:41 -0000
@@ -211,6 +211,7 @@
    ee = _ecore_evas_x_match(e->win);
    if (!ee) return 1; /* pass on event */
    if (e->event_win == ee->engine.x.win_container) return 0;
+   if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0;
    if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
    _ecore_evas_modifier_locks_update(ee, e->modifiers);
    evas_event_feed_mouse_in(ee->evas);
@@ -228,6 +229,7 @@
    ee = _ecore_evas_x_match(e->win);
    if (!ee) return 1; /* pass on event */
    if (e->event_win == ee->engine.x.win_container) return 0;
+   if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0;
    _ecore_evas_modifier_locks_update(ee, e->modifiers);   
    _ecore_evas_mouse_move_process(ee, e->x, e->y);
    evas_event_feed_mouse_out(ee->evas);

Reply via email to