Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 80878cf6884..c15106e21c9 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1569,14 +1569,18 @@ void wm_event_add_ghostevent(wmWindow *win, int type, void *customdata)
case GHOST_kEventCursorMove: {
if(win->active) {
GHOST_TEventCursorData *cd= customdata;
+#if defined(__APPLE__) && defined(GHOST_COCOA)
+ //Cocoa already uses coordinates with y=0 at bottom, and returns inwindow coordinates on mouse moved event
+ event.type= MOUSEMOVE;
+ event.x= evt->x = cd->x;
+ event.y = evt->y = cd->y;
+#else
int cx, cy;
-
GHOST_ScreenToClient(win->ghostwin, cd->x, cd->y, &cx, &cy);
-
event.type= MOUSEMOVE;
event.x= evt->x= cx;
event.y= evt->y= (win->sizey-1) - cy;
-
+#endif
update_tablet_data(win, &event);
wm_event_add(win, &event);
}