Skip to content

Commit 2be07b5

Browse files
committed
8324491: Keyboard layout didn't keep its state if it was changed when dialog was active
Reviewed-by: aivanov, azvegint
1 parent f37f64d commit 2be07b5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -319,6 +319,10 @@ public void activate() {
319319
isLastFocussedActiveClient = isAc;
320320
}
321321
isActive = true;
322+
323+
// Sync currentLocale with the Windows keyboard layout which could be changed
324+
// while the component was inactive.
325+
getLocale();
322326
if (currentLocale != null) {
323327
setLocale(currentLocale, true);
324328
}

0 commit comments

Comments
 (0)