diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llsetkeybinddialog.h | 2 | ||||
| -rw-r--r-- | indra/newview/llviewerinput.cpp | 21 | 
2 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llsetkeybinddialog.h b/indra/newview/llsetkeybinddialog.h index a34b952233..24dfa1dbfd 100644 --- a/indra/newview/llsetkeybinddialog.h +++ b/indra/newview/llsetkeybinddialog.h @@ -76,6 +76,8 @@ public:      static void onDefault(void* user_data);      static void onClickTimeout(void* user_data, MASK mask); +    static bool isRecording() { return sRecordKeys; } +      class Updater;  private: diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 6629a2ffac..94ec534732 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -38,6 +38,7 @@  #include "llkeybind.h" // LLKeyData  #include "llmorphview.h"  #include "llmoveview.h" +#include "llsetkeybinddialog.h"  #include "lltoolfocus.h"  #include "lltoolpie.h"  #include "llviewercontrol.h" @@ -1052,18 +1053,38 @@ BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)  bool LLViewerInput::handleGlobalBindsKeyDown(KEY key, MASK mask)  { +    if (LLSetKeyBindDialog::isRecording()) +    { +        // handleGlobalBindsKeyDown happens before view handling, so can't +        // be interupted by LLSetKeyBindDialog, check manually +        return false; +    }      S32 mode = getMode();      return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, TRUE, FALSE, FALSE, FALSE);  }  bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)  { +    if (LLSetKeyBindDialog::isRecording()) +    { +        // handleGlobalBindsKeyUp happens before view handling, so can't +        // be interupted by LLSetKeyBindDialog, check manually +        return false; +    } +      S32 mode = getMode();      return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, FALSE, TRUE, FALSE, FALSE);  }  bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down)  { +    if (LLSetKeyBindDialog::isRecording()) +    { +        // handleGlobalBindsMouse happens before view handling, so can't +        // be interupted by LLSetKeyBindDialog, check manually +        return false; +    } +      bool res = false;      S32 mode = getMode();      if (down)  | 
