summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2024-06-27 22:59:47 +0200
committerRafael Lima <rafael.palma.lima@gmail.com>2024-07-15 20:57:43 +0200
commit6113d5dc45232b602bee0e68cf7560d0b8656546 (patch)
treece8fa5c27a61dc0858e4dc5a5c5194357714808e /sfx2/source/sidebar
parent76f4e6d9764048d98f3fdd1620b0e0a6787385c1 (diff)
tdf#161782 Focus document when Esc is pressed in the Gallery/Navigator
When Esc is pressed on a Panel that has no visible title, move focus to the document. Change-Id: Ib5571dbd9f8a37017e21d2e01e7b546eb2330751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169668 Reviewed-by: Jim Raykowski <raykowj@gmail.com> Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com> Tested-by: Jenkins
Diffstat (limited to 'sfx2/source/sidebar')
-rw-r--r--sfx2/source/sidebar/FocusManager.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index e86de2b7de6a..806ac3d3a823 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -298,10 +298,12 @@ bool FocusManager::HandleKeyEvent(
}
case PC_PanelContent:
// Return focus to tab bar sidebar settings button or panel title.
- if (!IsDeckTitleVisible() && maPanels.size() == 1)
+ if ((!IsDeckTitleVisible() && maPanels.size() == 1) ||
+ (!maPanels[aLocation.mnIndex]->GetTitleBar()->GetVisible()))
FocusButton(0);
else
FocusPanel(aLocation.mnIndex, true);
+
bConsumed = true;
break;
default: