Cleanup: rename function for removing handlers, use typed area argument

This commit is contained in:
Campbell Barton
2025-08-22 19:39:18 +10:00
parent 0ea1feabd9
commit 4c35ef7a7f
3 changed files with 3 additions and 3 deletions

View File

@@ -1377,7 +1377,7 @@ void screen_change_prepare(
/* remove handlers referencing areas in old screen */
LISTBASE_FOREACH (ScrArea *, area, &screen_old->areabase) {
WM_event_remove_area_handler(&win->modalhandlers, area);
WM_event_remove_handlers_by_area(&win->modalhandlers, area);
}
/* we put timer to sleep, so screen_exit has to think there's no timer */

View File

@@ -689,7 +689,7 @@ void WM_event_remove_ui_handler(ListBase *handlers,
wmUIHandlerRemoveFunc remove_fn,
void *user_data,
bool postpone);
void WM_event_remove_area_handler(ListBase *handlers, void *area);
void WM_event_remove_handlers_by_area(ListBase *handlers, const ScrArea *area);
void WM_event_free_ui_handler_all(bContext *C,
ListBase *handlers,
wmUIHandlerFunc handle_fn,

View File

@@ -5154,7 +5154,7 @@ wmEventHandler_Dropbox *WM_event_add_dropbox_handler(ListBase *handlers, ListBas
return handler;
}
void WM_event_remove_area_handler(ListBase *handlers, void *area)
void WM_event_remove_handlers_by_area(ListBase *handlers, const ScrArea *area)
{
/* XXX(@ton): solution works, still better check the real cause. */