From 181ec05a27da663c2e9a917c5960e753d221578c Mon Sep 17 00:00:00 2001 From: hermet Date: Tue, 5 Jun 2012 12:25:59 +0000 Subject: [PATCH] expedite - fixed mouse grab lost problem. when the mouse cursor goes to outside of the window, then the mouse up event in the rect would be skipped (is it correct?) So the down would be never 0 again. We can make it simpler and working better also. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/expedite@71713 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/ui.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/bin/ui.c b/src/bin/ui.c index d665561..7e46c99 100644 --- a/src/bin/ui.c +++ b/src/bin/ui.c @@ -423,7 +423,6 @@ _ui_key(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, } static Evas_Coord down_x, down_y; -static int down = 0; static int down_menu_sel = 0; static void @@ -437,7 +436,6 @@ _ui_mouse_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNU { down_x = ev->canvas.x; down_y = ev->canvas.y; - down++; down_menu_sel = menu_sel; } } @@ -458,7 +456,6 @@ _ui_mouse_up(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSE if ((((dx * dx) + (dy * dy)) < (20 * 20)) && (menu_sel == down_menu_sel)) _ui_select(); - down--; } else { @@ -473,7 +470,7 @@ _ui_mouse_move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNU Evas_Event_Mouse_Move *ev; ev = event_info; - if (!down) return; + if (ev->buttons != 1) return; if (menu_active) { menu_sel = down_menu_sel + ((ev->cur.canvas.x - down_x) / 25); -- 2.7.4