2
0
Эх сурвалжийг харах

Fixes #2014. Application mouseGrabView is run twice if return true. (#2015)

* Fixes #2014. Application mouseGrabView is run twice if return true.

* Sometimes I get fails with this unit test.
BDisp 2 жил өмнө
parent
commit
f57e48b1e5

+ 2 - 5
Terminal.Gui/Core/Application.cs

@@ -656,11 +656,8 @@ namespace Terminal.Gui {
 					lastMouseOwnerView?.OnMouseLeave (me);
 				}
 				// System.Diagnostics.Debug.WriteLine ($"{nme.Flags};{nme.X};{nme.Y};{mouseGrabView}");
-				if (mouseGrabView != null) {
-					mouseGrabView.OnMouseEvent (nme);
-					if (mouseGrabView != null) {
-						return;
-					}
+				if (mouseGrabView != null && mouseGrabView.OnMouseEvent (nme)) {
+					return;
 				}
 			}