ifdef disable X11 mouse grab, it locks up the system for artists too often (whenever blender locks up).

This commit is contained in:
Campbell Barton 2010-06-15 17:40:31 +00:00
parent 42ab9ed59a
commit 3e3d2b7a4c
2 changed files with 8 additions and 1 deletions

@ -465,7 +465,7 @@ GHOST_SystemX11::processEvent(XEvent *xe)
/* could also clamp to screen bounds
* wrap with a window outside the view will fail atm */
bounds.wrapPoint(x_new, y_new, 2); /* offset of one incase blender is at screen bounds */
bounds.wrapPoint(x_new, y_new, 8); /* offset of one incase blender is at screen bounds */
window->getCursorGrabAccum(x_accum, y_accum);
if(x_new != xme.x_root || y_new != xme.y_root) {

@ -57,6 +57,9 @@ typedef struct {
#define MWM_HINTS_DECORATIONS (1L << 1)
// #define GHOST_X11_GRAB
/*
* A Client can't change the window property, that is
* the work of the window manager. In case, we send
@ -1442,7 +1445,9 @@ setWindowCursorGrab(
setWindowCursorVisibility(false);
}
#ifdef GHOST_X11_GRAB
XGrabPointer(m_display, m_window, False, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
#endif
}
else {
if (m_cursorGrab==GHOST_kGrabHide) {
@ -1460,7 +1465,9 @@ setWindowCursorGrab(
/* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */
setCursorGrabAccum(0, 0);
m_cursorGrabBounds.m_l= m_cursorGrabBounds.m_r= -1; /* disable */
#ifdef GHOST_X11_GRAB
XUngrabPointer(m_display, CurrentTime);
#endif
}
XFlush(m_display);