Commit ce98054 1 parent 43a4e6c commit ce98054 Copy full SHA for ce98054
File tree 1 file changed +10
-1
lines changed
modules/javafx.graphics/src/main/java/com/sun/javafx/scene
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,16 @@ public void removeScene(Scene scene) {
126
126
* Every Scene must call this before the focusOwner changes.
127
127
*/
128
128
public void focusOwnerWillChangeForScene (Scene scene ) {
129
- if (scene == currentEventScene ) {
129
+ /**
130
+ * Calling finishInputMethodComposition is only necessary if there's a
131
+ * node that accepts IM events. But there's a system test that
132
+ * expects finishInputMethodComposition to be called whenever the
133
+ * focusOwner changes. To satisfy this test we call
134
+ * finishInputMethodComposition even if no IM is enabled
135
+ * (so currentEventScene will be null). This will be no-op as far as
136
+ * the OS is concerned.
137
+ */
138
+ if (scene == currentEventScene || currentEventScene == null ) {
130
139
Scene root = rootScene .get ();
131
140
if (root != null ) {
132
141
SceneHelper .finishInputMethodComposition (root );
You can’t perform that action at this time.
0 commit comments