X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fcanvas%2FCanvasWindow.cxx;h=29ef354aaae482992424289c4a26282fea84599e;hb=942181c8ae24336de6ca5b28414238f8739de835;hp=f4bf38dc06ea05448149e2a82b71046e86c11103;hpb=b36cdebe8b2da3fd008bf6ab4fb4212626a87a79;p=simgear.git diff --git a/simgear/canvas/CanvasWindow.cxx b/simgear/canvas/CanvasWindow.cxx index f4bf38dc..29ef354a 100644 --- a/simgear/canvas/CanvasWindow.cxx +++ b/simgear/canvas/CanvasWindow.cxx @@ -172,6 +172,19 @@ namespace canvas return _capture_events; } + //---------------------------------------------------------------------------- + void Window::setVisible(bool visible) + { + LayoutItem::setVisible(visible); + Element::setVisible(LayoutItem::isVisible()); + } + + //---------------------------------------------------------------------------- + bool Window::isVisible() const + { + return Element::isVisible(); + } + //---------------------------------------------------------------------------- void Window::raise() { @@ -267,6 +280,9 @@ namespace canvas ->createChild("content"); _image_content->setSrcCanvas(content); + // Forward keyboard events to content + _image_content->setFocus(); + // Draw content on top of decoration _image_content->set("z-index", 1); }