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.
authormoel.mich
Tue, 07 Sep 2010 18:40:00 +0000
changeset 179a3530106314b
parent 178 67b9b4d8c5fc
child 180 d40f49d45614
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
     1.1 --- a/GUI/ShowDesktop.cs	Tue Sep 07 18:32:37 2010 +0000
     1.2 +++ b/GUI/ShowDesktop.cs	Tue Sep 07 18:40:00 2010 +0000
     1.3 @@ -116,7 +116,7 @@
     1.4          // search if the reference window is behind the worker window
     1.5          IntPtr reference = NativeMethods.FindWindowEx(
     1.6            IntPtr.Zero, workerWindow, null, referenceWindowCaption);
     1.7 -        showDesktopDetected = reference == referenceWindow.Handle;
     1.8 +        showDesktopDetected = reference != IntPtr.Zero;
     1.9        } else {
    1.10          // if there is no worker window, then nothing can hide the reference
    1.11          showDesktopDetected = false;