]> git.mxchange.org Git - simgear.git/commitdiff
Canvas: clear mousedown/click if mouse leaves canvas.
authorThomas Geymayer <tomgey@gmail.com>
Sat, 29 Jun 2013 12:29:38 +0000 (14:29 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Sat, 29 Jun 2013 12:29:38 +0000 (14:29 +0200)
simgear/canvas/CanvasEventManager.cxx

index 3d14ea56c64ce70aba6d4630730c56823b0a073f..6a6f7cf2b4021620ea18b89eaddd73ab87bacf64 100644 (file)
@@ -112,6 +112,13 @@ namespace canvas
       case Event::MOUSE_LEAVE:
         // Mouse leaves window and therefore also current mouseover element
         handleMove(event, EventPropagationPath());
+
+        // Event is only send if mouse is moved outside the window or dragging
+        // has ended somewhere outside the window. In both cases a mouse button
+        // has been released, so no more mouse down or click...
+        _last_mouse_down.clear();
+        _last_click.clear();
+
         return true;
       case Event::WHEEL:
         break;