Revision: 23875
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23875
Author:   theeth
Date:     2009-10-15 22:38:35 +0200 (Thu, 15 Oct 2009)

Log Message:
-----------
Force cursor grab OFF when running with -d.

It helps running a debugger when you can click on stuff when on a breakpoint...

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_cursors.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_cursors.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_cursors.c      
2009-10-15 20:15:21 UTC (rev 23874)
+++ trunk/blender/source/blender/windowmanager/intern/wm_cursors.c      
2009-10-15 20:38:35 UTC (rev 23875)
@@ -165,14 +165,19 @@
 
 void WM_cursor_grab(wmWindow *win, int warp)
 {
-       if(win)
-               GHOST_SetCursorGrab(win->ghostwin, 1, warp, -1);
+       /* Only grab cursor when not running debug.
+        * It helps not to get a stuck WM when hitting a breakpoint  
+        * */
+       if ((G.f & G_DEBUG) == 0)
+               if(win)
+                       GHOST_SetCursorGrab(win->ghostwin, 1, warp, -1);
 }
 
 void WM_cursor_ungrab(wmWindow *win, int restore)
 {
-       if(win)
-               GHOST_SetCursorGrab(win->ghostwin, 0, -1, restore);
+       if ((G.f & G_DEBUG) == 0)
+               if(win)
+                       GHOST_SetCursorGrab(win->ghostwin, 0, -1, restore);
 }
 
 /* afer this you can call restore too */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to