mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 04:59:30 -07:00
Fix for generating the list of windows which can be selected.
Fix for including the credentials of the web services in azure-pipelines.yml
This commit is contained in:
parent
77c1b3d2c5
commit
043b6048ae
2 changed files with 23 additions and 6 deletions
|
@ -548,13 +548,21 @@ namespace GreenshotPlugin.Core
|
|||
User32.ShowWindow(Handle, ShowWindowCommand.Hide);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns if this window is cloaked
|
||||
/// </summary>
|
||||
public bool IsCloaked
|
||||
{
|
||||
get => DWM.IsWindowCloaked(Handle);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the window is visible.
|
||||
/// </summary>
|
||||
public bool Visible {
|
||||
get {
|
||||
// Tip from Raymond Chen
|
||||
if (DWM.IsWindowCloaked(Handle))
|
||||
if (IsCloaked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1525,6 +1533,12 @@ namespace GreenshotPlugin.Core
|
|||
/// <returns>bool</returns>
|
||||
private static bool IsTopLevel(WindowDetails window)
|
||||
{
|
||||
// Window is not on this desktop
|
||||
if (window.IsCloaked)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ignore windows without title
|
||||
if (window.Text.Length == 0)
|
||||
{
|
||||
|
@ -1535,7 +1549,7 @@ namespace GreenshotPlugin.Core
|
|||
return false;
|
||||
}
|
||||
// Windows without size
|
||||
if (window.WindowRectangle.Size.IsEmpty)
|
||||
if (window.WindowRectangle.Size.Width * window.WindowRectangle.Size.Height == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,13 @@ stages:
|
|||
vmImage: 'Windows-latest'
|
||||
|
||||
variables:
|
||||
solution: 'Greenshot.sln'
|
||||
buildPlatform: 'Any CPU'
|
||||
buildConfiguration: 'Release'
|
||||
group: 'Plug-in Credentials'
|
||||
- group: 'Plug-in Credentials'
|
||||
- name: solution
|
||||
value: 'Greenshot.sln'
|
||||
- name: buildPlatform
|
||||
value: 'Any CPU'
|
||||
- name: buildConfiguration
|
||||
value: 'Release'
|
||||
|
||||
steps:
|
||||
- task: NuGetToolInstaller@1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue