summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-09-10 16:42:39 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-09-10 17:10:50 +0100
commit778dd8f6f1b272c01e848235613d839b9c42b07b (patch)
treea59de0a830a3876897634e381041f41c2bc3949e
parentd7d05136003d1d3adf74285ea1d52a60caaaf763 (diff)
fdo#83716 - fix deadlock holding mutex required by rendering thread.
Change-Id: I7195bba02474ac1c00fce0a93f59be622a920686
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index cc8ab34e9ff8..6245b5f68ca4 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -932,7 +932,6 @@ void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons)
maStepDirection = (maTargetDirection - maCameraDirection)/((float)mnStepsTotal);
*/
-
}
void GL3DBarChart::render()
@@ -947,20 +946,27 @@ void GL3DBarChart::mouseDragMove(const Point& rStartPos, const Point& rEndPos, s
{
long nDirection = rEndPos.X() - rStartPos.X();
SharedResourceAccess(maCond1, maCond2);
- osl::MutexGuard aGuard(maMutex);
+ osl::ClearableGuard<osl::Mutex> aGuard(maMutex);
if ((maRenderEvent == EVENT_NONE) || (maRenderEvent == EVENT_SHOW_SCROLL) ||
(maRenderEvent == EVENT_AUTO_FLY) || (maRenderEvent == EVENT_SHOW_SELECT))
maRenderEvent = nDirection > 0 ? EVENT_DRAG_RIGHT : EVENT_DRAG_LEFT;
+ bool bMove = false;
if(nDirection < 0)
{
mnCornerId = (mnCornerId + 1) % 4;
- moveToCorner();
+ bMove = true;
}
else if(nDirection > 0)
{
mnCornerId = mnCornerId - 1;
if(mnCornerId < 0)
mnCornerId = 3;
+ bMove = true;
+ }
+
+ if (bMove)
+ {
+ aGuard.clear();
moveToCorner();
}
}