Why are bpy.ops.transform.rotate() and resize() missing black arrow visual indicators? When I select an object and press R I get the black double-arrow indicator:


However, when I run bpy.ops.transform.rotate('INVOKE_DEFAULT') from an operator (e.g. the built-in Tools -> Rotate) there are no indicators.

This applies to bpy.ops.transform.resize('INVOKE_DEFAULT') too.

Is there a way to get these indicators to show?

Edit:
It is strange that even though I'm placing the mouse pointer into the WINDOW region with cursor_warp() before calling transform.rotate() I do not get the visual indicator. The mouse pointer does get placed correctly and the operator performs as expected - but without the indicator showing up.

Update:
The problem is that cursor_warp() changes only the mouse pointer position and does not update anything else (i.e. does not update the active region).
The transform operators always do work with the correct region ('WINDOW') but the UI part does not (it works with the region from where the operator was invoked).
The visual indicator that follows the mouse doesn't appear because when you use a button in the Tool Shelf to invoke an operator, the mouse is in a region separate from the actual 3D View, which is where the operator takes place. Here are the region types, taken from https://docs.blender.org/api/blender_python_api_2_78_4/bpy.types.Region.html:

[‘WINDOW’, ‘HEADER’, ‘CHANNELS’, ‘TEMPORARY’, ‘UI’, ‘TOOLS’, ‘TOOL_PROPS’, ‘PREVIEW’]


Rotate and Resize are operators that will not draw their visual indicators if they are not invoked in the proper region. If you call these same operators from the search menu (Spacebar) and the mouse is in the 3D View's region instead of the Tool Shelf's region, the indicators will appear.

Additionally, if you press R to rotate an object with the mouse inside the Tool Shelf (Region Overlap must be enabled in the User Preferences for this to work, unless you use the search menu instead of R), the indicators will still not appear, for the same reason that it doesn't work with buttons.