summaryrefslogtreecommitdiff
path: root/vcl/source/window/seleng.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-07 16:52:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-07 16:55:08 +0100
commit4b7b013491ddf78b4555e17e89b95f085e2fb34f (patch)
treeb15527fe35f9dfd6ec182cabd9e51d9193ee7460 /vcl/source/window/seleng.cxx
parent63e6cbc3180047000787a9071513152fdd9ce942 (diff)
Resolves: fdo#44998 crash when opening context menu of a field
If you right click on a field in an inactive text box, then a mouse down, context command, mouse up sequence is sent. The mouse up is supposed to be captured by the context menu here. But it doesn't because the mouse down in draw sends an artificial mouse down to the editengine which eventually sets up a MouseCapture window so the context menu doesn't get considered (because it occurs before the capture window is released) so the mouse up gets send to sd while the context menu is up and that causes all sorts of havoc. Change-Id: If3b7c501586f8561be484d0828c630d84644f770
Diffstat (limited to 'vcl/source/window/seleng.cxx')
-rw-r--r--vcl/source/window/seleng.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 63569289ae33..b9aa184d761a 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -244,7 +244,7 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
if( !rMEvt.IsRight() )
{
- pWin->ReleaseMouse();
+ ReleaseMouse();
}
if( (nFlags & SELENG_WAIT_UPEVT) && !(nFlags & SELENG_CMDEVT) &&
@@ -276,6 +276,13 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
return true;
}
+void SelectionEngine::ReleaseMouse()
+{
+ if (!pWin)
+ return;
+ pWin->ReleaseMouse();
+}
+
bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt )
{