summaryrefslogtreecommitdiff
path: root/vcl/source/window/seleng.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/seleng.cxx')
-rw-r--r--vcl/source/window/seleng.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index b4f4d0f2b6df..d4ee01c26d61 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -200,7 +200,11 @@ void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 )
BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
{
nFlags &= (~SELENG_CMDEVT);
- if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() )
+ if ( !pFunctionSet || !pWin )
+ return FALSE;
+ const bool bRightClickCursorPositioning =
+ rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection();
+ if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning )
return FALSE;
USHORT nModifier = rMEvt.GetModifier() | nLockedMods;