From e11a6a637711c52af3f8d672af30d986be776fe3 Mon Sep 17 00:00:00 2001 From: sachiel Date: Mon, 18 Oct 2010 21:50:41 +0000 Subject: [PATCH] Use event_win when it exists to match source of events I don't expect anything to break, but if mouse or keyboard events suddenly disappear, feel free to revert this patch while blaming cedric or discomfitor. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@53583 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_evas/ecore_evas_x.c | 12 ++++++------ src/lib/ecore_input_evas/ecore_input_evas.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas_x.c b/src/lib/ecore_evas/ecore_evas_x.c index 1cb168c..6520e46 100644 --- a/src/lib/ecore_evas/ecore_evas_x.c +++ b/src/lib/ecore_evas/ecore_evas_x.c @@ -744,7 +744,7 @@ _ecore_evas_x_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *e Ecore_X_Event_Mouse_In *e; e = event; - ee = ecore_event_window_match(e->win); + ee = ecore_event_window_match(e->event_win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; /* { */ @@ -795,7 +795,7 @@ _ecore_evas_x_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void * Ecore_X_Event_Mouse_Out *e; e = event; - ee = ecore_event_window_match(e->win); + ee = ecore_event_window_match(e->event_win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; @@ -954,7 +954,7 @@ _ecore_evas_x_event_window_destroy(void *data __UNUSED__, int type __UNUSED__, v Ecore_X_Event_Window_Destroy *e; e = event; - ee = ecore_event_window_match(e->win); + ee = ecore_event_window_match(e->event_win); if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (ee->func.fn_destroy) ee->func.fn_destroy(ee); @@ -970,7 +970,7 @@ _ecore_evas_x_event_window_configure(void *data __UNUSED__, int type __UNUSED__, Ecore_X_Event_Window_Configure *e; e = event; - ee = ecore_event_window_match(e->win); + ee = ecore_event_window_match(e->event_win); if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (ee->engine.x.direct_resize) return ECORE_CALLBACK_PASS_ON; @@ -1049,7 +1049,7 @@ _ecore_evas_x_event_window_show(void *data __UNUSED__, int type __UNUSED__, void static int first_map_bug = -1; e = event; - ee = ecore_event_window_match(e->win); + ee = ecore_event_window_match(e->event_win); if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (first_map_bug < 0) @@ -1076,7 +1076,7 @@ _ecore_evas_x_event_window_hide(void *data __UNUSED__, int type __UNUSED__, void Ecore_X_Event_Window_Hide *e; e = event; - ee = ecore_event_window_match(e->win); + ee = ecore_event_window_match(e->event_win); if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (!ee->visible) return ECORE_CALLBACK_DONE; diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c index 174d540..4de8b1d 100644 --- a/src/lib/ecore_input_evas/ecore_input_evas.c +++ b/src/lib/ecore_input_evas/ecore_input_evas.c @@ -132,7 +132,7 @@ _ecore_event_evas_key(Ecore_Event_Key *e, Ecore_Event_Press press) { Ecore_Input_Window *lookup; - lookup = _ecore_event_window_match(e->window); + lookup = _ecore_event_window_match(e->event_window); if (!lookup) return ECORE_CALLBACK_RENEW; ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers); if (press == ECORE_DOWN) @@ -148,7 +148,7 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press pr Ecore_Input_Window *lookup; Evas_Button_Flags flags = EVAS_BUTTON_NONE; - lookup = _ecore_event_window_match(e->window); + lookup = _ecore_event_window_match(e->event_window); if (!lookup) return ECORE_CALLBACK_RENEW; if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK; if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK; @@ -177,7 +177,7 @@ ecore_event_evas_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *ev Ecore_Input_Window *lookup; e = event; - lookup = _ecore_event_window_match(e->window); + lookup = _ecore_event_window_match(e->event_window); if (!lookup) return ECORE_CALLBACK_RENEW; if (e->multi.device == 0) { @@ -208,7 +208,7 @@ _ecore_event_evas_mouse_io(Ecore_Event_Mouse_IO *e, Ecore_Event_IO io) { Ecore_Input_Window *lookup; - lookup = _ecore_event_window_match(e->window); + lookup = _ecore_event_window_match(e->event_window); if (!lookup) return ECORE_CALLBACK_RENEW; ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers); switch (io) @@ -246,7 +246,7 @@ ecore_event_evas_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *e Ecore_Input_Window *lookup; e = event; - lookup = _ecore_event_window_match(e->window); + lookup = _ecore_event_window_match(e->event_window); if (!lookup) return ECORE_CALLBACK_RENEW; ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers); evas_event_feed_mouse_wheel(lookup->evas, e->direction, e->z, e->timestamp, NULL); -- 2.7.4