mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
consume Alt events on WinXP in default handler to avoid WindowsRootPaneUI.AltProcessor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user