]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/CanvasEventVisitor.cxx
Canvas: Respect clipping while event handling.
[simgear.git] / simgear / canvas / CanvasEventVisitor.cxx
index 9fbae2c84a73a64a784bcdd2c2d5ccd6d68e68c2..065dce060e31185d787c023db57a92c22b6abc65 100644 (file)
@@ -69,7 +69,8 @@ namespace canvas
       // catch all events which have no target. This allows for example calling
       // event listeners attached to the canvas itself (its root group) even if
       // no element has been hit.
-      if( _root.get() != &el && !el.hitBound(pos, local_pos) )
+      if(    _root.get() != &el
+          && !el.hitBound(_target_path.front().local_pos, pos, local_pos) )
         return false;
 
       EventTarget target = {el.getWeakPtr(), local_pos};