Force cursor grab OFF when running with -d.

It helps running a debugger when you can click on stuff when on a breakpoint...
This commit is contained in:
Martin Poirier
2009-10-15 20:38:35 +00:00
parent 17c7b46334
commit dcecd8e043

View File

@@ -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 */