Kaydet (Commit) 194c6709 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

try to fix mouse interaction on windows

Change-Id: I8662b0c20dc719401eec3e3d2d852bb3e139a641
üst 4e3e1420
......@@ -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);
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment