mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Fix for Windows-Capture exception, which was unfortunately added when fixing a focus issue.
This commit is contained in:
parent
977e29a252
commit
b4b6c6546d
2 changed files with 4 additions and 4 deletions
|
@ -1245,11 +1245,12 @@ namespace Greenshot {
|
|||
windowToCapture = CaptureHelper.SelectCaptureWindow(windowToCapture);
|
||||
if (windowToCapture != null) {
|
||||
capture = CaptureHelper.CaptureWindow(windowToCapture, capture, coreConfiguration.WindowCaptureMode);
|
||||
Activate();
|
||||
WindowDetails.ToForeground(Handle);
|
||||
if (capture!= null && capture.Image != null) {
|
||||
if (capture != null && capture.CaptureDetails != null && capture.Image != null) {
|
||||
((Bitmap)capture.Image).SetResolution(capture.CaptureDetails.DpiX, capture.CaptureDetails.DpiY);
|
||||
surface.AddImageContainer((Bitmap)capture.Image, 100, 100);
|
||||
}
|
||||
Activate();
|
||||
WindowDetails.ToForeground(Handle);
|
||||
}
|
||||
|
||||
if (capture!= null) {
|
||||
|
|
|
@ -932,7 +932,6 @@ namespace Greenshot.Helpers {
|
|||
if (windowToCapture != null) {
|
||||
captureForWindow.CaptureDetails.Title = windowToCapture.Text;
|
||||
}
|
||||
((Bitmap)captureForWindow.Image).SetResolution(captureForWindow.CaptureDetails.DpiX, captureForWindow.CaptureDetails.DpiY);
|
||||
}
|
||||
|
||||
return captureForWindow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue