diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/listbox.hxx | 1 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 5 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 11 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/mouse.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 5 |
9 files changed, 5 insertions, 51 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index 863bef640f76..3cd6944d6c75 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -406,7 +406,6 @@ public: virtual void Resize() override; virtual const Wallpaper& GetDisplayBackground() const override; - virtual vcl::Window* GetPreferredKeyInputWindow() override; sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr ); sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr, const Image& rImage ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 9dab05886997..231422dae317 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1945,14 +1945,6 @@ void Edit::GetFocus() Control::GetFocus(); } -vcl::Window* Edit::GetPreferredKeyInputWindow() -{ - if ( mpSubEdit ) - return mpSubEdit->GetPreferredKeyInputWindow(); - else - return this; -} - void Edit::LoseFocus() { if ( mpUpdateDataTimer && !mbIsSubEdit && mpUpdateDataTimer->IsActive() ) diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 61b9373ca166..2d3424f2cba7 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2224,11 +2224,6 @@ void ImplListBox::GetFocus() Control::GetFocus(); } -vcl::Window* ImplListBox::GetPreferredKeyInputWindow() -{ - return maLBWindow.get(); -} - void ImplListBox::Resize() { Control::Resize(); diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 36022324a919..1cbcc4d9e8d7 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -496,19 +496,6 @@ void ListBox::GetFocus() Control::GetFocus(); } -vcl::Window* ListBox::GetPreferredKeyInputWindow() -{ - if ( mpImplLB ) - { - if( IsDropDownBox() ) - return mpImplWin->GetPreferredKeyInputWindow(); - else - return mpImplLB->GetPreferredKeyInputWindow(); - } - - return Control::GetPreferredKeyInputWindow(); -} - void ListBox::LoseFocus() { if( IsDropDownBox() ) diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 653b663b328d..7e9172fd9481 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -488,7 +488,6 @@ public: virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; virtual void Resize() override; - virtual vcl::Window* GetPreferredKeyInputWindow() override; Rectangle GetDragRect() const; Point GetToolboxPosition() const; @@ -536,14 +535,6 @@ css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::Create return css::uno::Reference< css::accessibility::XAccessible >(); } -vcl::Window* ImplPopupFloatWin::GetPreferredKeyInputWindow() -{ - if( mpWindowImpl->mpClientWindow ) - return mpWindowImpl->mpClientWindow; - else - return FloatingWindow::GetPreferredKeyInputWindow(); -} - void ImplPopupFloatWin::ImplSetBorder() { // although we have no border in the sense of a borderwindow @@ -1152,7 +1143,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin { // send HOME key to subtoolbar in order to select first item KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) ); - mpFloatWin->GetPreferredKeyInputWindow()->KeyInput( aEvent ); + mpFloatWin->KeyInput(aEvent); } } diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 6553f947440c..9492e9c0d66b 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -715,6 +715,8 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags { // force key input even without focus (useful for menus) mbGrabFocus = true; + mpWindowImpl->mpFrameData->mbHasFocus = true; + GrabFocus(); } Show( true, ShowFlags::NoActivate ); } diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 892d419074a2..4782c15aa5ac 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -273,9 +273,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) vcl::Window *pParent = this; while( pParent ) { - // #102158#, ignore grabfocus only if the floating parent grabs keyboard focus by itself (GrabsFocus()) - // otherwise we cannot set the focus in a floating toolbox - if( ( (pParent->mpWindowImpl->mbFloatWin && static_cast<FloatingWindow*>(pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) ) + if ((pParent->GetStyle() & WB_SYSTEMFLOATWIN) && !(pParent->GetStyle() & WB_MOVEABLE)) { bMustNotGrabFocus = true; break; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1092c4e9be6a..5d630fa100c7 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3443,13 +3443,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, SetLineColor( oldLineCol ); } -// controls should return the window that gets the -// focus by default, so keyevents can be sent to that window directly -vcl::Window* Window::GetPreferredKeyInputWindow() -{ - return this; -} - bool Window::IsScrollable() const { // check for scrollbars diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index b2de412866d4..062136e363de 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -821,10 +821,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow ) if( !pChild || ( pChild->ImplGetWindowImpl()->mbFloatWin && !static_cast<FloatingWindow *>(pChild)->GrabsFocus() ) ) pChild = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; else - { - // allow floaters to forward keyinput to some member - pChild = pChild->GetPreferredKeyInputWindow(); - } + pChild = pChild->ImplGetWindowImpl()->mpFrameData->mpFocusWin; // no child - than no input if ( !pChild ) |