Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_type.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operator_type.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c
index 179b4402200..7ae28f3f448 100644
--- a/source/blender/windowmanager/intern/wm_operator_type.c
+++ b/source/blender/windowmanager/intern/wm_operator_type.c
@@ -430,9 +430,18 @@ static int wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event)
* */
if (op->opm->type->flag & OPTYPE_BLOCKING) {
int bounds[4] = {-1, -1, -1, -1};
- const bool wrap = ((U.uiflag & USER_CONTINUOUS_MOUSE) &&
- ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) ||
- (op->opm->type->flag & OPTYPE_GRAB_CURSOR)));
+ int wrap = CURSOR_WRAP_NONE;
+
+ if ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) ||
+ (op->opm->type->flag & OPTYPE_GRAB_CURSOR_XY)) {
+ wrap = CURSOR_WRAP_XY;
+ }
+ else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_X) {
+ wrap = CURSOR_WRAP_X;
+ }
+ else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_Y) {
+ wrap = CURSOR_WRAP_Y;
+ }
if (wrap) {
ARegion *ar = CTX_wm_region(C);