cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ef7e8562a1cb73e0df5d5ee97d0d7c2c1426c0c4

commit ef7e8562a1cb73e0df5d5ee97d0d7c2c1426c0c4
Author: pierre lamot <[email protected]>
Date:   Tue Mar 3 17:11:08 2015 +0100

    ecore_cocoa: don't reject mouse events outside the window
    
    mouse events ouside the window where rejected. that was creating
    interactions where half an event was created, the application was
    then not able to process correctly following events.
    
    @fix
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/ecore_cocoa/ecore_cocoa_window.m | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m 
b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 62743d9..2586087 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -117,18 +117,14 @@
    NSPoint event_location = [event locationInWindow];
    NSPoint pt = [view convertPoint:event_location fromView:nil];
 
-   int w = [view frame].size.width;
    int h = [view frame].size.height;
    int x = pt.x;
    int y = h - pt.y;
 
-   if (y <= 0 || x <= 0 || y > h || x > w)
-     return;
-
    Ecore_Event_Mouse_Button * ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
    if (!ev) return;
 
-   ev->x = pt.x;
+   ev->x = x;
    ev->y = y;
    ev->root.x = ev->x;
    ev->root.y = ev->y;
@@ -174,18 +170,14 @@
    NSPoint event_location = [event locationInWindow];
    NSPoint pt = [view convertPoint:event_location fromView:nil];
 
-   int w = [view frame].size.width;
    int h = [view frame].size.height;
    int x = pt.x;
    int y = h - pt.y;
 
-   if (y <= 0 || x <= 0 || y > h || x > w)
-     return;
-
    Ecore_Event_Mouse_Button * ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
    if (!ev) return;
 
-   ev->x = pt.x;
+   ev->x = x;
    ev->y = y;
    ev->root.x = ev->x;
    ev->root.y = ev->y;

-- 


Reply via email to