I found some research about using the DIB format on the clipboard, which suggests to do it differently.

This implements that change, and potentially solves #348, BUG-2892 and more (maybe SUPPORT-135, #172, #365)
This commit is contained in:
Robin Krom 2022-02-01 22:36:16 +01:00
parent 8ce4735aad
commit b94d9139f2
No known key found for this signature in database
GPG key ID: BCC01364F1371490
4 changed files with 96 additions and 26 deletions

View file

@ -658,16 +658,6 @@ namespace Greenshot.Base.Core
{
WebRequestReadWriteTimeout = 100;
}
// Workaround for the Windows 11 clipboard issue found here: https://github.com/greenshot/greenshot/issues/348
if (WindowsVersion.IsWindows11OrLater)
{
// If the format DIB is used, remove it and replace it with BITMAP.
if (ClipboardFormats.Contains(ClipboardFormat.DIB))
{
ClipboardFormats = ClipboardFormats.Where(cf => cf != ClipboardFormat.DIB).Append(ClipboardFormat.BITMAP).ToList();
}
}
}
/// <summary>