git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2077 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-21 11:52:35 +00:00
commit 0d40ebe346

View file

@ -343,6 +343,19 @@ namespace Greenshot.Helpers {
if (windowDetailsThread != null) {
windowDetailsThread.Join();
}
// Set capture title, fixing bug #3569703
foreach (WindowDetails window in WindowDetails.GetVisibleWindows()) {
Point estimatedLocation = new Point(RuntimeConfig.LastCapturedRegion.X + (RuntimeConfig.LastCapturedRegion.Width / 2), RuntimeConfig.LastCapturedRegion.Y + (RuntimeConfig.LastCapturedRegion.Height / 2));
if (window.Contains(estimatedLocation)) {
selectedCaptureWindow = window;
capture.CaptureDetails.Title = selectedCaptureWindow.Text;
break;
}
}
// Move cursor, fixing bug #3569703
capture.MoveMouseLocation(capture.ScreenBounds.Location.X - capture.Location.X, capture.ScreenBounds.Location.Y - capture.Location.Y);
capture.MoveElements(capture.ScreenBounds.Location.X - capture.Location.X, capture.ScreenBounds.Location.Y - capture.Location.Y);
capture.CaptureDetails.AddMetaData("source", "screen");
HandleCapture();
}