From b61ea595b5f2cac0f108b05526f0a371f512bfd4 Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 19 May 2023 17:33:27 -0400
Subject: SL-18837: Clean up more set-but-unused variables for Xcode 14.3

---
 indra/llui/llbutton.cpp | 3 ---
 indra/llui/llmenugl.cpp | 3 ---
 2 files changed, 6 deletions(-)

(limited to 'indra/llui')

diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 8028f397f3..3354cb2db3 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -942,11 +942,8 @@ void LLButton::draw()
 			break;
 		}
 
-		S32 y_offset = 2 + (getRect().getHeight() - 20)/2;
-	
 		if (pressed && mDisplayPressedState)
 		{
-			y_offset--;
 			x++;
 		}
 
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 5cb840fd61..d29781cf33 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -487,9 +487,6 @@ void LLMenuItemGL::draw( void )
 	// let disabled items be highlighted, just don't draw them as such
 	if( getEnabled() && getHighlight() && !mBriefItem)
 	{
-		int debug_count = 0;
-		if (dynamic_cast<LLMenuItemCallGL*>(this))
-			debug_count++;
 		gGL.color4fv( mHighlightBackground.get().mV );
 
 		gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0 );
-- 
cgit v1.2.3


From bc3f2d53d10c64ccded6aaa14ea37eac78ef6856 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 18 Jul 2023 01:56:42 +0300
Subject: SL-19891 Make sure focusable elements clear focus on destruction

---
 indra/llui/lldraghandle.cpp     | 1 +
 indra/llui/llfolderviewitem.cpp | 1 +
 indra/llui/lllayoutstack.cpp    | 2 ++
 indra/llui/llresizehandle.cpp   | 5 +++++
 indra/llui/llresizehandle.h     | 1 +
 5 files changed, 10 insertions(+)

(limited to 'indra/llui')

diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 48bf5bb80f..220f5ee825 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -68,6 +68,7 @@ LLDragHandle::LLDragHandle(const LLDragHandle::Params& p)
 
 LLDragHandle::~LLDragHandle()
 {
+    gFocusMgr.removeKeyboardFocusWithoutCallback(this);
 	removeChild(mTitleBox);
 	delete mTitleBox;
 }
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index e2b5279aab..5319af1b60 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -177,6 +177,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
 LLFolderViewItem::~LLFolderViewItem()
 {
 	mViewModelItem = NULL;
+    gFocusMgr.removeKeyboardFocusWithoutCallback(this);
 }
 
 BOOL LLFolderViewItem::postBuild()
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index ae9dba5945..7b22f9dbdc 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -89,6 +89,8 @@ LLLayoutPanel::~LLLayoutPanel()
 	// probably not necessary, but...
 	delete mResizeBar;
 	mResizeBar = NULL;
+
+    gFocusMgr.removeKeyboardFocusWithoutCallback(this);
 }
 
 F32 LLLayoutPanel::getAutoResizeFactor() const
diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp
index 24794305ac..13ef0fdb7f 100644
--- a/indra/llui/llresizehandle.cpp
+++ b/indra/llui/llresizehandle.cpp
@@ -70,6 +70,11 @@ LLResizeHandle::LLResizeHandle(const LLResizeHandle::Params& p)
 	}
 }
 
+LLResizeHandle::~LLResizeHandle()
+{
+    gFocusMgr.removeKeyboardFocusWithoutCallback(this);
+}
+
 
 BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask)
 {
diff --git a/indra/llui/llresizehandle.h b/indra/llui/llresizehandle.h
index 7541b9e6c0..ae20ecaa77 100644
--- a/indra/llui/llresizehandle.h
+++ b/indra/llui/llresizehandle.h
@@ -45,6 +45,7 @@ public:
 		Params();
 	};
 
+    ~LLResizeHandle();
 protected:
 	LLResizeHandle(const LLResizeHandle::Params&);
 	friend class LLUICtrlFactory;
-- 
cgit v1.2.3