From 965b2886e59849950c34ffc270e73543f2e7604f Mon Sep 17 00:00:00 2001 From: Richasy Date: Fri, 25 Mar 2022 09:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=BC=A0=E6=A0=87=E4=B8=AD?= =?UTF-8?q?=E9=94=AE=E5=8F=8A=E4=BE=A7=E9=94=AE=E8=BF=94=E5=9B=9E=20(#888)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App/Pages/Overlay/PlayerPage.xaml | 1 - src/App/Pages/Overlay/PlayerPage.xaml.cs | 19 ------------------- src/App/Pages/RootPage.xaml | 2 +- src/App/Pages/RootPage.xaml.cs | 4 +++- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/App/Pages/Overlay/PlayerPage.xaml b/src/App/Pages/Overlay/PlayerPage.xaml index 7e6f86566..e69826031 100644 --- a/src/App/Pages/Overlay/PlayerPage.xaml +++ b/src/App/Pages/Overlay/PlayerPage.xaml @@ -6,7 +6,6 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:loc="using:Richasy.Bili.Locator.Uwp" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:pages="using:Richasy.Bili.App.Pages" mc:Ignorable="d"> diff --git a/src/App/Pages/Overlay/PlayerPage.xaml.cs b/src/App/Pages/Overlay/PlayerPage.xaml.cs index bbbd178d5..35af053b8 100644 --- a/src/App/Pages/Overlay/PlayerPage.xaml.cs +++ b/src/App/Pages/Overlay/PlayerPage.xaml.cs @@ -80,25 +80,6 @@ protected override void OnNavigatedFrom(NavigationEventArgs e) CoreViewModel.IsOverLayerExtendToTitleBar = false; } - /// - protected override void OnPointerReleased(PointerRoutedEventArgs e) - { - if (e.GetCurrentPoint(this).Properties.PointerUpdateKind == Windows.UI.Input.PointerUpdateKind.XButton1Released) - { - e.Handled = true; - if (ViewModel.PlayerDisplayMode != PlayerDisplayMode.Default) - { - ViewModel.PlayerDisplayMode = PlayerDisplayMode.Default; - } - else - { - CoreViewModel.Back(); - } - } - - base.OnPointerReleased(e); - } - private async void OnLoadedAsync(object sender, RoutedEventArgs e) { ViewModel.PropertyChanged += OnViewModelPropertyChanged; diff --git a/src/App/Pages/RootPage.xaml b/src/App/Pages/RootPage.xaml index 8a555363a..93e1def8f 100644 --- a/src/App/Pages/RootPage.xaml +++ b/src/App/Pages/RootPage.xaml @@ -10,7 +10,7 @@ muxc:BackdropMaterial.ApplyToRootOrPageBackground="True" mc:Ignorable="d"> - + diff --git a/src/App/Pages/RootPage.xaml.cs b/src/App/Pages/RootPage.xaml.cs index a0da2b3d7..5a9d245a5 100644 --- a/src/App/Pages/RootPage.xaml.cs +++ b/src/App/Pages/RootPage.xaml.cs @@ -94,7 +94,9 @@ protected override void OnNavigatedTo(NavigationEventArgs e) /// protected override void OnPointerReleased(PointerRoutedEventArgs e) { - if (e.GetCurrentPoint(this).Properties.PointerUpdateKind == Windows.UI.Input.PointerUpdateKind.XButton1Released) + var kind = e.GetCurrentPoint(this).Properties.PointerUpdateKind; + if (kind == Windows.UI.Input.PointerUpdateKind.XButton1Released + || kind == Windows.UI.Input.PointerUpdateKind.MiddleButtonReleased) { e.Handled = true; CoreViewModel.Back();