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:
authorMartin Poirier <theeth@yahoo.com>2009-10-16 00:38:35 +0400
committerMartin Poirier <theeth@yahoo.com>2009-10-16 00:38:35 +0400
commitdcecd8e043962c9f38b15d569849d0303773af32 (patch)
tree7eb15e9cc441fa2770bb79a06cc98bf74271de54
parent17c7b46334a1ee5cda28a75177269bdc17e68c06 (diff)
Force cursor grab OFF when running with -d.
It helps running a debugger when you can click on stuff when on a breakpoint...
-rw-r--r--source/blender/windowmanager/intern/wm_cursors.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c
index e33132d18b9..c1dfd9ee9fb 100644
--- a/source/blender/windowmanager/intern/wm_cursors.c
+++ b/source/blender/windowmanager/intern/wm_cursors.c
@@ -165,14 +165,19 @@ void WM_cursor_wait(int val)
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 */