diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-11-08 10:07:18 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-11-11 15:26:45 +0000 |
commit | 92e983f3eb22737eca04fc32ec61e1d9159cc10c (patch) | |
tree | 5d3f365448911c36fe3669a3ebb010881de2679c /svx | |
parent | d6e89673155c9cb536747c734b2de23f3d8484ef (diff) |
tdf#103087 Border widget must not have focus initially
... unless it was opened using the keyboard.
(based on 66b75b4ba9f0a1c8003fa52c7a29575e374644a2)
Change-Id: I95753d1c3086177764a08e654a3ff925243743e1
Reviewed-on: https://gerrit.libreoffice.org/30687
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b711eb52c8ab..28684f4c4c93 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -259,7 +259,6 @@ private: protected: virtual void Resize() override; virtual bool Close() override; - virtual void GetFocus() override; public: SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ); @@ -271,6 +270,7 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override; virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; + virtual void KeyInput( const KeyEvent& rKEvt ) override; }; class SvxLineWindow_Impl : public SfxPopupWindow @@ -1664,10 +1664,10 @@ void SvxFrameWindow_Impl::dispose() SfxPopupWindow::dispose(); } -void SvxFrameWindow_Impl::GetFocus() +void SvxFrameWindow_Impl::KeyInput( const KeyEvent& rKEvt ) { - if (aFrameSet) - aFrameSet->GrabFocus(); + aFrameSet->GrabFocus(); + aFrameSet->KeyInput( rKEvt ); } void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) @@ -2930,6 +2930,13 @@ VclPtr<SfxPopupWindow> SvxFrameToolBoxControl::CreatePopupWindow() FloatWinPopupFlags::AllowTearOff | FloatWinPopupFlags::NoAppFocusClose ); pFrameWin->StartSelection(); + + if ( GetToolBox().IsKeyEvent() ) + { + KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) ); + pFrameWin->KeyInput( aEvent ); + } + SetPopupWindow( pFrameWin ); return pFrameWin; |