File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/java.desktop/windows/native/libawt/windows Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1999, 2023 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1999, 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
@@ -126,9 +126,15 @@ BOOL DWMIsCompositionEnabled() {
126126 dwmIsCompositionEnabled = bRes;
127127
128128 JNIEnv *env = (JNIEnv *)JNU_GetEnv (jvm, JNI_VERSION_1_2);
129- JNU_CallStaticMethodByName (env, NULL ,
129+ jboolean hasException;
130+ JNU_CallStaticMethodByName (env, &hasException,
130131 " sun/awt/Win32GraphicsEnvironment" ,
131132 " dwmCompositionChanged" , " (Z)V" , (jboolean)bRes);
133+ if (hasException) {
134+ J2dTraceLn (J2D_TRACE_INFO, " Exception occurred in DWMIsCompositionEnabled" );
135+ env->ExceptionDescribe ();
136+ env->ExceptionClear ();
137+ }
132138 return bRes;
133139}
134140
You can’t perform that action at this time.
0 commit comments