summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-06-05 12:25:59 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-06-05 12:25:59 +0000
commit8030912040ba5987e2d44d89d1a1e117132e63ad (patch)
tree3a3da31210032039e847cf1579e607b000df3a7d /src
parent03754367584f6d327e499157084ec71227d256da (diff)
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. SVN revision: 71713
Diffstat (limited to 'src')
-rw-r--r--src/bin/ui.c5
1 files changed, 1 insertions, 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__,
423} 423}
424 424
425static Evas_Coord down_x, down_y; 425static Evas_Coord down_x, down_y;
426static int down = 0;
427static int down_menu_sel = 0; 426static int down_menu_sel = 0;
428 427
429static void 428static void
@@ -437,7 +436,6 @@ _ui_mouse_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNU
437 { 436 {
438 down_x = ev->canvas.x; 437 down_x = ev->canvas.x;
439 down_y = ev->canvas.y; 438 down_y = ev->canvas.y;
440 down++;
441 down_menu_sel = menu_sel; 439 down_menu_sel = menu_sel;
442 } 440 }
443} 441}
@@ -458,7 +456,6 @@ _ui_mouse_up(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
458 if ((((dx * dx) + (dy * dy)) < (20 * 20)) && 456 if ((((dx * dx) + (dy * dy)) < (20 * 20)) &&
459 (menu_sel == down_menu_sel)) 457 (menu_sel == down_menu_sel))
460 _ui_select(); 458 _ui_select();
461 down--;
462 } 459 }
463 else 460 else
464 { 461 {
@@ -473,7 +470,7 @@ _ui_mouse_move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNU
473 Evas_Event_Mouse_Move *ev; 470 Evas_Event_Mouse_Move *ev;
474 471
475 ev = event_info; 472 ev = event_info;
476 if (!down) return; 473 if (ev->buttons != 1) return;
477 if (menu_active) 474 if (menu_active)
478 { 475 {
479 menu_sel = down_menu_sel + ((ev->cur.canvas.x - down_x) / 25); 476 menu_sel = down_menu_sel + ((ev->cur.canvas.x - down_x) / 25);