fix broken menu selection.

booo. efl_input_pointer_mouse_get() doesn't work.

This is a temporary fix for expedite working back.
This commit is contained in:
Hermet Park 2019-12-23 20:57:51 +09:00
parent a2bc36a91d
commit 858246e2dd
1 changed files with 10 additions and 2 deletions

View File

@ -152,7 +152,7 @@ double weights[] =
5.000, // test 91
1.000, // test 92 (line)
10.000, // test 93 Image Blend Many Smooth Down Scaled
20.000, // MASK
20.000, // MASK 2
20.000, // MASK 3
@ -296,6 +296,9 @@ _ui_key(void *data EINA_UNUSED, const Efl_Event *event)
static Eina_Position2D down;
static int down_menu_sel = 0;
//FIXME: efl_input_pointer_button_get() doesn't work!
static Eina_Bool mdown = EINA_FALSE;
static void
_ui_mouse_down(void *data EINA_UNUSED, const Efl_Event *event)
{
@ -306,6 +309,7 @@ _ui_mouse_down(void *data EINA_UNUSED, const Efl_Event *event)
{
down = efl_input_pointer_position_get(ev);
down_menu_sel = menu_sel;
mdown = EINA_TRUE;
}
}
@ -325,6 +329,7 @@ _ui_mouse_up(void *data EINA_UNUSED, const Efl_Event *event)
if ((((dx * dx) + (dy * dy)) < (20 * 20)) &&
(menu_sel == down_menu_sel))
_ui_select();
mdown = EINA_FALSE;
}
else
{
@ -338,7 +343,10 @@ _ui_mouse_move(void *data EINA_UNUSED, const Efl_Event *event)
{
Efl_Input_Pointer *ev = event->info;
if (efl_input_pointer_button_get(ev) != 1) return;
/* FIXME: This mdown should be replace with the original call
if (efl_input_pointer_button_get(ev) != 1) return; */
if (!mdown) return;
if (menu_active)
{
Evas_Coord x;