Skip to content

Commit

Permalink
fix: Maximizing causes the app to not be responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Aug 19, 2024
1 parent 8c18c2a commit efc724f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Uno.UI/UI/Xaml/Media/VisualTreeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -662,16 +662,13 @@ internal static (UIElement? element, Branch? stale) SearchDownForTopMostElementA

// We didn't find any child at the given position, validate that element can be touched,
// and the position is in actual bounds(which might be different than the clipping bounds)
#if __SKIA__
if (renderingBounds.Contains(testPosition) && element.HitTest(transformToElement.Inverse().Transform(testPosition)))
#else

if (elementHitTestVisibility == HitTestability.Visible && renderingBounds.Contains(testPosition)
#if __WASM__
#if __SKIA__
&& element.HitTest(transformToElement.Inverse().Transform(testPosition))
#elif __WASM__
&& element.HitTest(testPosition)
#endif
)
#endif
{
TRACE($"> LEAF! ({element.GetDebugName()} is the OriginalSource) | stale branch: {stale?.ToString() ?? "-- none --"}");
return (element, stale);
Expand Down Expand Up @@ -829,7 +826,7 @@ internal static IEnumerator<UIElement> GetManagedVisualChildrenReversedEnumerato
internal static MaterializableList<UIElement>.ReverseReduceEnumerator GetManagedVisualChildrenReversedEnumerator(_View view, Predicate<UIElement> predicate)
=> view._children.GetReverseEnumerator(predicate);
#endif
#endregion
#endregion

#region HitTest tracing
#if TRACE_HIT_TESTING
Expand Down

0 comments on commit efc724f

Please sign in to comment.