feat: fix double tap followed by dragging.

This commit is contained in:
rabbitism
2024-06-28 12:00:07 +08:00
parent c6231c5675
commit 2c965dadb9
2 changed files with 20 additions and 2 deletions

View File

@@ -11,7 +11,22 @@
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="-1" />
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
<Setter Property="SystemDecorations" Value="Full" />
<Setter Property="SystemDecorations">
<OnPlatform>
<OnPlatform.Default>
<SystemDecorations>Full</SystemDecorations>
</OnPlatform.Default>
<OnPlatform.macOS>
<SystemDecorations>Full</SystemDecorations>
</OnPlatform.macOS>
<OnPlatform.Linux>
<SystemDecorations>None</SystemDecorations>
</OnPlatform.Linux>
<OnPlatform.Windows>
<SystemDecorations>Full</SystemDecorations>
</OnPlatform.Windows>
</OnPlatform>
</Setter>
<Setter Property="Template">
<ControlTemplate TargetType="u:UrsaWindow">
<Panel>

View File

@@ -51,7 +51,10 @@ public class TitleBar: ContentControl
{
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{
_visualRoot?.BeginMoveDrag(e);
if (e.ClickCount < 2)
{
_visualRoot?.BeginMoveDrag(e);
}
}
}