mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-08 01:21:42 +01:00
JBR-3291 Input of characters using Alt+<NumPad> stopped working on Windows
(cherry picked from commit ba6b9c085e)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
17233c2efc
commit
28730d2071
@@ -79,7 +79,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||
private LinkedList<TypeAheadMarker> typeAheadMarkers = new LinkedList<TypeAheadMarker>();
|
||||
private boolean consumeNextKeyTyped;
|
||||
private Component restoreFocusTo;
|
||||
private Component keyPressedComponent;
|
||||
private WeakReference<Component> lastKeyPressedOrReleasedTarget = NULL_COMPONENT_WR;
|
||||
|
||||
private static boolean fxAppThreadIsDispatchThread;
|
||||
|
||||
@@ -1097,19 +1097,15 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||
if (((AWTEvent) ke).isPosted) {
|
||||
Component focusOwner;
|
||||
if (ke.getID() == KeyEvent.KEY_TYPED) {
|
||||
focusOwner = keyPressedComponent;
|
||||
focusOwner = lastKeyPressedOrReleasedTarget.get();
|
||||
} else {
|
||||
focusOwner = getFocusOwner();
|
||||
if (focusOwner == null) {
|
||||
focusOwner = getFocusedWindow();
|
||||
}
|
||||
lastKeyPressedOrReleasedTarget = new WeakReference<>(focusOwner);
|
||||
}
|
||||
ke.setSource(focusOwner);
|
||||
if (ke.getID() == KeyEvent.KEY_PRESSED) {
|
||||
keyPressedComponent = focusOwner;
|
||||
} else if (ke.getID() == KeyEvent.KEY_RELEASED) {
|
||||
keyPressedComponent = null;
|
||||
}
|
||||
}
|
||||
if (ke.getSource() == null) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user