Re: [E-devel] [Patch][Ecore][Win32] Resolving the issue of mouse-down inside and mouse-up outside

2011-11-19 Thread Vincent Torri


On Thu, 17 Nov 2011, Kim Shinwoo wrote:

 Wow, Thanks for all of your responses!
 I have thought only Mr. Vincent (default Raster) is interested in EFL on
 Windows.

 @Mrs. Youness Alaoui and Sebastian Dransfeld
 I referred to _ecore_mouse_move(); in xlib/ecore_x_events.c.
 So I thought the free(ev); is necessary one. Anyhow, I see your point and I
 have refined the patch and attached.

 @Mr. Vincent
 I checked the resizing window also.
 Previously, SetCapture();/ReleaseCapture(); are used in
 WM_NCLBUTTONDONW/WM_LBUTTONUP case
 for the resizing (dragging). So I added the SetCpture(); to the
 WM_LBUTTONDOWN and move the location of ReleaseCapture(); to the first lie
 of the WM_LBUTTONUP case.

The patch is good. In svn (with a slight modification, so you may have a 
conflict if you update)

thank you

Vincent

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch][Ecore][Win32] Resolving the issue of mouse-down inside and mouse-up outside

2011-11-16 Thread cnook
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


Re: [E-devel] [Patch][Ecore][Win32] Resolving the issue of mouse-down inside and mouse-up outside

2011-11-16 Thread Youness Alaoui
Hi,

Thank you for the patch!
I had a quick look, I don't know anything about the Set/ReleaseCapture, so
I don't know if that's good or not and I can't comment on it.

I noticed though you added a free callback in your code for the event, but
it's not needed since ecore will free the event itself.
See the code here :
https://github.com/kakaroto/e17/blob/master/ecore/src/lib/ecore/ecore_events.c#L272
And the documentation to ecore_event_add also states :
If @p func_free is NULL, free() will be called with the private structure
pointer.

Let's wait for someone else to comment on the Set/ReleaseCapture changes
you added.

Thanks again,
KaKaRoTo

On Wed, Nov 16, 2011 at 7:43 AM, cnook kimci...@gmail.com wrote:

 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.


 --
 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


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Ecore][Win32] Resolving the issue of mouse-down inside and mouse-up outside

2011-11-16 Thread Vincent Torri


On Wed, 16 Nov 2011, cnook wrote:

 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.

i can't test it right now, but iirc, i used SetCapture somewhere. You 
remove a ReleaseCapture, but not that SetCapture. Is it normal ?

Also be sure that the resize and the move of a window (using the mouse, by 
dragging the borders or the title bar) is the same than before.

If you want to improve even more the windows port, there is something to 
do with resize : managing the size_base and size_step API, like with X :-)

regards

Vincent

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Ecore][Win32] Resolving the issue of mouse-down inside and mouse-up outside

2011-11-16 Thread Sebastian Dransfeld
On 11/16/2011 01:43 PM, cnook wrote:
 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.

Isn't free(ev) the default event free function?

No need for _ecore_win32_event_free_mouse_move then.

S.

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Ecore][Win32] Resolving the issue of mouse-down inside and mouse-up outside

2011-11-16 Thread Kim Shinwoo
Wow, Thanks for all of your responses!
I have thought only Mr. Vincent (default Raster) is interested in EFL on
Windows.

@Mrs. Youness Alaoui and Sebastian Dransfeld
I referred to _ecore_mouse_move(); in xlib/ecore_x_events.c.
So I thought the free(ev); is necessary one. Anyhow, I see your point and I
have refined the patch and attached.

@Mr. Vincent
I checked the resizing window also.
Previously, SetCapture();/ReleaseCapture(); are used in
WM_NCLBUTTONDONW/WM_LBUTTONUP case
for the resizing (dragging). So I added the SetCpture(); to the
WM_LBUTTONDOWN and move the location of ReleaseCapture(); to the first lie
of the WM_LBUTTONUP case.


Sincerely,
Shinwoo Kim.


2011/11/17 Sebastian Dransfeld s...@tango.flipp.net

 On 11/16/2011 01:43 PM, cnook wrote:
  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.

 Isn't free(ev) the default event free function?

 No need for _ecore_win32_event_free_mouse_move then.

 S.


 --
 All the data continuously generated in your IT infrastructure
 contains a definitive record of customers, application performance,
 security threats, fraudulent activity, and more. Splunk takes this
 data and makes sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-novd2d
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

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;
 }
--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel