mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
BUG-2043: Fix for a weird combination of windows messages. [skip ci]
This commit is contained in:
parent
f1d70720a1
commit
3defd0e6c0
1 changed files with 13 additions and 10 deletions
|
@ -512,18 +512,21 @@ namespace GreenshotPlugin.Controls {
|
||||||
/// <param name="m"></param>
|
/// <param name="m"></param>
|
||||||
/// <returns>true if the message was handled</returns>
|
/// <returns>true if the message was handled</returns>
|
||||||
public static bool HandleMessages(ref Message m) {
|
public static bool HandleMessages(ref Message m) {
|
||||||
if (m.Msg == WM_HOTKEY) {
|
if (m.Msg != WM_HOTKEY)
|
||||||
// Call handler
|
{
|
||||||
if (IsWindows7OrOlder) {
|
return false;
|
||||||
KeyHandlers[(int)m.WParam]();
|
}
|
||||||
} else {
|
// Call handler
|
||||||
if (EventDelay.Check()) {
|
if (!IsWindows7OrOlder && !EventDelay.Check())
|
||||||
KeyHandlers[(int)m.WParam]();
|
{
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
HotKeyHandler handler;
|
||||||
|
if (KeyHandlers.TryGetValue((int)m.WParam, out handler))
|
||||||
|
{
|
||||||
|
handler();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetKeyName(Keys givenKey) {
|
public static string GetKeyName(Keys givenKey) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue