diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:22:28 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 18:27:13 +0300 |
commit | d5572eacc5958db38ac4a4a32eddb3a2cd24bf68 (patch) | |
tree | 5252d8f509dae02bf9c137a1710c073d5bbac592 /source/blender/editors/gizmo_library | |
parent | b242cc67928a6858a835c088e4d3ea8822c83168 (diff) |
Cleanup: Reduce context usage in UI functions
Part of https://developer.blender.org/T74429.
There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
Diffstat (limited to 'source/blender/editors/gizmo_library')
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c index a2b654dfa68..99ac683747f 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c @@ -354,7 +354,7 @@ static int gizmo_arrow_modal(bContext *C, /* tag the region for redraw */ ED_region_tag_redraw_editor_overlays(ar); - WM_event_add_mousemove(C); + WM_event_add_mousemove(CTX_wm_window(C)); return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c index 5ff76d886c2..6f6f131136c 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c @@ -1087,7 +1087,7 @@ static int gizmo_cage2d_modal(bContext *C, /* tag the region for redraw */ ED_region_tag_redraw_editor_overlays(CTX_wm_region(C)); - WM_event_add_mousemove(C); + WM_event_add_mousemove(CTX_wm_window(C)); return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c index 393568e8382..6f424252b91 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c @@ -586,7 +586,7 @@ static int gizmo_cage3d_modal(bContext *C, /* tag the region for redraw */ ED_region_tag_redraw_editor_overlays(CTX_wm_region(C)); - WM_event_add_mousemove(C); + WM_event_add_mousemove(CTX_wm_window(C)); return OPERATOR_RUNNING_MODAL; } |