Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area.c
| Show First 20 Lines • Show All 3,448 Lines • ▼ Show 20 Lines | ScrArea *ED_area_find_under_cursor(const bContext *C, int spacetype, const int xy[2]) | ||||
| if (win->parent) { | if (win->parent) { | ||||
| /* If active window is a child, check itself first. */ | /* If active window is a child, check itself first. */ | ||||
| area = BKE_screen_find_area_xy(screen, spacetype, xy); | area = BKE_screen_find_area_xy(screen, spacetype, xy); | ||||
| } | } | ||||
| if (!area) { | if (!area) { | ||||
| /* Check all windows except the active one. */ | /* Check all windows except the active one. */ | ||||
| int scr_pos[2]; | int scr_pos[2]; | ||||
| wmWindow *r_win = WM_window_find_under_cursor(wm, win, win, xy, scr_pos); | wmWindow *r_win = WM_window_find_under_cursor(win, xy, scr_pos); | ||||
| if (r_win) { | if (r_win && r_win != win) { | ||||
| win = r_win; | win = r_win; | ||||
| screen = WM_window_get_active_screen(win); | screen = WM_window_get_active_screen(win); | ||||
| area = BKE_screen_find_area_xy(screen, spacetype, scr_pos); | area = BKE_screen_find_area_xy(screen, spacetype, scr_pos); | ||||
| } | } | ||||
| } | } | ||||
| if (!area && !win->parent) { | if (!area && !win->parent) { | ||||
| /* If active window is a parent window, check itself last. */ | /* If active window is a parent window, check itself last. */ | ||||
| ▲ Show 20 Lines • Show All 414 Lines • Show Last 20 Lines | |||||