mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -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);
|
windowToCapture = CaptureHelper.SelectCaptureWindow(windowToCapture);
|
||||||
if (windowToCapture != null) {
|
if (windowToCapture != null) {
|
||||||
capture = CaptureHelper.CaptureWindow(windowToCapture, capture, coreConfiguration.WindowCaptureMode);
|
capture = CaptureHelper.CaptureWindow(windowToCapture, capture, coreConfiguration.WindowCaptureMode);
|
||||||
Activate();
|
if (capture != null && capture.CaptureDetails != null && capture.Image != null) {
|
||||||
WindowDetails.ToForeground(Handle);
|
((Bitmap)capture.Image).SetResolution(capture.CaptureDetails.DpiX, capture.CaptureDetails.DpiY);
|
||||||
if (capture!= null && capture.Image != null) {
|
|
||||||
surface.AddImageContainer((Bitmap)capture.Image, 100, 100);
|
surface.AddImageContainer((Bitmap)capture.Image, 100, 100);
|
||||||
}
|
}
|
||||||
|
Activate();
|
||||||
|
WindowDetails.ToForeground(Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (capture!= null) {
|
if (capture!= null) {
|
||||||
|
|
|
@ -932,7 +932,6 @@ namespace Greenshot.Helpers {
|
||||||
if (windowToCapture != null) {
|
if (windowToCapture != null) {
|
||||||
captureForWindow.CaptureDetails.Title = windowToCapture.Text;
|
captureForWindow.CaptureDetails.Title = windowToCapture.Text;
|
||||||
}
|
}
|
||||||
((Bitmap)captureForWindow.Image).SetResolution(captureForWindow.CaptureDetails.DpiX, captureForWindow.CaptureDetails.DpiY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return captureForWindow;
|
return captureForWindow;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue