This commit fixes two bugs: BUG-1809 & BUG-1835 and adds somewhat better Windows 10 support.

This commit is contained in:
RKrom 2015-10-04 22:50:18 +02:00
commit a1769dbc66
7 changed files with 302 additions and 122 deletions

View file

@ -291,7 +291,7 @@ namespace GreenshotPlugin.Core {
}
}
[IniProperty("WebRequestTimeout", Description = "The connect timeout value for webrequets, these are seconds", DefaultValue = "10")]
[IniProperty("WebRequestTimeout", Description = "The connect timeout value for webrequets, these are seconds", DefaultValue = "100")]
public int WebRequestTimeout;
[IniProperty("WebRequestReadWriteTimeout", Description = "The read/write timeout value for webrequets, these are seconds", DefaultValue = "100")]
public int WebRequestReadWriteTimeout;
@ -509,8 +509,8 @@ namespace GreenshotPlugin.Core {
OutputFileReduceColorsTo = 256;
}
if (WebRequestTimeout < 1) {
WebRequestTimeout = 10;
if (WebRequestTimeout <= 10) {
WebRequestTimeout = 100;
}
if (WebRequestReadWriteTimeout < 1) {
WebRequestReadWriteTimeout = 100;

View file

@ -0,0 +1,43 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2015 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using GreenshotPlugin.UnmanagedHelpers;
using System.Windows.Forms;
namespace GreenshotPlugin.Core
{
/// <summary>
/// This IMessageFilter filters out all WM_INPUTLANGCHANGEREQUEST messages which go to a handle which is >32 bits.
/// The need for this is documented here: http://stackoverflow.com/a/32021586
/// Unfortunately there is an error in the code example, should use HWnd instead of LParam for the handle.
/// </summary>
public class WmInputLangChangeRequestFilter : IMessageFilter
{
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == (int)WindowsMessages.WM_INPUTLANGCHANGEREQUEST || m.Msg == (int)WindowsMessages.WM_INPUTLANGCHANGE)
{
return m.HWnd.ToInt64() > 0x7FFFFFFF;
}
return false;
}
}
}