If client rectangle same size as window size then don't add it

This commit is contained in:
Jaex 2016-01-06 14:48:33 +02:00
parent 8bdd46be1d
commit a3bd391ebc

View file

@ -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<SimpleWindowInfo> 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));
}