changeset 9254:63110df3f288

8132897: ComboBox hangs on Windows 10 when clicked while not in focus Reviewed-by: ptbrunet, ckyang
author kcr
date Thu, 17 Sep 2015 13:58:55 -0700
parents 73c9533410b0
children 60da505acaea
files modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Tue Sep 15 14:35:49 2015 -0400
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java	Thu Sep 17 13:58:55 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -945,10 +945,11 @@
                 } else {
                     node = (Node)getAttribute(PARENT);
                     if (node == null) {
-                        /* scene root node case */
+                        /* This is the root node of the scene or the scene itself */
                         Scene scene = (Scene)getAttribute(SCENE);
                         WinAccessible acc = (WinAccessible)getAccessible(scene);
-                        if (acc == null || acc.isDisposed()) return 0L;
+                        /* Return 0 if we are already at the scene or if scene is null */
+                        if (acc == null || acc == this || acc.isDisposed()) return 0L;
                         return acc.getNativeAccessible();
                     }
                 }