mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
BUG-1809: Found some additional information which explains why the previous fix for BUG-1809 was not working.
This commit is contained in:
parent
e03df48a26
commit
342a506480
4 changed files with 46 additions and 9 deletions
|
@ -510,14 +510,20 @@ namespace Greenshot {
|
|||
get {return contextMenu;}
|
||||
}
|
||||
|
||||
#region hotkeys
|
||||
protected override void WndProc(ref Message m) {
|
||||
if (HotkeyControl.HandleMessages(ref m)) {
|
||||
return;
|
||||
}
|
||||
// BUG-1809 prevention, filter the InputLangChange messages
|
||||
if (WmInputLangChangeRequestFilter.PreFilterMessageExternal(ref m))
|
||||
{
|
||||
return;
|
||||
}
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
#region hotkeys
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to cleanly register a hotkey
|
||||
/// </summary>
|
||||
|
@ -1225,14 +1231,27 @@ namespace Greenshot {
|
|||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
|
||||
Exception exceptionToLog = e.ExceptionObject as Exception;
|
||||
string exceptionText = EnvironmentInfo.BuildReport(exceptionToLog);
|
||||
LOG.Error(EnvironmentInfo.ExceptionToString(exceptionToLog));
|
||||
LOG.Error("Exception caught in the UnhandledException handler.");
|
||||
LOG.Error(exceptionText);
|
||||
if (exceptionText != null && exceptionText.Contains("InputLanguageChangedEventArgs"))
|
||||
{
|
||||
// Ignore for BUG-1809
|
||||
return;
|
||||
}
|
||||
new BugReportForm(exceptionText).ShowDialog();
|
||||
}
|
||||
|
||||
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) {
|
||||
Exception exceptionToLog = e.Exception;
|
||||
string exceptionText = EnvironmentInfo.BuildReport(exceptionToLog);
|
||||
LOG.Error(EnvironmentInfo.ExceptionToString(exceptionToLog));
|
||||
LOG.Error("Exception caught in the ThreadException handler.");
|
||||
LOG.Error(exceptionText);
|
||||
if (exceptionText != null && exceptionText.Contains("InputLanguageChangedEventArgs"))
|
||||
{
|
||||
// Ignore for BUG-1809
|
||||
return;
|
||||
}
|
||||
|
||||
new BugReportForm(exceptionText).ShowDialog();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ Bugs Resolved:
|
|||
* BUG-1809: OverflowException when changing the windows input language
|
||||
* BUG-1835: Imgur: uploads were cancelled due to a timeout which was set too small
|
||||
* BUG-1833: Imgur: API-Key issues when using anonymous uploads
|
||||
* Github Pull 1: Fixed error calling external command. Thanks to viper3400
|
||||
|
||||
|
||||
1.2.6.7-359dcf3 RELEASE
|
||||
|
|
|
@ -28,19 +28,36 @@ 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
|
||||
{
|
||||
private static readonly ILog LOG = LogManager.GetLogger(typeof(WmInputLangChangeRequestFilter));
|
||||
|
||||
/// <summary>
|
||||
/// This will do some filtering
|
||||
/// </summary>
|
||||
/// <param name="m">Message</param>
|
||||
/// <returns>true if the message should be filtered</returns>
|
||||
public bool PreFilterMessage(ref Message m)
|
||||
{
|
||||
return PreFilterMessageExternal(ref m);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Also used in the MainForm WndProc
|
||||
/// </summary>
|
||||
/// <param name="m">Message</param>
|
||||
/// <returns>true if the message should be filtered</returns>
|
||||
public static bool PreFilterMessageExternal(ref Message m)
|
||||
{
|
||||
WindowsMessages message = (WindowsMessages)m.Msg;
|
||||
if (message == WindowsMessages.WM_INPUTLANGCHANGEREQUEST || message == WindowsMessages.WM_INPUTLANGCHANGE)
|
||||
{
|
||||
LOG.WarnFormat("Filtering: {0}, {1:X} - {2:X} - {3:X}", message, m.LParam.ToInt64(), m.WParam.ToInt64(), m.HWnd.ToInt64());
|
||||
return (m.LParam.ToInt64() | 0xFFFFFFFF) != 0;
|
||||
// For now we always return true
|
||||
return true;
|
||||
// But it could look something like this:
|
||||
//return (m.LParam.ToInt64() | 0x7FFFFFFF) != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version: 1.2.6.{build}
|
||||
version: 1.2.7.{build}
|
||||
branches:
|
||||
only:
|
||||
- 1.2
|
||||
|
@ -37,7 +37,7 @@ environment:
|
|||
secure: bjKXhFZkDqaq98XBrz5oQKQfT8CLpuv2ZAiBIwkzloaAPUs97b5yx6h/xFaE4NLS
|
||||
credentials_picasa_consumer_secret:
|
||||
secure: yNptTpmJWypbu9alOQtetxU66drr2FKxoPflNgRJdag=
|
||||
build_type: UNSTABLE
|
||||
build_type: RELEASE
|
||||
rsakey:
|
||||
secure: GNomwdlwZOCyd8d7xEWTnMVs1lpOeHvF+tlnvcbXGovLRtwAp2Ufu0r7paGY7BHGGkIs2WE7xUfyQ9UauVB+58JZ6fwVega8ucUgVJhl4x0QQNN2d6sULUhHfhuEHmxw+FDO/FxKFE6Lmf+ZRY+OGiw0wKIl4qD7mGRHcDQTipNEsTbau8HzqRVCdu3dx7pODC61DlsbO71xLF7UlqnmuZE+91Zz3V6AgaqE246n1499d6bXBYw1AH+8opNnKDFLnTHf7hUVcZn9mj6tKZXeTCuVUOr/SVQcgHKxlBlqzhfaEkxCR5GPtzQRqwDMxEycmFvj2wNP/sie6UEGhQxE4YMCc2OgqNOkpc5BbP/fxLr/SLFOEf1XXzTWCFMhsgpHx7TZbgQH26sa0rK/xaBRacZlwAaNk7V2nFZT7TebYEFy6zWNr9Y+IyeXIofj42XQTNXv8d8hyh+UYLByVEFYRf2DnActQkZQyNdWjZ+CxDV50QSZZs8FT3IIqraHYKsj2ITAN5LrUtWCi7bpNJL0UGo0EJiB2i0bp++tEAAwyrCljxI8d4bbGl/flHk/xd+ysQPnomndijeObjguEzqT8pyXZluSZ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0OglH0rDd5W+3NaUG9FZ//o9MAP5j2QqwSuFWXppbigh4zk+h17eJn5zhld7dtvOr+YmgYULj6NFIDKBZHUJdqLYScVzdc1p812FCCBcLmmw4RnwuF+RldHixTdy4UZ17T/hD4OLpWCINl9lUAficC0OFeLJLHxFW6Em8SCbZ3aUtFDIQD8oTqzUHZhGWYF2ukrOc8Dzm4FQ8xy3BhqfntTod1gwoilIirsP/z+GGMnTltkqiqK+gCmkVOfICwNFmHltZeJrmDQ4YU5abR09Yr1TaAk3CzWjV1XGBaf/oek0+tFkMOtZNdFRdlzLLE90PsZZFFnZhFBoNoOhYnMB9K2VqgEpJs0nXvF6qBOllptcpBYUYMzMdb0Ggu6m1d/phxuBuOsm+Xtr0Zw8Xd0vxIOQNDGsskCDIEUYWYajw2i66MmRPRyFEennXfLA0WIPpztXvfsrKjf42rjE3RukBsRff1Sci68cel4fGfmvj2y7gW0Tt
|
||||
before_build:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue