< prev index next >

modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java

Print this page
rev 9254 : 8132897: ComboBox hangs on Windows 10 when clicked while not in focus
Reviewed-by:

@@ -1,7 +1,7 @@
 /*
- * 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -943,14 +943,15 @@
                         return acc != null ? acc.getNativeAccessible() : 0L;
                     }
                 } 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();
                     }
                 }
                 break;
             }
< prev index next >