discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f2f4b65eadd80882cf75681723ead19743cc3a4a
commit f2f4b65eadd80882cf75681723ead19743cc3a4a Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Wed Aug 5 17:26:50 2015 -0400 move menu mouse-up feed util function to E_API in comp canvas --- src/bin/e_comp_canvas.c | 13 +++++++++++++ src/bin/e_comp_canvas.h | 1 + src/bin/e_menu.c | 15 +-------------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index bf8cb64..a380a7d 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -693,3 +693,16 @@ e_comp_canvas_keys_ungrab(void) if (e_comp->comp_type == E_PIXMAP_TYPE_X) e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, e_comp->root); } + +E_API void +e_comp_canvas_feed_mouse_up(unsigned int activate_time) +{ + int button_mask, i; + + button_mask = evas_pointer_button_down_mask_get(e_comp->evas); + for (i = 0; i < 32; i++) + { + if ((button_mask & (1 << i))) + evas_event_feed_mouse_up(e_comp->evas, i + 1, EVAS_BUTTON_NONE, activate_time, NULL); + } +} diff --git a/src/bin/e_comp_canvas.h b/src/bin/e_comp_canvas.h index 926a8fa..69ce721 100644 --- a/src/bin/e_comp_canvas.h +++ b/src/bin/e_comp_canvas.h @@ -27,6 +27,7 @@ E_API unsigned int e_comp_canvas_client_layer_map(E_Layer layer); E_API E_Layer e_comp_canvas_client_layer_map_nearest(int layer); E_API void e_comp_canvas_keys_grab(void); E_API void e_comp_canvas_keys_ungrab(void); +E_API void e_comp_canvas_feed_mouse_up(unsigned int activate_time); /* the following functions are used for adjusting root window coordinates * to/from canvas coordinates. diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index ab147f8..68f6773 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -103,19 +103,6 @@ static int _e_menu_autoscroll_y = 0; static Eina_List *handlers = NULL; static Eina_Bool _e_menu_lock = EINA_FALSE; -static void -_mouse_up_feed(Evas *e, unsigned int activate_time) -{ - int button_mask, i; - - button_mask = evas_pointer_button_down_mask_get(e); - for (i = 0; i < 32; i++) - { - if ((button_mask & (1 << i))) - evas_event_feed_mouse_up(e, i + 1, EVAS_BUTTON_NONE, activate_time, NULL); - } -} - static Eina_List * _e_active_menus_copy_ref(void) { @@ -357,7 +344,7 @@ e_menu_activate_mouse(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int d } pmi = _e_menu_item_active_get(); if (pmi) e_menu_item_active_set(pmi, 0); - _mouse_up_feed(e_comp->evas, activate_time); + e_comp_canvas_feed_mouse_up(activate_time); } E_API void --