]> git.mxchange.org Git - flightgear.git/blobdiff - src/Canvas/window.cxx
Canvas window: Update for SimGear MouseEvent changes.
[flightgear.git] / src / Canvas / window.cxx
index e47535bfcb81b870abb420f1ceb0d9bd17e13cd9..cdebb5d0e12df21c0bbf206e1b96f2855d696202 100644 (file)
@@ -109,6 +109,12 @@ namespace canvas
     return _image.getSrcCanvas();
   }
 
+  //----------------------------------------------------------------------------
+  bool Window::isVisible() const
+  {
+    return _image.isVisible();
+  }
+
   //----------------------------------------------------------------------------
   bool Window::isResizable() const
   {
@@ -124,10 +130,7 @@ namespace canvas
   //----------------------------------------------------------------------------
   bool Window::handleMouseEvent(const simgear::canvas::MouseEventPtr& event)
   {
-    if( !getCanvas().expired() )
-      return getCanvas().lock()->handleMouseEvent(event);
-    else
-      return false;
+    return _image.handleEvent(event);
   }
 
   //----------------------------------------------------------------------------