From 9971379940e246df16d44045a94db4e609582c1b Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 13 Jan 2023 17:07:42 -0500
Subject: [PATCH] Import Ansariel's fix to global gesture binds triggering in
 floaters

---
 indra/newview/llviewerwindow.cpp | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 811859c78a9..595ec5eaea3 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -267,7 +267,8 @@ static const F32 MIN_UI_SCALE = 0.75f;
 static const F32 MAX_UI_SCALE = 7.0f;
 static const F32 MIN_DISPLAY_SCALE = 0.75f;
 
-static const char KEY_MOUSELOOK = 'M';
+// <FS:Ansariel> FIRE-31852: Now it aggressively executes gestures within focussed floaters...
+//static const char KEY_MOUSELOOK = 'M';
 
 LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity");
 
@@ -2910,13 +2911,15 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
     {
         //Most things should fall through, but mouselook is an exception,
         //don't switch to mouselook if any floater has focus
-        if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT)))
-        {
-            return TRUE;
-        }
-
-        LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(keyboard_focus);
-        if (cur_focus && cur_focus->acceptsTextInput())
+        // <FS:Ansariel> FIRE-31852: Now it aggressively executes gestures within focussed floaters...
+        //if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT)))
+        //{
+        //    return TRUE;
+        //}
+
+        //LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(keyboard_focus);
+        //if (cur_focus && cur_focus->acceptsTextInput())
+        // </FS:Ansariel>
         {
 #ifdef LL_WINDOWS
             // On windows Alt Gr key generates additional Ctrl event, as result handling situations
-- 
GitLab