diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-12 10:48:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-12 15:28:59 +0200 |
commit | 3a5808f5e43f5e190b3f1c759563a951b5bb0d08 (patch) | |
tree | 97fd3858bd59e85790ef4900b55d2fc13acf60fc /svx | |
parent | f3692a9260f6f51be89f460ec9cb3bd517952b95 (diff) |
CaptureMouse on mouse-down and ReleaseMouse on mouse-up
Change-Id: I6a2096151bbe7b2bdf9210b3d023926270a9987a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104211
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 9d79d78c961c..e7d90fab15b8 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -132,6 +132,9 @@ bool WeldEditView::MouseMove(const MouseEvent& rMEvt) bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt) { + if (!IsMouseCaptured()) + CaptureMouse(); + if (!HasFocus()) { GrabFocus(); @@ -143,6 +146,8 @@ bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt) bool WeldEditView::MouseButtonUp(const MouseEvent& rMEvt) { + if (IsMouseCaptured()) + ReleaseMouse(); return m_xEditView && m_xEditView->MouseButtonUp(rMEvt); } |