diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-26 03:20:12 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-05-26 03:29:09 +0200 |
commit | dc91ebed1a3b0ef900b1bb5cf203c6a9aeb83016 (patch) | |
tree | dbae3fd51b4bc5951e7aeba6a5b13e7e87c473eb | |
parent | 8097fff2cc3ec601248c55f4d1434bd6d4c6c66e (diff) |
react only to left mouse click
Change-Id: Ia4c2c52b8803cd36d7ed32be559ba446589377e7
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 5 | ||||
-rw-r--r-- | chart2/source/view/inc/GL3DBarChart.hxx | 2 | ||||
-rw-r--r-- | include/vcl/openglwin.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/openglwin.cxx | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index ea589ac06ba2..3f330a831a2d 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -306,11 +306,14 @@ public: } -void GL3DBarChart::clickedAt(const Point& /*rPos*/) +void GL3DBarChart::clickedAt(const Point& /*rPos*/, sal_uInt16 nButtons) { if(mbBlockUserInput) return; + if(nButtons != MOUSE_LEFT) + return; + mbBlockUserInput = true; sal_uInt32 nId = 5; /* diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index 377b18cd6c18..eb436db794ea 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -50,7 +50,7 @@ public: virtual void update() SAL_OVERRIDE; - virtual void clickedAt(const Point& rPos) SAL_OVERRIDE; + virtual void clickedAt(const Point& rPos, sal_uInt16 nButtons) SAL_OVERRIDE; virtual void mouseDragMove(const Point& rStartPos, const Point& rEndPos, sal_uInt16 nButtons) SAL_OVERRIDE; virtual void scroll(long nDelta) SAL_OVERRIDE; virtual void contextDestroyed() SAL_OVERRIDE; diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx index d2e86cce90b1..85d19408d198 100644 --- a/include/vcl/openglwin.hxx +++ b/include/vcl/openglwin.hxx @@ -24,7 +24,7 @@ class VCLOPENGL_DLLPUBLIC IRenderer public: virtual ~IRenderer() {} virtual void update() = 0; - virtual void clickedAt(const Point& rPos) = 0; + virtual void clickedAt(const Point& rPos, sal_uInt16 nButtons) = 0; virtual void mouseDragMove(const Point& rPosBegin, const Point& rPosEnd, sal_uInt16 nButtons) = 0; virtual void scroll(long nDelta) = 0; diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx index 455e455feaf9..19833763ecaf 100644 --- a/vcl/source/window/openglwin.cxx +++ b/vcl/source/window/openglwin.cxx @@ -68,7 +68,7 @@ void OpenGLWindow::MouseButtonUp( const MouseEvent& rMEvt ) Color aColor = GetPixel(aPoint); SAL_WARN("vcl.opengl", aColor.GetColor()); if(mpRenderer) - mpRenderer->clickedAt(aPoint); + mpRenderer->clickedAt(aPoint, rMEvt.GetButtons()); } else { |