Skip to content

Commit 2cb1e0a

Browse files
authored
Merge pull request #126 from cairoshell/ignore-monitor-cache
Ignore monitor cache when using TasksService events
2 parents 0f95aa9 + e4b9d0e commit 2cb1e0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ManagedShell.WindowsTasks/ApplicationWindow.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,9 @@ public IntPtr HMonitor
301301
{
302302
get
303303
{
304-
if (_hMonitor == IntPtr.Zero)
304+
if (_hMonitor == IntPtr.Zero || EnvironmentHelper.IsWindows8OrBetter)
305305
{
306+
// Ignore the cache on Windows 8+, as it may be wrong.
306307
SetMonitor();
307308
}
308309

0 commit comments

Comments
 (0)