# HG changeset patch
# User moel.mich
# Date 1283884800 0
# Node ID a3530106314bae2a70a7e6aba3529a5dc0d819d0
# Parent  67b9b4d8c5fcfd0e96530fe00eaf6ccf94f555ae
Any OpenHardwareMonitorShowDesktopReferenceWindow (even from another process) will be good enough to detect "Show Desktop". This fixes the "Show Desktop" detection in a second instance of the Open Hardware Monitor.

diff -r 67b9b4d8c5fc -r a3530106314b GUI/ShowDesktop.cs
--- a/GUI/ShowDesktop.cs	Tue Sep 07 18:32:37 2010 +0000
+++ b/GUI/ShowDesktop.cs	Tue Sep 07 18:40:00 2010 +0000
@@ -116,7 +116,7 @@
         // search if the reference window is behind the worker window
         IntPtr reference = NativeMethods.FindWindowEx(
           IntPtr.Zero, workerWindow, null, referenceWindowCaption);
-        showDesktopDetected = reference == referenceWindow.Handle;
+        showDesktopDetected = reference != IntPtr.Zero;
       } else {
         // if there is no worker window, then nothing can hide the reference
         showDesktopDetected = false;