[Libreoffice-commits] core.git: sfx2/source

Jim Raykowski raykowj at gmail.com
Tue Jun 19 06:48:07 UTC 2018


 sfx2/source/sidebar/SidebarDockingWindow.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 3a8375eb974eb8ba36ac616478acd881b70f8e19
Author: Jim Raykowski <raykowj at gmail.com>
Date:   Sun Jun 17 12:27:00 2018 -0800

    tdf#101915 make F11 close the sidebar when focus is in sidebar
    
    ...style list panel
    
    Change-Id: I034ba4310cd0942aad0a2e6f807213e14327e7b4
    Reviewed-on: https://gerrit.libreoffice.org/55969
    Reviewed-by: V Stuart Foote <vstuart.foote at utsa.edu>
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
    Tested-by: Heiko Tietze <tietze.heiko at gmail.com>

diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index b962d86f9e10..1c02f63a41e6 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -116,9 +116,18 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
 {
     MouseNotifyEvent nType = rEvent.GetType();
     if (MouseNotifyEvent::KEYINPUT == nType)
+    {
+        const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode();
+        if ( ( 0 == rKeyCode.GetModifier() ) && ( KEY_F11 == rKeyCode.GetCode() ) )
+        {
+            std::shared_ptr<PanelDescriptor> xPanelDescriptor =
+                    mpSidebarController->GetResourceManager()->GetPanelDescriptor( "StyleListPanel" );
+            if ( xPanelDescriptor && mpSidebarController->IsDeckVisible( xPanelDescriptor->msDeckId ) )
+                Close();
+        }
         return true;
-
-    if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType)
+    }
+    else if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType)
     {
         const MouseEvent *mEvt = rEvent.GetMouseEvent();
         if (mEvt->IsLeft())


More information about the Libreoffice-commits mailing list