Skip to content

Commit

Permalink
Merge pull request #50 from philippotto/master
Browse files Browse the repository at this point in the history
Resolve bug in Windows 10 by removing anti-flicker-workaround (#21)
  • Loading branch information
kvakulo committed Aug 12, 2015
2 parents 2199c26 + ca36c5f commit c7ca0b6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Switcheroo/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,7 @@ private void HideWindow()
_windowCloser = null;
}

Opacity = 0;

// Avoid flicker by delaying the "Hide" a bit. This makes sure
// that "Opacity = 0" is taking effect before the window is hidden.
var timer = new DispatcherTimer {Interval = TimeSpan.FromMilliseconds(50)};
timer.Tick += (sender, args) =>
{
Hide();
timer.Stop();
};
timer.Start();
Hide();
}

#endregion
Expand Down

0 comments on commit c7ca0b6

Please sign in to comment.