summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/control/imp_listbox.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 2dd277a91ad3..6f6a3eddf77e 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2647,13 +2647,9 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() );
bool bMouseOver = false;
- if( GetParent() )
- {
- vcl::Window *pChild = GetParent()->GetWindow( GetWindowType::FirstChild );
- while( pChild && !(bMouseOver = pChild->IsMouseOver()) )
- pChild = pChild->GetWindow( GetWindowType::Next );
- }
-
+ vcl::Window *pChild = pWin->GetWindow( GetWindowType::FirstChild );
+ while( pChild && !(bMouseOver = pChild->IsMouseOver()) )
+ pChild = pChild->GetWindow( GetWindowType::Next );
if( bMouseOver )
nState |= ControlState::ROLLOVER;