diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-30 16:18:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-30 16:43:30 +0000 |
commit | a4e58b509828d806513217efc03134845629cccd (patch) | |
tree | a94aca090dd423d6343bf4420fb59ff2d6a1922d /vcl | |
parent | c2f13bd8dff4526cdfca2eef7770feae3da8bf3a (diff) |
silence ReleaseMouse warning
Change-Id: I615b4877ab29075ed45149259260acfb2563cad8
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/seleng.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index 69b220bedfcc..6aefea13e56d 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -280,7 +280,7 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) void SelectionEngine::ReleaseMouse() { - if (!pWin) + if (!pWin || !pWin->IsMouseCaptured()) return; pWin->ReleaseMouse(); } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4105b586a40e..311d12e86dcf 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1251,7 +1251,8 @@ void ImplTBDragMgr::Dragging( const Point& rPos ) void ImplTBDragMgr::EndDragging( bool bOK ) { mpDragBox->HideTracking(); - mpDragBox->ReleaseMouse(); + if (mpDragBox->IsMouseCaptured()) + mpDragBox->ReleaseMouse(); mpDragBox->mbDragging = false; mbShowDragRect = false; Application::RemoveAccel( &maAccel ); @@ -3346,7 +3347,8 @@ void ToolBox::ImplFloatControl( bool bStart, FloatingWindow* pFloatWindow ) mbDrag = false; EndTracking(); - ReleaseMouse(); + if (IsMouseCaptured()) + ReleaseMouse(); } else { diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index dddb65fba628..2bcb44ec85b9 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1335,7 +1335,8 @@ void ToolBox::EndSelection() if (mnCurPos != TOOLBOX_ITEM_NOTFOUND) InvalidateItem(mnCurPos); EndTracking(); - ReleaseMouse(); + if (IsMouseCaptured()) + ReleaseMouse(); Deactivate(); } @@ -1378,7 +1379,8 @@ void ToolBox::SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease ) mbDrag = false; mbSelection = false; EndTracking(); - ReleaseMouse(); + if (IsMouseCaptured()) + ReleaseMouse(); Deactivate(); } |