From 4054b2d9fbbcf29eec91b450f188855084dea867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Tue, 7 Sep 2010 18:40:00 +0000 Subject: [PATCH] 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. --- GUI/ShowDesktop.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GUI/ShowDesktop.cs b/GUI/ShowDesktop.cs index d44f0b7..805ee80 100644 --- a/GUI/ShowDesktop.cs +++ b/GUI/ShowDesktop.cs @@ -116,7 +116,7 @@ namespace OpenHardwareMonitor.GUI { // 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;