[Libreoffice-commits] core.git: svx/source vcl/source
Maxim Monastirsky
momonasmon at gmail.com
Sun Oct 30 14:56:55 UTC 2016
svx/source/tbxctrls/tbcontrl.cxx | 10 +++++++---
vcl/source/window/dockmgr.cxx | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 66b75b4ba9f0a1c8003fa52c7a29575e374644a2
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sun Oct 30 16:43:41 2016 +0200
tdf#103087 Border widget must not have focus initially
... unless it was opened using the keyboard.
Change-Id: I04675211ff043acf7757afed7252e7d7493eadad
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index d1c26ba..2f8a09e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -261,6 +261,7 @@ private:
protected:
virtual void GetFocus() override;
+ virtual void KeyInput( const KeyEvent& rKEvt ) override;
public:
SvxFrameWindow_Impl( svt::ToolboxController& rController, vcl::Window* pParentWindow );
@@ -1660,10 +1661,13 @@ void SvxFrameWindow_Impl::dispose()
void SvxFrameWindow_Impl::GetFocus()
{
if (aFrameSet)
- {
- aFrameSet->GrabFocus();
aFrameSet->StartSelection();
- }
+}
+
+void SvxFrameWindow_Impl::KeyInput( const KeyEvent& rKEvt )
+{
+ aFrameSet->GrabFocus();
+ aFrameSet->KeyInput( rKEvt );
}
void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 497d316..cf93ac4 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -1089,11 +1089,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
GetWindow()->Show();
- if( bIsToolBox && pParentToolBox->IsKeyEvent() )
+ if( pParentToolBox->IsKeyEvent() )
{
// send HOME key to subtoolbar in order to select first item
KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) );
- mpFloatWin->KeyInput(aEvent);
+ GetWindow()->KeyInput(aEvent);
}
}
More information about the Libreoffice-commits
mailing list