2.5: X11
[blender.git] / source / blender / windowmanager / intern / wm_event_system.c
index 5bcbf5264602c7a3c6ae393f15f0f49f312930df..491b70deedcd5a29db14f0d57f61ecaa22820ec1 100644 (file)
@@ -379,8 +379,9 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
                                WM_operator_free(op);
                }
                else if(retval & OPERATOR_RUNNING_MODAL) {
-                       /* automatically grab cursor during modal ops (X11) */
-                       WM_cursor_grab(CTX_wm_window(C), 1);
+                       /* grab cursor during blocking modal ops (X11) */
+                       if(ot->flag & OPTYPE_BLOCKING)
+                               WM_cursor_grab(CTX_wm_window(C), 1);
                }
                else
                        WM_operator_free(op);