From 465a9f65de769d76cc950b674683a0903e36f31a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Jun 2020 18:35:43 +1000 Subject: Cleanup: remove window manager argument for paint cursor API This caused an additional argument when exiting object modes and many other low level functions which don't need to access context. This simplifies fixing T77073. --- source/blender/editors/gpencil/gpencil_utils.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_utils.c') diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 3cab26eab44..1962eba5017 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1871,19 +1871,18 @@ void ED_gpencil_toggle_brush_cursor(bContext *C, bool enable, void *customdata) if (gset->paintcursor && !enable) { /* clear cursor */ - WM_paint_cursor_end(CTX_wm_manager(C), gset->paintcursor); + WM_paint_cursor_end(gset->paintcursor); gset->paintcursor = NULL; } else if (enable) { /* in some situations cursor could be duplicated, so it is better disable first if exist */ if (gset->paintcursor) { /* clear cursor */ - WM_paint_cursor_end(CTX_wm_manager(C), gset->paintcursor); + WM_paint_cursor_end(gset->paintcursor); gset->paintcursor = NULL; } /* enable cursor */ - gset->paintcursor = WM_paint_cursor_activate(CTX_wm_manager(C), - SPACE_TYPE_ANY, + gset->paintcursor = WM_paint_cursor_activate(SPACE_TYPE_ANY, RGN_TYPE_ANY, gp_brush_cursor_poll, gp_brush_cursor_draw, -- cgit v1.2.3