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:
authorXiao Xiangquan <xiaoxiangquan@gmail.com>2011-07-14 21:29:53 +0400
committerXiao Xiangquan <xiaoxiangquan@gmail.com>2011-07-14 21:29:53 +0400
commitfa46278e347ca173e9e6d6b734a59c268f4fc9d0 (patch)
treea14148822e60cb1f8f36dba0481b830cb9675db1 /source/blender/windowmanager/intern/wm_window.c
parent470a5017fb80f21bac08373e4b5816c92d42990a (diff)
parent4da4943b5ce9514e9fb3d9458f3e52d6b0d310ca (diff)
merge from trunk 38379
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index e2e08c8f546..5836c432181 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -675,13 +675,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy);
win->eventstate->x= cx;
-
-#if defined(__APPLE__) && defined(GHOST_COCOA)
- //Cocoa already uses coordinates with y=0 at bottom
- win->eventstate->y= cy;
-#else
win->eventstate->y= (win->sizey-1) - cy;
-#endif
win->addmousemove= 1; /* enables highlighted buttons */
@@ -798,20 +792,13 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
wmEvent event;
GHOST_TEventDragnDropData *ddd= GHOST_GetEventData(evt);
int cx, cy, wx, wy;
-
/* entering window, update mouse pos */
GHOST_GetCursorPosition(g_system, &wx, &wy);
GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy);
win->eventstate->x= cx;
-
-#if defined(__APPLE__) && defined(GHOST_COCOA)
- //Cocoa already uses coordinates with y=0 at bottom
- win->eventstate->y= cy;
-#else
win->eventstate->y= (win->sizey-1) - cy;
-#endif
event= *(win->eventstate); /* copy last state, like mouse coords */
@@ -1151,12 +1138,7 @@ void wm_get_cursor_position(wmWindow *win, int *x, int *y)
{
GHOST_GetCursorPosition(g_system, x, y);
GHOST_ScreenToClient(win->ghostwin, *x, *y, x, y);
-#if defined(__APPLE__) && defined(GHOST_COCOA)
- //Cocoa has silly exception that should be fixed at the ghost level
- //(ghost is an allegory for an invisible system specific code)
-#else
*y = (win->sizey-1) - *y;
-#endif
}
/* ******************* exported api ***************** */
@@ -1189,9 +1171,8 @@ void WM_cursor_warp(wmWindow *win, int x, int y)
if (win && win->ghostwin) {
int oldx=x, oldy=y;
-#if !defined(__APPLE__) || !defined(GHOST_COCOA)
y= win->sizey -y - 1;
-#endif
+
GHOST_ClientToScreen(win->ghostwin, x, y, &x, &y);
GHOST_SetCursorPosition(g_system, x, y);