Skip to content

Commit

Permalink
readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoco007 committed Sep 25, 2021
1 parent 2d0fde3 commit 365e8a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions WpfKenBurns/ScreensaverWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ public partial class ScreensaverWindow : Window
{
public event Action? DisplayChanged;

private IntPtr windowHandle;
private Configuration configuration;
private readonly IntPtr windowHandle;
private readonly Configuration configuration;
private readonly bool isPreviewWindow = false;

private Point lastMousePosition = default;
private bool isPreviewWindow = false;

private ScreensaverWindow(Configuration config)
{
Expand All @@ -54,8 +55,7 @@ public ScreensaverWindow(Configuration config, IntPtr previewHandle) : this(conf
NativeMethods.SetWindowLong(windowHandle, -16, 0x40000000);

// Place our window inside the parent
RECT parentRect;
NativeMethods.GetClientRect(previewHandle, out parentRect);
NativeMethods.GetClientRect(previewHandle, out RECT parentRect);

NativeMethods.SetWindowPos(windowHandle, IntPtr.Zero, 0, 0, parentRect.Width, parentRect.Height, SetWindowPosFlags.ShowWindow);

Expand Down

0 comments on commit 365e8a4

Please sign in to comment.