diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lltoolmgr.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/linden/indra/newview/lltoolmgr.cpp b/linden/indra/newview/lltoolmgr.cpp index 3a776d1..8204374 100644 --- a/linden/indra/newview/lltoolmgr.cpp +++ b/linden/indra/newview/lltoolmgr.cpp | |||
@@ -281,22 +281,20 @@ void LLToolMgr::clearTransientTool() | |||
281 | } | 281 | } |
282 | 282 | ||
283 | 283 | ||
284 | // The "gun tool", used for handling mouselook, captures the mouse and | ||
285 | // locks it within the window. When the app loses focus we need to | ||
286 | // release this locking. | ||
287 | void LLToolMgr::onAppFocusLost() | 284 | void LLToolMgr::onAppFocusLost() |
288 | { | 285 | { |
289 | mSavedTool = mBaseTool; | 286 | if (mSelectedTool) |
290 | mBaseTool = gToolNull; | 287 | { |
288 | mSelectedTool->handleDeselect(); | ||
289 | } | ||
291 | updateToolStatus(); | 290 | updateToolStatus(); |
292 | } | 291 | } |
293 | 292 | ||
294 | void LLToolMgr::onAppFocusGained() | 293 | void LLToolMgr::onAppFocusGained() |
295 | { | 294 | { |
296 | if (mSavedTool) | 295 | if (mSelectedTool) |
297 | { | 296 | { |
298 | mBaseTool = mSavedTool; | 297 | mSelectedTool->handleSelect(); |
299 | mSavedTool = NULL; | ||
300 | } | 298 | } |
301 | updateToolStatus(); | 299 | updateToolStatus(); |
302 | } | 300 | } |