diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-18 21:28:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-19 09:54:28 +0100 |
commit | 72bfc8aced60be0adaeabbd496ea8f755c35b016 (patch) | |
tree | 7cffa51bcb6a132cc612506ad686bcd4305536bd /sc | |
parent | 1aaa229af711fe5deeaaabf22c1e32c3025e1bf5 (diff) |
tdf#125917 Ensure mouse is captured before the menu is launched
calc seems to excessively capture the mouse and grabs + floats are messy across
the different ports. But We usually have the mouse captured before calling the
menu, except if we are editing a cell, an additional capture here will ensure
the grab status is the same in both modes and that events go to the same place
in either case.
Change-Id: I213560273be1a6a398d6a1787a53d64501c473f0
Reviewed-on: https://gerrit.libreoffice.org/83130
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 725937aac476..5ff358d7fc6b 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1758,6 +1758,10 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta tools::Rectangle aButtonRect = GetListValButtonRect( aListValPos ); if ( aButtonRect.IsInside( aPos ) ) { + // tdf#125917 typically we have the mouse captured already, except if are editing the cell. + // Ensure its captured before the menu is launched even in the cell editing case + CaptureMouse(); + LaunchDataSelectMenu( aListValPos.Col(), aListValPos.Row() ); nMouseStatus = SC_GM_FILTER; // not set in DoAutoFilterMenue for bDataSelect |