Dear All,  Hello~

I think you (especially Mr. Vincent, Raster) know this issue.

If user mouse-down on the one of items in elementary_test,
move(drag) the mouse to the outside of window, and mouse-up,

Then.. it works improperly.. For example..
You can scroll the list of elementary_test without mouse-down.

The attached patch will resolve this issue.
Please review the patch and give any feedbacks. Thanks.


Sincerely,
Shinwoo Kim.
Index: src/lib/ecore_win32/ecore_win32.c
===================================================================
--- src/lib/ecore_win32/ecore_win32.c	(revision 65287)
+++ src/lib/ecore_win32/ecore_win32.c	(working copy)
@@ -107,6 +107,7 @@
        /* Mouse input notifications */
      case WM_LBUTTONDOWN:
        INF("left button down message");
+       SetCapture(window);
        _ecore_win32_event_handle_button_press(data, 1);
        return 0;
      case WM_MBUTTONDOWN:
@@ -119,6 +120,7 @@
        return 0;
      case WM_LBUTTONUP:
        {
+          ReleaseCapture();
           Ecore_Win32_Window *w = NULL;
 
           INF("left button up message");
@@ -126,7 +128,6 @@
           w = (Ecore_Win32_Window *)GetWindowLongPtr(window, GWLP_USERDATA);
           if (w->drag.dragging)
             {
-               ReleaseCapture();
                w->drag.dragging = 0;
                return 0;
             }
Index: src/lib/ecore_win32/ecore_win32_event.c
===================================================================
--- src/lib/ecore_win32/ecore_win32_event.c	(revision 65287)
+++ src/lib/ecore_win32/ecore_win32_event.c	(working copy)
@@ -47,6 +47,13 @@
 
 
 /***** Global functions definitions *****/
+static void
+_ecore_win32_event_free_mouse_move(void *data __UNUSED__, void *ev)
+{
+   Ecore_Event_Mouse_Move *e;
+   e = ev;
+   free(e);
+}
 
 void
 _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg,
@@ -332,7 +339,7 @@
    e->y = GET_Y_LPARAM(msg->data_param);
    e->timestamp = msg->time;
 
-   ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+   ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, _ecore_win32_event_free_mouse_move, NULL);
 }
 
 void
@@ -395,7 +402,7 @@
      _ecore_win32_event_last_time = e->timestamp;
      _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window;
 
-     ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+     ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, _ecore_win32_event_free_mouse_move, NULL);
   }
 
   {
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to