[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - include/vcl vcl/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Wed May 28 08:41:07 PDT 2014
include/vcl/openglwin.hxx | 2 +-
vcl/source/window/openglwin.cxx | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit e739b3140539df5c82c3c7216af0d90aeee45982
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Wed May 28 17:31:27 2014 +0200
try to fix mouse interaction on windows
Change-Id: I8662b0c20dc719401eec3e3d2d852bb3e139a641
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx
index 85d1940..50d564c 100644
--- a/include/vcl/openglwin.hxx
+++ b/include/vcl/openglwin.hxx
@@ -32,7 +32,7 @@ public:
};
// pImpl Pattern to avoid linking against OpenGL libs when using the class without the context
-class VCLOPENGL_DLLPUBLIC OpenGLWindow : public SystemChildWindow
+class VCLOPENGL_DLLPUBLIC OpenGLWindow : public Window
{
public:
OpenGLWindow(Window* pParent);
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 1983376..68eac16 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -14,16 +14,19 @@
class OpenGLWindowImpl
{
public:
- OpenGLWindowImpl(SystemChildWindow* pWindow);
+ OpenGLWindowImpl(Window* pWindow);
OpenGLContext* getContext();
private:
OpenGLContext maContext;
+ boost::scoped_ptr<SystemChildWindow> mpChildWindow;
};
-OpenGLWindowImpl::OpenGLWindowImpl(SystemChildWindow* pWindow)
+OpenGLWindowImpl::OpenGLWindowImpl(Window* pWindow):
+ mpChildWindow(new SystemChildWindow(pWindow))
{
- maContext.init(pWindow);
+ maContext.init(mpChildWindow.get());
pWindow->SetMouseTransparent(false);
+ maContext.show();
}
OpenGLContext* OpenGLWindowImpl::getContext()
@@ -32,7 +35,7 @@ OpenGLContext* OpenGLWindowImpl::getContext()
}
OpenGLWindow::OpenGLWindow(Window* pParent):
- SystemChildWindow(pParent, 0),
+ Window(pParent, 0),
mpImpl(new OpenGLWindowImpl(this)),
mpRenderer(NULL)
{
@@ -57,6 +60,7 @@ void OpenGLWindow::Paint(const Rectangle&)
void OpenGLWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
+ getContext()->show();
maStartPoint = rMEvt.GetPosPixel();
}
More information about the Libreoffice-commits
mailing list