consume Alt events on WinXP in default handler to avoid WindowsRootPaneUI.AltProcessor

This commit is contained in:
Konstantin Bulenkov
2014-01-14 12:55:41 +01:00
parent dde1494031
commit f14aab9809
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -692,6 +692,7 @@ public class IdeEventQueue extends EventQueue {
myDispatchingFocusEvent = e instanceof FocusEvent;
maybeReady();
fixStickyAlt(e);
super.dispatchEvent(e);
}
@@ -705,6 +706,13 @@ public class IdeEventQueue extends EventQueue {
}
}
//IDEA-17359
private static void fixStickyAlt(AWTEvent e) {
if (SystemInfo.isWindowsXP && e instanceof KeyEvent && ((KeyEvent)e).getKeyCode() == KeyEvent.VK_ALT) {
((KeyEvent)e).consume();
}
}
public boolean isDispatchingFocusEvent() {
return myDispatchingFocusEvent;
}