Skip to content

Commit

Permalink
fix(pointers): Remove deprecated compilation condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Aug 28, 2024
1 parent af0b23c commit 1f8ace9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Uno.CrossTargetting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
UIElements. On iOS, this means additional weak references
backed fields to handle opaque native reference pinning and avoid
memory leaks.
- UNO_HAS_ENHANCED_HIT_TEST_PROPERTY: Used to mark if the ENUM hit test property is present or not
- UNO_HAS_MANAGED_SCROLL_PRESENTER: Determines if the platforms supports managed scroll presenter which
uses render transforms instead of native scroll feature (if any)
- UNO_HAS_MANAGED_POINTERS: Determines if the pointer events are dispatched by uno instead of the system (if any).
Expand All @@ -66,12 +65,12 @@
</PropertyGroup>

<PropertyGroup Condition="'$(UnoRuntimeIdentifier)'=='WebAssembly'">
<DefineConstants>$(DefineConstants);__WASM__;UNO_HAS_ENHANCED_HIT_TEST_PROPERTY;UNO_HAS_ENHANCED_LIFECYCLE;UNO_HAS_MANAGED_POINTERS;HAS_INPUT_INJECTOR</DefineConstants>
<DefineConstants>$(DefineConstants);__WASM__;UNO_HAS_ENHANCED_LIFECYCLE;UNO_HAS_MANAGED_POINTERS;HAS_INPUT_INJECTOR</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(UnoRuntimeIdentifier)'=='Skia'">
<DefineConstants>$(DefineConstants);__SKIA__;SUPPORTS_RTL;UNO_SUPPORTS_NATIVEHOST;UNO_HAS_ENHANCED_LIFECYCLE</DefineConstants>
<DefineConstants>$(DefineConstants);UNO_HAS_MANAGED_POINTERS;UNO_HAS_ENHANCED_HIT_TEST_PROPERTY;UNO_HAS_MANAGED_SCROLL_PRESENTER;HAS_INPUT_INJECTOR</DefineConstants>
<DefineConstants>$(DefineConstants);UNO_HAS_MANAGED_POINTERS;UNO_HAS_MANAGED_SCROLL_PRESENTER;HAS_INPUT_INJECTOR</DefineConstants>
<DefineConstants>$(DefineConstants);HAS_COMPOSITION_API;UNO_HAS_BORDER_VISUAL</DefineConstants>
<DefineConstants>$(DefineConstants);HAS_RENDER_TARGET_BITMAP</DefineConstants>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.UI/UI/Xaml/UIElement.Pointers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static UIElement()
var uiElement = typeof(UIElement);
VisibilityProperty.GetMetadata(uiElement).MergePropertyChangedCallback(ClearPointersStateIfNeeded);
Microsoft.UI.Xaml.Controls.Control.IsEnabledProperty.GetMetadata(typeof(Microsoft.UI.Xaml.Controls.Control)).MergePropertyChangedCallback(ClearPointersStateIfNeeded);
#if UNO_HAS_ENHANCED_HIT_TEST_PROPERTY
#if UNO_HAS_MANAGED_POINTERS
HitTestVisibilityProperty.GetMetadata(uiElement).MergePropertyChangedCallback(ClearPointersStateIfNeeded);
#endif
}
Expand Down Expand Up @@ -267,7 +267,7 @@ internal struct PointerEventDispatchResult
/// </summary>
internal HitTestability GetHitTestVisibility()
{
#if UNO_HAS_ENHANCED_HIT_TEST_PROPERTY
#if UNO_HAS_MANAGED_POINTERS
return HitTestVisibility;
#else
// This is a coalesced HitTestVisible and should be unified with it
Expand Down

0 comments on commit 1f8ace9

Please sign in to comment.