Cleanup: use an array for wmEvent cursor position variables

Use arrays for wmEvent coordinates, this quiets warnings with GCC11.

- `x, y` -> `xy`.
- `prevx, prevy` -> `prev_xy`.
- `prevclickx, prevclicky` -> `prev_click_xy`.

There is still some cleanup such as using `copy_v2_v2_int()`,
this can be done separately.

Reviewed By: campbellbarton, Severin

Ref D12901
This commit is contained in:
2021-10-20 23:45:30 +11:00
committed by Campbell Barton
parent 3435ea014d
commit 2743d746ea
84 changed files with 563 additions and 540 deletions

View File

@@ -686,7 +686,7 @@ void ED_screens_init(Main *bmain, wmWindowManager *wm)
ED_screen_refresh(wm, win);
if (win->eventstate) {
ED_screen_set_active_region(NULL, win, &win->eventstate->x);
ED_screen_set_active_region(NULL, win, win->eventstate->xy);
}
}
@@ -959,7 +959,7 @@ int ED_screen_area_active(const bContext *C)
ScrArea *area = CTX_wm_area(C);
if (win && screen && area) {
AZone *az = ED_area_actionzone_find_xy(area, &win->eventstate->x);
AZone *az = ED_area_actionzone_find_xy(area, win->eventstate->xy);
if (az && az->type == AZONE_REGION) {
return 1;