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;
|
||||
}
|
||||
base.WndProc(ref m);
|
||||
// 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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue