svx/source/tbxctrls/tbcontrl.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
New commits: commit 92e983f3eb22737eca04fc32ec61e1d9159cc10c Author: Maxim Monastirsky <[email protected]> Date: Tue Nov 8 10:07:18 2016 +0200 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 <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b711eb5..28684f4 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;
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
