From 5fd72b4dc0191610e4d7b9cc30c5ec5b345150cb Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Fri, 20 Jan 2012 16:20:55 +0100 Subject: Revert "Page Breaks: IsLeaveWindow() is unreliable, we do not need it here." This reverts commit 60c968e9a2ef14aa289e677bd7f40d2c4724fd12. This introduced flickering page break button --- sw/source/ui/docvw/PageBreakWin.cxx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index ff5050b3f826..0edeb618d576 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -83,11 +83,17 @@ namespace void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt ) { - Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); - if ( !m_pWin->Contains( aEventPos ) ) - m_pWin->Fade( false ); + if ( rMEvt.IsLeaveWindow() ) + { + // don't fade if we just move to the 'button' + Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); + if ( !m_pWin->Contains( aEventPos ) ) + m_pWin->Fade( false ); + } else if ( !m_pWin->IsVisible() ) + { m_pWin->Fade( true ); + } if ( !rMEvt.IsSynthetic() ) { @@ -303,9 +309,13 @@ void SwPageBreakWin::Select( ) void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt ) { - Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); - if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) - Fade( false ); + if ( rMEvt.IsLeaveWindow() ) + { + // don't fade if we just move to the 'line', or the popup menu is open + Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); + if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) + Fade( false ); + } else if ( !IsVisible() ) Fade( true ); } -- cgit