mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 22:21:23 +12: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
|
@ -24,6 +24,7 @@
|
|||
#endregion License Information (GPL v3)
|
||||
|
||||
using HelpersLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
@ -135,10 +136,15 @@ public override void Prepare()
|
|||
|
||||
if (AreaManager.WindowCaptureMode)
|
||||
{
|
||||
WindowsListAdvanced wla = new WindowsListAdvanced();
|
||||
wla.IgnoreHandle = Handle;
|
||||
wla.IncludeChildWindows = AreaManager.IncludeControls;
|
||||
AreaManager.Windows = wla.GetWindowsRectangleList();
|
||||
IntPtr handle = Handle;
|
||||
|
||||
TaskEx.Run(() =>
|
||||
{
|
||||
WindowsListAdvanced wla = new WindowsListAdvanced();
|
||||
wla.IgnoreHandle = handle;
|
||||
wla.IncludeChildWindows = AreaManager.IncludeControls;
|
||||
AreaManager.Windows = wla.GetWindowsRectangleList();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue