diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-15 21:40:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-15 21:40:31 +0400 |
commit | 3e3d2b7a4cfc38f673bdeb48707b95c7bd50049a (patch) | |
tree | 0d6218e2f469654be65e2ed1cc26de8eb2e9f968 /intern | |
parent | 42ab9ed59abe435b9e64617fe3073fe3cfbeb80d (diff) |
ifdef disable X11 mouse grab, it locks up the system for artists too often (whenever blender locks up).
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 1ae9b666c6b..052c868e5e0 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -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) { diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index b3b1c8ae0f7..60e12ff78df 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -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); |