Skip to content

Commit 156bd06

Browse files
committed
Enable GPU for setting window
1 parent abc1b48 commit 156bd06

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using Flow.Launcher.Plugin;
2222
using Flow.Launcher.SettingPages.ViewModels;
2323
using Flow.Launcher.ViewModel;
24+
using iNKORE.UI.WPF.Modern.Common;
2425
using Microsoft.Extensions.DependencyInjection;
2526
using Microsoft.Extensions.Hosting;
2627
using Microsoft.VisualStudio.Threading;
@@ -54,6 +55,9 @@ public partial class App : IDisposable, ISingleInstanceApp
5455

5556
public App()
5657
{
58+
// Do not use bitmap cache since it can cause WPF second window freezing issue
59+
ShadowAssist.UseBitmapCache = false;
60+
5761
// Initialize settings
5862
_settings.WMPInstalled = WindowsMediaPlayerHelper.IsWindowsMediaPlayerInstalled();
5963

Flow.Launcher/Flow.Launcher.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<PrivateAssets>all</PrivateAssets>
9090
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
9191
</PackageReference>
92-
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.10.0" />
92+
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.10.1" />
9393
<PackageReference Include="InputSimulator" Version="1.0.4" />
9494
<PackageReference Include="MdXaml" Version="1.27.0" />
9595
<PackageReference Include="MdXaml.AnimatedGif" Version="1.27.0" />

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ private void OnLoaded(object sender, RoutedEventArgs e)
4343
{
4444
RefreshMaximizeRestoreButton();
4545

46-
// Fix (workaround) for the window freezes after lock screen (Win+L) or sleep
47-
// https://stackoverflow.com/questions/4951058/software-rendering-mode-wpf
48-
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
49-
HwndTarget hwndTarget = hwndSource.CompositionTarget;
50-
hwndTarget.RenderMode = RenderMode.SoftwareOnly; // Must use software only render mode here
51-
5246
UpdatePositionAndState();
5347

5448
_viewModel.PropertyChanged += ViewModel_PropertyChanged;

0 commit comments

Comments
 (0)