Operating system: Linux-4.13.10-041310-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.67
Broken: version: 2.80 (sub 57), branch: blender2.7, commit date: 2019-04-15 23:42, hash: rB5ac7675f4c9c
Short description of error
Using the GRAB_CURSOR bl_option in a modal operator, works fine until the operator returns PASS_THROUGH the first time - for instance, to adjust the viewport using MIDDLEMOUSE, while the modal is active.
After the first PASS_THROUGH the cursor is no longer warped to the opposite side.
Exact steps for others to reproduce the error
- open attached blend file
- run the script
- in the 3d view, look for 'GrabCursorBug' operator in the search menu and run it
- move the mouse horizontally across the region borders, notice how it warps to the opposite side accordingly
- hold down MIDDLEMOUSE and move the mouse to adjust the viewport, release again
- try moving the mouse across the region borders again, it won't warp to the other side anymore