diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-28 17:31:27 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-05-28 17:57:15 +0200 |
commit | 194c6709266b5b2e146c9643f1f89072b7c57000 (patch) | |
tree | 54f062730e6bf88ded2b0c8c6d4fbb1161ebe286 /vcl/source/window/openglwin.cxx | |
parent | 4e3e1420af51f7776dceb6b2800b761e57ddfe63 (diff) |
try to fix mouse interaction on windows
Change-Id: I8662b0c20dc719401eec3e3d2d852bb3e139a641
Diffstat (limited to 'vcl/source/window/openglwin.cxx')
-rw-r--r-- | vcl/source/window/openglwin.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx index 19833763ecaf..68eac16dfa77 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(); } |