]> O.S.I.I.S - jp/crow.git/commitdiff
dont block on childrenMutex for checkHoverWidget
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 15 Apr 2021 17:27:44 +0000 (19:27 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 15 Apr 2021 17:27:44 +0000 (19:27 +0200)
Crow/src/Widgets/GroupBase.cs

index 33f26001e0702f291e7cb30c2ce63bf21d0f7677..4c0267f83996449746e7efef779760a8b763b96d 100644 (file)
@@ -288,7 +288,8 @@ namespace Crow
                #region Mouse handling
                public override void checkHoverWidget (MouseMoveEventArgs e) {
                        base.checkHoverWidget (e);//TODO:check if not possible to put it at beginning of meth to avoid doubled check to DropTarget.
-                       childrenRWLock.EnterReadLock ();
+                       if (!childrenRWLock.TryEnterReadLock (10))
+                               return;
                        for (int i = Children.Count - 1; i >= 0; i--) {
                                if (Children[i].MouseIsIn (e.Position)) {
                                        Children[i].checkHoverWidget (e);