Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_window.c
| Show First 20 Lines • Show All 1,049 Lines • ▼ Show 20 Lines | void wm_cursor_position_to_ghost(wmWindow *win, int *x, int *y) | ||||
| *y /= fac; | *y /= fac; | ||||
| *y = win->sizey - *y - 1; | *y = win->sizey - *y - 1; | ||||
| GHOST_ClientToScreen(win->ghostwin, *x, *y, x, y); | GHOST_ClientToScreen(win->ghostwin, *x, *y, x, y); | ||||
| } | } | ||||
| void wm_get_cursor_position(wmWindow *win, int *x, int *y) | void wm_get_cursor_position(wmWindow *win, int *x, int *y) | ||||
| { | { | ||||
| if (UNLIKELY(G.f & G_EVENT_SIMULATE)) { | |||||
| *x = win->eventstate->x; | |||||
| *y = win->eventstate->y; | |||||
| return; | |||||
| } | |||||
| GHOST_GetCursorPosition(g_system, x, y); | GHOST_GetCursorPosition(g_system, x, y); | ||||
| wm_cursor_position_from_ghost(win, x, y); | wm_cursor_position_from_ghost(win, x, y); | ||||
| } | } | ||||
| typedef enum { | typedef enum { | ||||
| SHIFT = 's', | SHIFT = 's', | ||||
| CONTROL = 'c', | CONTROL = 'c', | ||||
| ALT = 'a', | ALT = 'a', | ||||
| ▲ Show 20 Lines • Show All 1,281 Lines • Show Last 20 Lines | |||||