mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
fixed #226: Getting window & control regions will be async so it won't slow down opening of region capture
This commit is contained in:
parent
6a3db1d925
commit
c5f515f167
1 changed files with 10 additions and 4 deletions
|
@ -24,6 +24,7 @@ You should have received a copy of the GNU General Public License
|
||||||
#endregion License Information (GPL v3)
|
#endregion License Information (GPL v3)
|
||||||
|
|
||||||
using HelpersLib;
|
using HelpersLib;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Drawing2D;
|
using System.Drawing.Drawing2D;
|
||||||
|
@ -135,10 +136,15 @@ public override void Prepare()
|
||||||
|
|
||||||
if (AreaManager.WindowCaptureMode)
|
if (AreaManager.WindowCaptureMode)
|
||||||
{
|
{
|
||||||
WindowsListAdvanced wla = new WindowsListAdvanced();
|
IntPtr handle = Handle;
|
||||||
wla.IgnoreHandle = Handle;
|
|
||||||
wla.IncludeChildWindows = AreaManager.IncludeControls;
|
TaskEx.Run(() =>
|
||||||
AreaManager.Windows = wla.GetWindowsRectangleList();
|
{
|
||||||
|
WindowsListAdvanced wla = new WindowsListAdvanced();
|
||||||
|
wla.IgnoreHandle = handle;
|
||||||
|
wla.IncludeChildWindows = AreaManager.IncludeControls;
|
||||||
|
AreaManager.Windows = wla.GetWindowsRectangleList();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue