hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=858246e2ddd5d797485e6c33d18037c635b8c976

commit 858246e2ddd5d797485e6c33d18037c635b8c976
Author: Hermet Park <[email protected]>
Date:   Mon Dec 23 20:57:51 2019 +0900

    fix broken menu selection.
    
    booo. efl_input_pointer_mouse_get() doesn't work.
    
    This is a temporary fix for expedite working back.
---
 src/bin/ui.c | 12 ++++++++++--
 1 file 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[] =
    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;

-- 


Reply via email to