From f14aab9809cc7be49f52d8f9689545e58b3d7235 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 14 Jan 2014 12:53:49 +0100 Subject: [PATCH] consume Alt events on WinXP in default handler to avoid WindowsRootPaneUI.AltProcessor --- .../src/com/intellij/ide/IdeEventQueue.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java index 9e67590713ef..a7f8d1e90c60 100644 --- a/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java +++ b/platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java @@ -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; }