diff --git a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java --- a/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java +++ b/modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java @@ -229,6 +229,7 @@ WinAccessible() { this.peer = _createGlassAccessible(); + System.err.println("WinAccessible: peer = " + this.peer); if (this.peer == 0L) { throw new RuntimeException("could not create platform accessible"); } @@ -255,6 +256,7 @@ @Override public void sendNotification(AccessibleAttribute notification) { + System.err.println("WinAccessible.sendNotification(): notification = " + notification); if (isDisposed()) return; switch (notification) { @@ -391,6 +393,7 @@ case PARENT: break; default: + System.err.println("WinAccessible.sendNotification(): calling UiaRaiseAutomationEvent"); UiaRaiseAutomationEvent(peer, UIA_AutomationPropertyChangedEventId); } } @@ -930,6 +933,7 @@ /* special case for the tree item hierarchy, as expected by Windows */ boolean treeCell = role == AccessibleRole.TREE_ITEM; Node node = null; + System.err.println("Navigate: direction = " + direction); switch (direction) { case NavigateDirection_Parent: { /* Return null for the top level node */ diff --git a/modules/graphics/src/main/java/javafx/scene/Node.java b/modules/graphics/src/main/java/javafx/scene/Node.java --- a/modules/graphics/src/main/java/javafx/scene/Node.java +++ b/modules/graphics/src/main/java/javafx/scene/Node.java @@ -9677,6 +9677,9 @@ } }); } + System.err.println("Node.getAccessible(): accessible = " + accessible); + Thread.dumpStack(); + System.err.println(""); return accessible; } diff --git a/modules/graphics/src/main/java/javafx/scene/Scene.java b/modules/graphics/src/main/java/javafx/scene/Scene.java --- a/modules/graphics/src/main/java/javafx/scene/Scene.java +++ b/modules/graphics/src/main/java/javafx/scene/Scene.java @@ -6371,6 +6371,9 @@ }); PlatformImpl.accessibilityActiveProperty().set(true); } + System.err.println("Scene.getAccessible(): accessible = " + accessible); + Thread.dumpStack(); + System.err.println(""); return accessible; } } diff --git a/modules/graphics/src/main/native-glass/win/GlassApplication.cpp b/modules/graphics/src/main/native-glass/win/GlassApplication.cpp --- a/modules/graphics/src/main/native-glass/win/GlassApplication.cpp +++ b/modules/graphics/src/main/native-glass/win/GlassApplication.cpp @@ -454,8 +454,12 @@ // The GlassApplication instance may be destroyed in a nested loop. // Note that we leave the WM_QUIT message on the queue but who cares? while (GlassApplication::GetInstance() && ::GetMessage(&msg, NULL, 0, 0) > 0) { + fprintf(stderr, "runLoop: message = 0x%x, HWND = 0x%x\n", msg.message, msg.hwnd); + fflush(stderr); ::TranslateMessage(&msg); ::DispatchMessage(&msg); + fprintf(stderr, "runLoop: message processed\n"); + fflush(stderr); } if (GlassApplication::GetAccessibilityCount() > 0 && !IS_WIN8) { diff --git a/modules/graphics/src/main/native-glass/win/Utils.cpp b/modules/graphics/src/main/native-glass/win/Utils.cpp --- a/modules/graphics/src/main/native-glass/win/Utils.cpp +++ b/modules/graphics/src/main/native-glass/win/Utils.cpp @@ -49,25 +49,26 @@ jboolean CheckAndClearException(JNIEnv* env) { - jthrowable t = env->ExceptionOccurred(); - if (!t) { - return JNI_FALSE; - } - env->ExceptionClear(); - - jclass cls = env->FindClass("com/sun/glass/ui/Application"); - if (env->ExceptionOccurred()) { - env->ExceptionClear(); - return JNI_TRUE; - } - env->CallStaticVoidMethod(cls, javaIDs.Application.reportExceptionMID, t); - if (env->ExceptionOccurred()) { - env->ExceptionClear(); - return JNI_TRUE; - } - env->DeleteLocalRef(cls); - - return JNI_TRUE; +// jthrowable t = env->ExceptionOccurred(); +// if (!t) { +// return JNI_FALSE; +// } +// env->ExceptionClear(); +// +// jclass cls = env->FindClass("com/sun/glass/ui/Application"); +// if (env->ExceptionOccurred()) { +// env->ExceptionClear(); +// return JNI_TRUE; +// } +// env->CallStaticVoidMethod(cls, javaIDs.Application.reportExceptionMID, t); +// if (env->ExceptionOccurred()) { +// env->ExceptionClear(); +// return JNI_TRUE; +// } +// env->DeleteLocalRef(cls); +// +// return JNI_TRUE; + return JNI_FALSE; } jint GetModifiers() diff --git a/modules/graphics/src/main/native-glass/win/ViewContainer.cpp b/modules/graphics/src/main/native-glass/win/ViewContainer.cpp --- a/modules/graphics/src/main/native-glass/win/ViewContainer.cpp +++ b/modules/graphics/src/main/native-glass/win/ViewContainer.cpp @@ -239,10 +239,14 @@ LRESULT lr = NULL; if (static_cast(lParam) == static_cast(UiaRootObjectId)) { + fprintf(stderr, "lParam is UiaRootObjectId\n"); + fflush(stderr); /* The client is requesting UI Automation. */ JNIEnv* env = GetEnv(); if (!env) return NULL; jlong pProvider = env->CallLongMethod(GetView(), javaIDs.View.getAccessible); + fprintf(stderr, "getAccessible = 0x%p\n", pProvider); + fflush(stderr); CheckAndClearException(env); /* It is possible WM_GETOBJECT is sent before the toolkit is ready to @@ -256,6 +260,8 @@ } } else if (static_cast(lParam) == static_cast(OBJID_CLIENT)) { + fprintf(stderr, "lParam is OBJID_CLIENT\n"); + fflush(stderr); /* By default JAWS does not send WM_GETOBJECT with UiaRootObjectId till * a focus event is raised by UiaRaiseAutomationEvent(). * In some systems (i.e. touch monitors), OBJID_CLIENT are sent when @@ -278,7 +284,9 @@ * bridge is that it does not respect * ProviderOptions_UseComThreading. */ + jlong pProvider = env->CallLongMethod(GetView(), javaIDs.View.getAccessible); + fprintf(stderr, "getAccessible = 0x%p\n", pProvider); CheckAndClearException(env); } }