Skip to content

Commit e4b9d0e

Browse files
committed
Ignore monitor cache when using TasksService events
1 parent 0f95aa9 commit e4b9d0e

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)