diff Framework/Viewport/WebGLViewport.cpp @ 1346:df8bf351c23f broker

The flag that allows the WebAssemblyViewport to **not** register the mouse events in the canvas (in case they are handled by other means) is now correctly passed down from the factory method.
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 06 Apr 2020 16:57:56 +0200
parents ab81ee8fce1f
children 1b8e37770d78
line wrap: on
line diff
--- a/Framework/Viewport/WebGLViewport.cpp	Mon Apr 06 09:17:40 2020 +0200
+++ b/Framework/Viewport/WebGLViewport.cpp	Mon Apr 06 16:57:56 2020 +0200
@@ -79,18 +79,19 @@
     }
   }
 
-  WebGLViewport::WebGLViewport(const std::string& canvasId) :
-    WebAssemblyViewport(canvasId),
+  WebGLViewport::WebGLViewport(const std::string& canvasId, bool enableEmscriptenMouseEvents) :
+    WebAssemblyViewport(canvasId,enableEmscriptenMouseEvents),
     context_(GetFullCanvasId())
   {
     AcquireCompositor(new OpenGLCompositor(context_));
   }
 
   boost::shared_ptr<WebGLViewport> WebGLViewport::Create(
-    const std::string& canvasId)
+    const std::string& canvasId, bool enableEmscriptenMouseEvents)
   {
-    boost::shared_ptr<WebGLViewport> that = 
-      boost::shared_ptr<WebGLViewport>(new WebGLViewport(canvasId));
+    boost::shared_ptr<WebGLViewport> that = boost::shared_ptr<WebGLViewport>(
+        new WebGLViewport(canvasId, enableEmscriptenMouseEvents));
+    
     that->WebAssemblyViewport::PostConstructor();
     return that;
   }