Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_window.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| /* ************ events *************** */ | /* ************ events *************** */ | ||||
| void wm_cursor_position_from_ghost(wmWindow *win, int *x, int *y) | void wm_cursor_position_from_ghost(wmWindow *win, int *x, int *y) | ||||
| { | { | ||||
| /* TODO: Now we have cursor coordinates in two-pixel increments on | |||||
| retina. Need to multiply in ghost while they are floating-point. */ | |||||
| float fac = GHOST_GetNativePixelSize(win->ghostwin); | float fac = GHOST_GetNativePixelSize(win->ghostwin); | ||||
| GHOST_ScreenToClient(win->ghostwin, *x, *y, x, y); | GHOST_ScreenToClient(win->ghostwin, *x, *y, x, y); | ||||
| *x *= fac; | *x *= fac; | ||||
| *y = (win->sizey - 1) - *y; | *y = (win->sizey - 1) - *y; | ||||
| *y *= fac; | *y *= fac; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||