summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-10-30 16:43:41 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2016-10-30 16:55:01 +0200
commit66b75b4ba9f0a1c8003fa52c7a29575e374644a2 (patch)
tree11f33a2a9f1b7e930ce1e3c78835fe3312fe1a46
parent94876fe2704cb5107234ad76c86122ac9d95f866 (diff)
tdf#103087 Border widget must not have focus initially
... unless it was opened using the keyboard. Change-Id: I04675211ff043acf7757afed7252e7d7493eadad
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx10
-rw-r--r--vcl/source/window/dockmgr.cxx4
2 files changed, 9 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index d1c26ba0f28b..2f8a09ee40d1 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 497d316de133..cf93ac4b2e5b 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);
}
}