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:
authorCampbell Barton <ideasman42@gmail.com>2009-10-17 23:32:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-17 23:32:28 +0400
commit69c6a33ba1a064aa13da3ef6a74b310620cfafd5 (patch)
tree69eb569feb0f03d912391651b7fde6c66c43be98 /intern/ghost/intern/GHOST_Window.h
parent484bf962c66a5ffb7592cf8e4b462dbfb8d21214 (diff)
wrap the mouse within the region while grabbing so on release the current view never changes and less likelyhood of loosing the cursor when running blender on 2+ screens. (assuming the 3d view isnt stretched over both)
Diffstat (limited to 'intern/ghost/intern/GHOST_Window.h')
-rw-r--r--intern/ghost/intern/GHOST_Window.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index e66a3c2fd36..0986fc57430 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -171,10 +171,16 @@ public:
/**
* Sets the cursor grab.
- * @param grab The new grab state of the cursor.
+ * @param mode The new grab state of the cursor.
* @return Indication of success.
*/
- virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode);
+ virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds);
+
+ /**
+ * Gets the cursor grab region, if unset the window is used.
+ * reset when grab is disabled.
+ */
+ virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect& bounds);
/**
* Sets the window "modified" status, indicating unsaved changes
@@ -281,6 +287,9 @@ protected:
/** Accumulated offset from m_cursorGrabInitPos. */
GHOST_TInt32 m_cursorGrabAccumPos[2];
+ /** Wrap the cursor within this region. */
+ GHOST_Rect m_cursorGrabBounds;
+
/** The current shape of the cursor */
GHOST_TStandardCursor m_cursorShape;