tdf#103087 Border widget must not have focus initially

... unless it was opened using the keyboard.

Change-Id: I04675211ff043acf7757afed7252e7d7493eadad
This commit is contained in:
Maxim Monastirsky
2016-10-30 16:43:41 +02:00
parent 94876fe270
commit 66b75b4ba9
2 changed files with 9 additions and 5 deletions

View File

@@ -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 )

View File

@@ -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);
}
}