diff --git a/ShareX.ScreenCaptureLib/WindowsRectangleList.cs b/ShareX.ScreenCaptureLib/WindowsRectangleList.cs index bb9e910ba..45e541f9b 100644 --- a/ShareX.ScreenCaptureLib/WindowsRectangleList.cs +++ b/ShareX.ScreenCaptureLib/WindowsRectangleList.cs @@ -28,7 +28,6 @@ using System.Collections.Generic; using System.Drawing; using System.Threading; -using System.Windows.Forms; namespace ShareX.ScreenCaptureLib { @@ -83,11 +82,6 @@ public List GetWindowInfoList() { if (window2.Rectangle.Contains(window.Rectangle)) { - if (window.IsWindow && window.Rectangle == window2.Rectangle) - { - break; - } - rectVisible = false; break; } @@ -148,7 +142,7 @@ private bool CheckHandle(IntPtr handle, bool isWindow) { Rectangle clientRect = NativeMethods.GetClientRect(handle); - if (clientRect.IsValid()) + if (clientRect.IsValid() && clientRect != windowInfo.Rectangle) { windows.Add(new SimpleWindowInfo(handle, clientRect)); }