summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-23 20:57:51 +0900
committerHermet Park <hermetpark@gmail.com>2019-12-23 20:57:51 +0900
commit858246e2ddd5d797485e6c33d18037c635b8c976 (patch)
tree1326fb98ebf4961d6f9cdd93835622befe7b19d0
parenta2bc36a91dacbfaa2811a1083fd868504a88851c (diff)
fix broken menu selection.
booo. efl_input_pointer_mouse_get() doesn't work. This is a temporary fix for expedite working back.
-rw-r--r--src/bin/ui.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/ui.c b/src/bin/ui.c
index 9192856..78c91bd 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -152,7 +152,7 @@ double weights[] =
152 5.000, // test 91 152 5.000, // test 91
153 1.000, // test 92 (line) 153 1.000, // test 92 (line)
154 10.000, // test 93 Image Blend Many Smooth Down Scaled 154 10.000, // test 93 Image Blend Many Smooth Down Scaled
155 155
156 20.000, // MASK 156 20.000, // MASK
157 20.000, // MASK 2 157 20.000, // MASK 2
158 20.000, // MASK 3 158 20.000, // MASK 3
@@ -296,6 +296,9 @@ _ui_key(void *data EINA_UNUSED, const Efl_Event *event)
296static Eina_Position2D down; 296static Eina_Position2D down;
297static int down_menu_sel = 0; 297static int down_menu_sel = 0;
298 298
299//FIXME: efl_input_pointer_button_get() doesn't work!
300static Eina_Bool mdown = EINA_FALSE;
301
299static void 302static void
300_ui_mouse_down(void *data EINA_UNUSED, const Efl_Event *event) 303_ui_mouse_down(void *data EINA_UNUSED, const Efl_Event *event)
301{ 304{
@@ -306,6 +309,7 @@ _ui_mouse_down(void *data EINA_UNUSED, const Efl_Event *event)
306 { 309 {
307 down = efl_input_pointer_position_get(ev); 310 down = efl_input_pointer_position_get(ev);
308 down_menu_sel = menu_sel; 311 down_menu_sel = menu_sel;
312 mdown = EINA_TRUE;
309 } 313 }
310} 314}
311 315
@@ -325,6 +329,7 @@ _ui_mouse_up(void *data EINA_UNUSED, const Efl_Event *event)
325 if ((((dx * dx) + (dy * dy)) < (20 * 20)) && 329 if ((((dx * dx) + (dy * dy)) < (20 * 20)) &&
326 (menu_sel == down_menu_sel)) 330 (menu_sel == down_menu_sel))
327 _ui_select(); 331 _ui_select();
332 mdown = EINA_FALSE;
328 } 333 }
329 else 334 else
330 { 335 {
@@ -338,7 +343,10 @@ _ui_mouse_move(void *data EINA_UNUSED, const Efl_Event *event)
338{ 343{
339 Efl_Input_Pointer *ev = event->info; 344 Efl_Input_Pointer *ev = event->info;
340 345
341 if (efl_input_pointer_button_get(ev) != 1) return; 346 /* FIXME: This mdown should be replace with the original call
347 if (efl_input_pointer_button_get(ev) != 1) return; */
348 if (!mdown) return;
349
342 if (menu_active) 350 if (menu_active)
343 { 351 {
344 Evas_Coord x; 352 Evas_Coord x;