mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Added better IE checking, this allows us to capture windows which display a IE in them. Need to check if we really need this in the auto-capture, but at least the context menu function is really cool! Also fixed a small issue with the destination picker showing in the task-bar (without icon).
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1975 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
bc3cac8c87
commit
0b94cc4940
4 changed files with 101 additions and 42 deletions
|
@ -76,9 +76,13 @@ namespace Greenshot.Helpers {
|
|||
public static void CaptureLastRegion(bool captureMouse) {
|
||||
new CaptureHelper(CaptureMode.LastRegion, captureMouse).MakeCapture();
|
||||
}
|
||||
public static void CaptureIE(bool captureMouse) {
|
||||
new CaptureHelper(CaptureMode.IE, captureMouse).MakeCapture();
|
||||
|
||||
public static void CaptureIE(bool captureMouse, WindowDetails windowToCapture) {
|
||||
CaptureHelper captureHelper = new CaptureHelper(CaptureMode.IE, captureMouse);
|
||||
captureHelper.SelectedCaptureWindow = windowToCapture;
|
||||
captureHelper.MakeCapture();
|
||||
}
|
||||
|
||||
public static void CaptureWindow(bool captureMouse) {
|
||||
new CaptureHelper(CaptureMode.ActiveWindow, captureMouse).MakeCapture();
|
||||
}
|
||||
|
@ -224,7 +228,7 @@ namespace Greenshot.Helpers {
|
|||
HandleCapture();
|
||||
break;
|
||||
case CaptureMode.IE:
|
||||
if (IECaptureHelper.CaptureIE(capture) != null) {
|
||||
if (IECaptureHelper.CaptureIE(capture, SelectedCaptureWindow) != null) {
|
||||
capture.CaptureDetails.AddMetaData("source", "Internet Explorer");
|
||||
HandleCapture();
|
||||
}
|
||||
|
@ -673,9 +677,10 @@ namespace Greenshot.Helpers {
|
|||
// 2) Is Windows >= Vista & DWM enabled: use DWM
|
||||
// 3) Otherwise use GDI (Screen might be also okay but might lose content)
|
||||
if (isAutoMode) {
|
||||
if (conf.IECapture && windowToCapture.ClassName == "IEFrame") {
|
||||
// TODO: Decided if this is smart, although we do consider a part of the window...
|
||||
if (conf.IECapture && IECaptureHelper.IsMostlyIEWindow(windowToCapture, 60)) {
|
||||
try {
|
||||
ICapture ieCapture = IECaptureHelper.CaptureIE(captureForWindow);
|
||||
ICapture ieCapture = IECaptureHelper.CaptureIE(captureForWindow, windowToCapture);
|
||||
if (ieCapture != null) {
|
||||
return ieCapture;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue