sd/source/ui/dlg/navigatr.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 53ab599609803e395774b5e0c93192cf4cbe1a35
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Thu Apr 17 11:37:31 2025 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Mon Apr 21 09:08:21 2025 +0200

    Fix the ESC key behavior in the sidebar sdNavigator
    
    This patch allows the sidebar FocusManager to handle the ESC key when
    the keyboard focus is in the Navigator sidebar panel. I could not make
    program execution enter the Navigator window KeyInputHdl when dragging
    an object and pressing escape. The test for in-drag is dropped by this
    patch. Possibly pre-welded it was needed. Also, I am unsure of the use
    of catching ESCAPE in the Navigator to end a slide show. The patch adds
    a test to determine if a slide show is running before ending it and
    consuming the escape key so no furthing key-input processing is done.
    
    Change-Id: Ib8cc465dd11988ac95877782e7a54b1e3fdfb2a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184344
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index e9c78690c98b..ebb703b0e001 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -735,12 +735,10 @@ IMPL_LINK(SdNavigatorWin, KeyInputHdl, const KeyEvent&, 
rKEvt, bool)
 
     if (KEY_ESCAPE == rKEvt.GetKeyCode().GetCode())
     {
-        // during drag'n'drop we just stop the drag but do not close the 
navigator
-        if (!SdPageObjsTLV::IsInDrag())
+        ::sd::ViewShellBase* pBase = ::sd::ViewShellBase::GetViewShellBase( 
mpBindings->GetDispatcher()->GetFrame());
+        if (sd::SlideShow::IsRunning(*pBase))
         {
-            ::sd::ViewShellBase* pBase = 
::sd::ViewShellBase::GetViewShellBase( mpBindings->GetDispatcher()->GetFrame());
-            if (pBase)
-                sd::SlideShow::Stop(*pBase);
+            sd::SlideShow::Stop(*pBase);
             bConsumed = true;
         }
     }

Reply via email to