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 | |||||
| } | } | ||||
| wmWindow *win_other = GHOST_GetWindowUserData(ghostwin); | wmWindow *win_other = GHOST_GetWindowUserData(ghostwin); | ||||
| wm_cursor_position_from_ghost_screen_coords(win_other, &tmp[0], &tmp[1]); | wm_cursor_position_from_ghost_screen_coords(win_other, &tmp[0], &tmp[1]); | ||||
| copy_v2_v2_int(r_mval, tmp); | copy_v2_v2_int(r_mval, tmp); | ||||
| return win_other; | return win_other; | ||||
| } | } | ||||
| wmWindow *WM_window_from_area(const wmWindowManager *wm, const ScrArea *area) | |||||
| { | |||||
| if (!area) { | |||||
| return NULL; | |||||
| } | |||||
| LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { | |||||
| bScreen *screen = WM_window_get_active_screen(win); | |||||
| LISTBASE_FOREACH (ScrArea *, area_iter, &screen->areabase) { | |||||
| if (area_iter == area) { | |||||
| return win; | |||||
| } | |||||
| } | |||||
| } | |||||
| return NULL; | |||||
| } | |||||
| void WM_window_pixel_sample_read(const wmWindowManager *wm, | void WM_window_pixel_sample_read(const wmWindowManager *wm, | ||||
| const wmWindow *win, | const wmWindow *win, | ||||
| const int pos[2], | const int pos[2], | ||||
| float r_col[3]) | float r_col[3]) | ||||
| { | { | ||||
| bool setup_context = wm->windrawable != win; | bool setup_context = wm->windrawable != win; | ||||
| if (setup_context) { | if (setup_context) { | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||