Compare commits

...

33 Commits

Author SHA1 Message Date
Vitaly Provodin
880e03dd54 JBR-9855 provide JBR25 with AL2 (glibc 2.26) support 2026-01-24 01:54:54 +04:00
Maxim Kartashev
c246c84e1a JBR-9902 Wayland: support modal dialogs without native modality aid 2026-01-23 16:44:49 +04:00
Maxim Kartashev
c70a979754 JBR-9912 Wayland: humburger menu disappears prematurely 2026-01-23 15:58:50 +04:00
Maxim Kartashev
79aab1b368 JBR-9911 Wayland: window can be moved by accident 2026-01-23 11:30:32 +04:00
Nikita Provotorov
ff979cccfc JBR-9904: Wayland: double shift or double ctrl is not working well after press space or alt key.
Fixing the timestamps of each KeyEvent/MouseEvent/MouseWheelEvent created by WLToolkit.

(cherry picked from commit 4d1f4d9cbd)
2026-01-22 14:59:20 +01:00
Maxim Kartashev
f3dcf6dd51 JBR-9803 Wayland: MOUSE_CLICKED event follows MOUSE_DRAG 2026-01-22 09:59:24 +04:00
Vitaly Provodin
33b1fb1d10 update exclude list on results of 25.0.1_272.54 test runs 2026-01-22 02:03:55 +04:00
Nikita Tsarev
1f3c13d214 JBR-9898 Wayland: Keep clipboard ownership when copying within the same process
This patch makes the WLClipboard not call lostOwnershipNow() when a data
offer is available that was made previously by this clipboard. To do
this, WLClipboard's data sources announce a random cookie string as one
of the supported mime types. This string is then checked for when
receiving a data offer.
2026-01-20 11:06:51 +01:00
Maxim Kartashev
79d45515f3 JBR-9893 Closed and disposed windows leak through WLGraphicsDevice.toplevels 2026-01-20 11:55:47 +04:00
Vitaly Provodin
0578580ddf update exclude list on results of 25.0.1_268.49 test runs 2026-01-16 03:28:23 +04:00
Vitaly Provodin
0bbd7a85f1 JBR-9759 revert OpenJDK changes causing the issue with links in Quick Documentation popup
this commit reverts
8335967: "text-decoration: none" does not work with "A" HTML tags
and
8326734: text-decoration applied to <span> lost when mixed with <u> or <s>
8325620: HTMLReader uses ConvertAction instead of specified CharacterAction for <b>, <i>, <u>
2026-01-16 01:52:50 +04:00
Maxim Kartashev
6892269bc7 JBR-9871 Wayland: undecorated window crashes on close 2026-01-15 09:36:15 +04:00
Maxim Kartashev
0c3cf6deb1 JBR-9875 On wayland modal dialog moves the parent window when dragged
Support for gnome-specific dialog modality is disabled by default.
Use -Dsun.awt.wl.NativeModality=true to enable.
2026-01-14 19:02:14 +04:00
Nikita Tsarev
e95e7e74c6 JBR-9874 Wayland: Add certain XF86 keysyms 2026-01-14 12:47:54 +01:00
Vitaly Provodin
43e9e15a78 update exclude list on results of 25.0.1_266.34 test runs 2026-01-09 01:51:46 +04:00
Vitaly Provodin
07f9c797a0 update exclude list on results of 25.0.1_259.33 test runs 2025-12-27 04:38:16 +04:00
Vladimir Lagunov
7dc3ddd974 JBR-9779 io-over-nio: RandomAccessFile now can open Windows pipes
The WinAPI function `GetFileAttributesW` actually opens a file and immediately closes it. If the file is a named pipe, it triggers a connection to the listener of the pipe. The listener closes the connection also asynchronously.

If the pipe is created with `nMaxInstances=1`, this code does not work:

```java
var path = Path.of("""\\.\pipe\openssh-ssh-agent""")

// `readAttributes` calls `GetFileAttributesW`, it opens the file and then closes it.
if (Files.readAttributes(path, BasicFileAttributes.class).isRegularFile()) {
  // Very probable race condition: the listener of the pipe has already received
  // the request of opening the file triggered by `GetFileAttributesW`
  // but hasn't closed the connection on their side yet.
  Files.newByteChannel(path);  // Fails with ERROR_PIPE_BUSY.
}
```

This revision adds an explicit check if some file looks like a Windows pipe. In these cases `RandomAccessFile` and `FileInputStream` don't call `Files.readAttributes` for the file.
2025-12-22 13:16:30 +01:00
Vladimir Lagunov
a3fdce3eb8 JBR-9779 Refactor: extract common logic for getting nio path in FileInputStream, RandomAccessFile, and FileOutputStream 2025-12-22 13:04:05 +01:00
Vitaly Provodin
c9ff46a1db JBR-9756 take JBR debug symbols from images/symbols 2025-12-18 05:54:46 +04:00
Vladimir Lagunov
f22792bf7e JBR-9797 Enable jbr.java.io.over.nio in JBR 25 2025-12-17 16:23:02 +01:00
Maxim Kartashev
b86151562f JBR-9768 sources/TestNoNULL.java: 'NULL' found in src/hotspot/share/runtime/arguments.cpp at line 3878 2025-12-11 12:09:19 +04:00
Vladimir Dvorak
00dfb2b2ce JBR-9757 DCEVM: Nullify MemberName in MethodHandle for invokevirtual/invokeinterface 2025-12-08 19:31:04 +01:00
Vitaly Provodin
4c46c41847 update exclude list based on the outcomes of agent updates: linux-6.14.0-1015-aws -> linux-6.14.0-1017-aws 2025-12-08 14:26:07 +04:00
Alexander Zvegintsev
16405f4f09 8372756: Mouse additional buttons and horizontal scrolling are broken on XWayland GNOME >= 47 after JDK-8351907
Reviewed-by: prr
(cherry picked from commit db2cd1a4e0)
2025-12-05 19:13:23 +01:00
Maxim Kartashev
9f98448896 JBR-9739 Wayland: AssertionError in WLComponentPeer.moveToOverlap() 2025-12-04 12:44:19 +04:00
Maxim Kartashev
7abc1a541d JBR-9698 Wayland: session auto-detection doesn't work with binary launcher 2025-12-03 17:23:18 +04:00
Maxim Kartashev
de8ea2d81c JBR-9730 Wayland: to add a secondary expression in assertions 2025-12-03 12:57:18 +04:00
Maxim Kartashev
bc737fb03a JBR-9733 Wayland: enable unconstrained popup positioning
Use getRootPane()
.putClientProperty("wlawt.popup_position_unconstrained", Boolean.TRUE)
to enable unconstrained popup positioning.
2025-12-03 12:52:35 +04:00
Maxim Kartashev
f8e0ee5a18 JBR-9728 Wayland: AssertionError in WLGraphicsDevice. 2025-12-03 12:46:19 +04:00
Maxim Kartashev
e956e04e37 JBR-9727 Wayland: assertion error in ShadowImpl.updateSurfaceData 2025-12-02 12:52:33 +04:00
Vitaly Provodin
9cae1177d6 update exclude list on results of 25.0.1_226.20 test runs 2025-12-02 12:47:23 +04:00
Vitaly Provodin
50729485cf fixup! JBR-9713: Mouse back and forth (Button4 / Button 5) no longer works on Linux in the 2025.2.5 version
JBR-9714: Horizontal scroll stopped working after 2025.2.5 update
       JBR-9715: Horizontal touchpad scroll stopped working after 2025.2.5 updateSome adjustments of the test after the code review.

Adding a manual test for mouse back and forth buttons.

(cherry picked from commit 6efade4ca2)
2025-12-01 15:27:03 +01:00
Nikita Provotorov
59055bc850 JBR-9719: Wayland: input methods in Speed search don't work if WLInputMethodZwpTextInputV3 logger is enabled
Resetting the text iterator of each InputMethodEvent after it gets logged.

(cherry picked from commit 3355214b43)
2025-11-28 18:50:30 +01:00
64 changed files with 1232 additions and 1147 deletions

View File

@@ -109,6 +109,12 @@ else
WITH_BUNDLED_FREETYPE=""
fi
if [ "$bundle_type" == "lb" ]; then
WITH_VULKAN=""
else
WITH_VULKAN="--with-vulkan"
fi
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
--with-hotspot-build-time=$BUILD_TIME
--with-copyright-year=$COPYRIGHT_YEAR
@@ -132,6 +138,20 @@ function zip_native_debug_symbols() {
tar --no-recursion --null -T - -czf ../"$jbr_diz_name".tar.gz) || do_exit $?
}
function zip_native_debug_symbols_win() {
image_bundle_path=$(echo $1 | cut -d"/" -f-4)
jdk_name=$(echo $1 | cut -d"/" -f5)
jbr_pdb_name=$2
[ -d "$jbr_pdb_name" ] && rm -rf $jbr_pdb_name
mkdir $jbr_pdb_name
rsync_target="../../../../"$jbr_pdb_name
(cd $image_bundle_path && find . -name '*' -exec rsync -R {} $rsync_target \;)
(/usr/bin/zip -r $jbr_pdb_name.zip $jbr_pdb_name) || do_exit $?
}
function do_exit() {
exit_code=$1
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java

View File

@@ -54,7 +54,7 @@ function do_configure {
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
--with-gtk-shell1-protocol=$GTK_SHELL_PATH \
--with-vulkan \
$WITH_VULKAN \
$DISABLE_WARNINGS_AS_ERRORS \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
@@ -102,7 +102,7 @@ function create_image_bundle {
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
@@ -133,6 +133,11 @@ case "$bundle_type" in
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"lb")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
;;

View File

@@ -50,12 +50,6 @@ function do_configure {
fi
fi
if [ -n "${JCEF_BUILD_LEGACY:-}" ]; then
WITH_VULKAN=""
else
WITH_VULKAN="--with-vulkan"
fi
sh configure \
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
@@ -122,7 +116,7 @@ function create_image_bundle {
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)
@@ -156,6 +150,11 @@ case "$bundle_type" in
jbrsdk_name_postfix="_${bundle_type}"
do_maketest=1
;;
"lb")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
jbrsdk_name_postfix="_${bundle_type}"
@@ -186,7 +185,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
@@ -199,7 +198,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ]|| [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -69,7 +69,7 @@ function create_image_bundle {
mv release "$IMAGES_DIR"/"$__root_dir"/release
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
# jmod does not preserve file permissions (JDK-8173610)

View File

@@ -96,7 +96,7 @@ function create_image_bundle {
mv release $JRE_CONTENTS/Home/release
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/src.zip $JRE_CONTENTS/Home/lib
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
zip_native_debug_symbols $IMAGES_DIR/symbols "${JBR}_diz"
fi
if [ "$bundle_type" == "jcef" ]; then

View File

@@ -80,6 +80,7 @@ function create_image_bundle {
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
zip_native_debug_symbols_win $IMAGES_DIR/symbols "${__root_dir}_pdb"
fi
}

View File

@@ -73,6 +73,7 @@ function create_image_bundle {
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
zip_native_debug_symbols_win $IMAGES_DIR/symbols "${__root_dir}_pdb"
fi
}

View File

@@ -69,6 +69,7 @@ function create_image_bundle {
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
done
copy_jmods "$__modules" "$__modules_path" "$__root_dir"/jmods
zip_native_debug_symbols_win $IMAGES_DIR/symbols "${__root_dir}_pdb"
fi
}

View File

@@ -371,7 +371,24 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
if (MethodHandles::ref_kind_is_method(ref_kind)) {
Method* m = (Method*) java_lang_invoke_MemberName::vmtarget(obj);
if (m != nullptr && m->method_holder()->is_redefining()) {
if (m == Universe::throw_no_such_method_error()) {
// ResolvedMethodTable patches ResolvedMethodName.vmtarget to throw_no_such_method_error() when a method is deleted
oop clazz = java_lang_invoke_MemberName::clazz(obj);
if (clazz != nullptr) {
Klass* k = java_lang_Class::as_Klass(clazz);
if (k != nullptr && (k->is_redefining() || k->new_version() != nullptr)
&& (k->newest_version() != vmClasses::internal_Unsafe_klass()->newest_version())) {
// vmtarget is a throw-sentinel
intptr_t vmindex = java_lang_invoke_MemberName::vmindex(obj);
if (vmindex >= 0) {
// A vtable/itable vmindex can still be cached for invokeVirtual/invokeInterface handles.
// After class redefinition the vtable/itable layout may change and the deleted method is
// no longer at this slot, so we must clear the oop.
return false;
}
}
}
} else if (m != nullptr && m->method_holder()->is_redefining()) {
// Let's try to re-resolve method
InstanceKlass* newest = InstanceKlass::cast(m->method_holder()->newest_version());
Method* new_method = newest->find_method(m->name(), m->signature());

View File

@@ -22,6 +22,10 @@
*
*/
#ifdef __linux
#include <dlfcn.h>
#endif
#include "cds/aotLogging.hpp"
#include "cds/cds_globals.hpp"
#include "cds/cdsConfig.hpp"
@@ -3855,6 +3859,34 @@ void Arguments::set_compact_headers_flags() {
#endif
}
#ifdef __linux
static const char * get_toolkit_name() {
const char * toolkit_name = "XToolkit";
void* libwayland = dlopen(VERSIONED_JNI_LIB_NAME("wayland-client", "0"), RTLD_LAZY | RTLD_LOCAL);
if (!libwayland) {
// Fallback to any development version available on the system
libwayland = dlopen(JNI_LIB_NAME("wayland-client"), RTLD_LAZY | RTLD_LOCAL);
}
if (libwayland) {
typedef void* (*wl_display_connect_t)(const char*);
typedef void (*wl_display_disconnect_t)(void*);
wl_display_connect_t fp_wl_display_connect = (wl_display_connect_t) dlsym(libwayland, "wl_display_connect");
wl_display_disconnect_t fp_wl_display_disconnect = (wl_display_disconnect_t) dlsym(libwayland, "wl_display_disconnect");
if (fp_wl_display_connect && fp_wl_display_disconnect) {
void* display = fp_wl_display_connect(nullptr);
if (display) {
toolkit_name = "WLToolkit";
fp_wl_display_disconnect(display);
}
}
dlclose(libwayland);
}
return toolkit_name;
}
#endif
jint Arguments::apply_ergo() {
// Set flags based on ergonomics.
jint result = set_ergonomics_flags();
@@ -3925,6 +3957,17 @@ jint Arguments::apply_ergo() {
FLAG_SET_DEFAULT(BytecodeVerificationRemote, true);
}
#ifdef __linux
// Replace -Dawt.toolkit.name=auto with either XToolkit (the default) or
// WLToolkit, if we are able to connect to the Wayland server.
const char* toolkit_name = PropertyList_get_value(_system_properties, "awt.toolkit.name");
if (toolkit_name && strcmp(toolkit_name, "auto") == 0) {
const char* toolkit_name = get_toolkit_name();
PropertyList_unique_add(&_system_properties, "awt.toolkit.name", toolkit_name,
AddProperty, WriteableProperty, ExternalProperty);
}
#endif
#ifndef PRODUCT
if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
if (use_vm_log()) {

View File

@@ -40,7 +40,7 @@ public class IoOverNio {
*/
public static final Debug DEBUG;
public static final boolean IS_ENABLED_IN_GENERAL =
System.getProperty("jbr.java.io.use.nio", "false").equalsIgnoreCase("true");
System.getProperty("jbr.java.io.use.nio", "true").equalsIgnoreCase("true");
private static final ThreadLocal<Integer> ALLOW_IN_THIS_THREAD = new ThreadLocal<>();
static {

View File

@@ -28,7 +28,6 @@ package java.io;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.Arrays;
@@ -158,25 +157,11 @@ public class FileInputStream extends InputStream
try (var guard = IoOverNio.RecursionGuard.create(FileInputStream.class)) {
IoOverNio.blackhole(guard);
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
Path nioPath = null;
if (nioFs != null && path != null) {
try {
nioPath = nioFs.getPath(path);
isRegularFile = Files.isRegularFile(nioPath);
} catch (InvalidPathException _) {
// Nothing.
}
}
// Two significant differences between the legacy java.io and java.nio.files:
// * java.nio.file allows to open directories as streams, java.io.FileInputStream doesn't.
// * java.nio.file doesn't work well with pseudo devices, i.e., `seek()` fails, while java.io works well.
useNio = nioPath != null && isRegularFile == Boolean.TRUE;
Path nioPath = IoOverNioFileSystem.getNioPath(file, true);
useNio = nioPath != null;
if (useNio) {
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
this, nioFs, file, nioPath, Set.of(StandardOpenOption.READ), channelCleanable);
this, nioPath.getFileSystem(), file, nioPath, Set.of(StandardOpenOption.READ), channelCleanable);
channel = bundle.channel();
fd = bundle.fd();
externalChannelHolder = bundle.externalChannelHolder();

View File

@@ -227,11 +227,10 @@ public class FileOutputStream extends OutputStream
try (var guard = IoOverNio.RecursionGuard.create(FileOutputStream.class)) {
IoOverNio.blackhole(guard);
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
useNio = path != null && nioFs != null;
Path nioPath = IoOverNioFileSystem.getNioPath(file, false);
useNio = nioPath != null;
if (useNio) {
Path nioPath = nioFs.getPath(path);
java.nio.file.FileSystem nioFs = nioPath.getFileSystem();
// java.io backend doesn't open DOS hidden files for writing, but java.nio.file opens.
// This code mimics the old behavior.
if (nioFs.getSeparator().equals("\\")) {

View File

@@ -41,6 +41,7 @@ import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.LinkOption;
import java.nio.file.NoSuchFileException;
import java.nio.file.OpenOption;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
@@ -58,6 +59,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
@@ -123,6 +125,69 @@ class IoOverNioFileSystem extends FileSystem {
return result;
}
static Path getNioPath(File file, boolean mustBeRegularFile) {
String path = file.getPath();
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
if (nioFs == null) {
return null;
}
Path nioPath;
try {
nioPath = nioFs.getPath(path);
} catch (InvalidPathException _) {
return null;
}
if (!mustBeRegularFile) {
return nioPath;
}
if (isWindowsPipe(nioPath)) {
// https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea see nMaxInstances:
//
// Getting file attributes in this case is dangerous.
// GetFileAttributesW acquires a connection to the pipe internally,
// occupying a place on the server side.
// The server and the client are very likely two different processes, and it takes time to deliver
// the connection closing message to the server.
// If the caller invokes CreateFileW fast enough after GetFileAttributesW and nMaxInstances = 1,
// CreateFileW is called before the server closes the previous connection created by GetFileAttributesW
// and ERROR_PIPE_BUSY is returned.
//
// Anyway, `readAttributes(nioPath).isRegularFile()` returns true for pipes, so it's safe to return here.
return nioPath;
}
// Two significant differences between the legacy java.io and java.nio.files:
// * java.nio.file allows to open directories as streams, java.io.FileInputStream doesn't.
// * java.nio.file doesn't work well with pseudo devices, i.e., `seek()` fails, while java.io works well.
try {
if (Files.readAttributes(nioPath, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS).isRegularFile()) {
return nioPath;
}
} catch (NoSuchFileException _) {
return nioPath;
} catch (IOException _) {
// Ignored.
}
return null;
}
/**
* <a href="https://learn.microsoft.com/en-us/windows/win32/ipc/pipe-names">
* The pipe path format: {@code ^\\(\w+|\.)\pipe\.*}
* </a>
*/
private static boolean isWindowsPipe(Path path) {
// A small JMH benchmark shows that this code takes less than a microsecond,
// and the JIT compiler does its job very well here.
return path.isAbsolute() &&
path.getRoot().toString().startsWith("\\\\") &&
path.getRoot().toString().toLowerCase(Locale.getDefault()).endsWith("\\pipe\\");
}
private static boolean setPermission0(java.nio.file.FileSystem nioFs, File f, int access, boolean enable, boolean owneronly) {
if (f.getPath().isEmpty()) {
if (nioFs.getSeparator().equals("\\")) {

View File

@@ -27,16 +27,11 @@ package java.io;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.NonWritableChannelException;
import java.nio.file.FileSystem;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.LinkOption;
import java.nio.file.NoSuchFileException;
import java.nio.file.OpenOption;
import java.nio.file.Path;
import java.nio.channels.NonWritableChannelException;
import java.nio.file.OpenOption;
import java.nio.file.StandardOpenOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Arrays;
import java.util.HashSet;
@@ -281,35 +276,11 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
try (var guard = IoOverNio.RecursionGuard.create(RandomAccessFile.class)) {
IoOverNio.blackhole(guard);
FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
Path nioPath = null;
if (nioFs != null) {
try {
nioPath = nioFs.getPath(path);
} catch (InvalidPathException _) {
// Nothing.
}
}
// Two significant differences between the legacy java.io and java.nio.files:
// * java.nio.file allows to open directories as streams, java.io.FileInputStream doesn't.
// * java.nio.file doesn't work well with pseudo devices, i.e., `seek()` fails, while java.io works well.
boolean isRegularFile;
try {
isRegularFile = nioPath != null &&
Files.readAttributes(nioPath, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS).isRegularFile();
}
catch (NoSuchFileException _) {
isRegularFile = true;
}
catch (IOException _) {
isRegularFile = false;
}
useNio = nioPath != null && isRegularFile;
Path nioPath = IoOverNioFileSystem.getNioPath(file, true);
useNio = nioPath != null;
if (useNio) {
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
this, nioFs, file, nioPath, optionsForChannel(imode), channelCleanable);
this, nioPath.getFileSystem(), file, nioPath, optionsForChannel(imode), channelCleanable);
channel = bundle.channel();
fd = bundle.fd();
externalChannelHolder = bundle.externalChannelHolder();

View File

@@ -850,22 +850,6 @@ public class CSS implements Serializable {
return r != null ? r : conv.parseCssValue(key.getDefaultValue());
}
static Object mergeTextDecoration(String value) {
if (value.startsWith("none")) {
return null;
}
boolean underline = value.contains("underline");
boolean strikeThrough = value.contains("line-through");
if (!underline && !strikeThrough) {
return null;
}
String newValue = underline && strikeThrough
? "underline,line-through"
: (underline ? "underline" : "line-through");
return new StringValue().parseCssValue(newValue);
}
/**
* Maps from a StyleConstants to a CSS Attribute.
*/

View File

@@ -2506,7 +2506,7 @@ public class HTMLDocument extends DefaultStyledDocument {
tagMap.put(HTML.Tag.SCRIPT, ha);
tagMap.put(HTML.Tag.SELECT, fa);
tagMap.put(HTML.Tag.SMALL, ca);
tagMap.put(HTML.Tag.SPAN, new ConvertSpanAction());
tagMap.put(HTML.Tag.SPAN, ca);
tagMap.put(HTML.Tag.STRIKE, conv);
tagMap.put(HTML.Tag.S, conv);
tagMap.put(HTML.Tag.STRONG, ca);
@@ -3430,43 +3430,11 @@ public class HTMLDocument extends DefaultStyledDocument {
if (styleAttributes != null) {
charAttr.addAttributes(styleAttributes);
}
convertAttributes(t, attr);
}
public void end(HTML.Tag t) {
popCharacterStyle();
}
/**
* Converts HTML tags to CSS attributes.
* @param t the current HTML tag
* @param attr the attributes of the HTML tag
*/
void convertAttributes(HTML.Tag t, MutableAttributeSet attr) {
}
}
final class ConvertSpanAction extends CharacterAction {
@Override
void convertAttributes(HTML.Tag t, MutableAttributeSet attr) {
Object newDecoration = attr.getAttribute(CSS.Attribute.TEXT_DECORATION);
Object previousDecoration =
charAttrStack.peek()
.getAttribute(CSS.Attribute.TEXT_DECORATION);
if (newDecoration != null
&& !"none".equals(newDecoration.toString())
&& previousDecoration != null
&& !"none".equals(previousDecoration.toString())) {
StyleSheet sheet = getStyleSheet();
sheet.addCSSAttribute(charAttr,
CSS.Attribute.TEXT_DECORATION,
CSS.mergeTextDecoration(newDecoration + ","
+ previousDecoration)
.toString());
}
}
}
/**
@@ -3474,9 +3442,35 @@ public class HTMLDocument extends DefaultStyledDocument {
* mappings that have a corresponding StyleConstants
* and CSS mapping. The conversion is to CSS attributes.
*/
final class ConvertAction extends CharacterAction {
@Override
void convertAttributes(HTML.Tag t, MutableAttributeSet attr) {
class ConvertAction extends TagAction {
public void start(HTML.Tag t, MutableAttributeSet attr) {
pushCharacterStyle();
if (!foundInsertTag) {
// Note that the third argument should really be based off
// inParagraph and impliedP. If we're wrong (that is
// insertTagDepthDelta shouldn't be changed), we'll end up
// removing an extra EndSpec, which won't matter anyway.
boolean insert = canInsertTag(t, attr, false);
if (foundInsertTag) {
if (!inParagraph) {
inParagraph = impliedP = true;
}
}
if (!insert) {
return;
}
}
if (attr.isDefined(IMPLIED)) {
attr.removeAttribute(IMPLIED);
}
if (styleAttributes != null) {
charAttr.addAttributes(styleAttributes);
}
// We also need to add attr, otherwise we lose custom
// attributes, including class/id for style lookups, and
// further confuse style lookup (doesn't have tag).
charAttr.addAttribute(t, attr.copyAttributes());
StyleSheet sheet = getStyleSheet();
if (t == HTML.Tag.B) {
sheet.addCSSAttribute(charAttr, CSS.Attribute.FONT_WEIGHT, "bold");
@@ -3517,6 +3511,11 @@ public class HTMLDocument extends DefaultStyledDocument {
}
}
}
public void end(HTML.Tag t) {
popCharacterStyle();
}
}
class AnchorAction extends CharacterAction {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2018, 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
@@ -24,16 +24,9 @@
*/
package javax.swing.text.html;
import javax.swing.text.*;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.swing.text.AttributeSet;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.SimpleAttributeSet;
import java.util.*;
/**
* An implementation of <code>AttributeSet</code> that can multiplex
@@ -203,24 +196,15 @@ class MuxingAttributeSet implements AttributeSet, Serializable {
* @see AttributeSet#getAttribute
*/
public Object getAttribute(Object key) {
final AttributeSet[] as = getAttributes();
final int n = as.length;
if (key != CSS.Attribute.TEXT_DECORATION) {
for (int i = 0; i < n; i++) {
Object o = as[i].getAttribute(key);
if (o != null) {
return o;
}
AttributeSet[] as = getAttributes();
int n = as.length;
for (int i = 0; i < n; i++) {
Object o = as[i].getAttribute(key);
if (o != null) {
return o;
}
return null;
}
String values = Arrays.stream(as)
.map(a -> a.getAttribute(key))
.filter(Objects::nonNull)
.map(Object::toString)
.collect(Collectors.joining(","));
return CSS.mergeTextDecoration(values);
return null;
}
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, 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
@@ -24,53 +24,17 @@
*/
package javax.swing.text.html;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.Serializable;
import java.io.StringReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.EmptyStackException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.Vector;
import sun.swing.SwingUtilities2;
import java.util.*;
import java.awt.*;
import java.io.*;
import java.net.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.UIManager;
import javax.swing.border.BevelBorder;
import javax.swing.border.Border;
import javax.swing.border.*;
import javax.swing.event.ChangeListener;
import javax.swing.text.AttributeSet;
import javax.swing.text.Document;
import javax.swing.text.Element;
import javax.swing.text.MutableAttributeSet;
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.Style;
import javax.swing.text.StyleConstants;
import javax.swing.text.StyleContext;
import javax.swing.text.StyledDocument;
import javax.swing.text.View;
import sun.swing.SwingUtilities2;
import javax.swing.text.*;
/**
* Support for defining the visual characteristics of
@@ -2856,31 +2820,10 @@ public class StyleSheet extends StyleContext {
return doGetAttribute(key);
}
/**
* Merges the current value of the 'text-decoration' property
* with the value from parent.
*/
private Object getTextDecoration(Object value) {
AttributeSet parent = getResolveParent();
if (parent == null) {
return value;
}
Object parentValue = parent.getAttribute(CSS.Attribute.TEXT_DECORATION);
return parentValue == null
? value
: CSS.mergeTextDecoration(value + "," + parentValue);
}
Object doGetAttribute(Object key) {
Object retValue = super.getAttribute(key);
if (retValue != null) {
if (key != CSS.Attribute.TEXT_DECORATION) {
return retValue;
} else {
// Merge current value with parent
return getTextDecoration(retValue);
}
return retValue;
}
if (key == CSS.Attribute.FONT_SIZE) {

View File

@@ -147,8 +147,6 @@ import sun.awt.X11GraphicsDevice;
import sun.awt.X11GraphicsEnvironment;
import sun.awt.XSettings;
import sun.awt.datatransfer.DataTransferer;
import sun.awt.screencast.ScreencastHelper;
import sun.awt.screencast.XdgDesktopPortal;
import sun.awt.util.PerformanceLogger;
import sun.awt.util.ThreadGroupUtils;
import sun.font.FontConfigManager;
@@ -1944,27 +1942,17 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
awtLock();
try {
if (numberOfButtons == 0) {
// The commented-out code is introduced in 8351907 and causes inability to use
// any mouse extra buttons under XWayland GNOME of version >= 47,
// thus causing JBR-9713, JBR-9714, JBR-9715.
// Please don't enable it back until a proper fix appears in OpenJDK.
//
//if (XdgDesktopPortal.isRemoteDesktop()
// && ScreencastHelper.isAvailable()) {
// numberOfButtons = 3;
//} else {
numberOfButtons = getNumberOfButtonsImpl();
numberOfButtons = (numberOfButtons > MAX_BUTTONS_SUPPORTED) ? MAX_BUTTONS_SUPPORTED : numberOfButtons;
//4th and 5th buttons are for wheel and shouldn't be reported as buttons.
//If we have more than 3 physical buttons and a wheel, we report N-2 buttons.
//If we have 3 physical buttons and a wheel, we report 3 buttons.
//If we have 1,2,3 physical buttons, we report it as is i.e. 1,2 or 3 respectively.
if (numberOfButtons >= 5) {
numberOfButtons -= 2;
} else if (numberOfButtons == 4 || numberOfButtons == 5) {
numberOfButtons = 3;
}
//}
numberOfButtons = getNumberOfButtonsImpl();
numberOfButtons = (numberOfButtons > MAX_BUTTONS_SUPPORTED) ? MAX_BUTTONS_SUPPORTED : numberOfButtons;
//4th and 5th buttons are for wheel and shouldn't be reported as buttons.
//If we have more than 3 physical buttons and a wheel, we report N-2 buttons.
//If we have 3 physical buttons and a wheel, we report 3 buttons.
//If we have 1,2,3 physical buttons, we report it as is i.e. 1,2 or 3 respectively.
if (numberOfButtons >= 5) {
numberOfButtons -= 2;
} else if (numberOfButtons == 4 || numberOfButtons == 5) {
numberOfButtons = 3;
}
}
//Assume don't have to re-query the number again and again.
return numberOfButtons;

View File

@@ -164,7 +164,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
@Override
public void paint(Graphics g) {
assert isRepaintNeeded();
assert isRepaintNeeded() : "paint() called when no repaint needed";
int width = peer.getWidth();
int height = peer.getHeight();
@@ -196,7 +196,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
}
private boolean isSignificantDrag(Point p) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
Objects.requireNonNull(p);
return pressedLocation != null && isSignificantDragDistance(pressedLocation, p);
@@ -208,7 +208,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
@Override
boolean processMouseEvent(MouseEvent e) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (super.processMouseEvent(e)) return true;
@@ -245,7 +245,10 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
}
if (e.getID() == MouseEvent.MOUSE_PRESSED) {
pressedLocation = point;
} else if (e.getID() == MouseEvent.MOUSE_DRAGGED && pressedInDragStartArea(point) && isSignificantDrag(point)) {
} else if (e.getID() == MouseEvent.MOUSE_DRAGGED
&& pressedLocation != null
&& pressedInDragStartArea(pressedLocation)
&& isSignificantDrag(point)) {
startDrag();
} else if (e.getID() == MouseEvent.MOUSE_CLICKED && e.getClickCount() == 2 && pressedInDragStartArea(point)
&& peer.isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
@@ -326,7 +329,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
}
private boolean processMouseEvent(MouseEvent e) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
Rectangle buttonBounds = bounds.get();
boolean ourLocation = buttonBounds != null && e.getID() != MouseEvent.MOUSE_EXITED &&

View File

@@ -68,7 +68,7 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
public GtkFrameDecoration(WLDecoratedPeer peer, boolean showMinimize, boolean showMaximize) {
super(peer, showMinimize, showMaximize);
nativePtr = nativeCreateDecoration(showMinimize, showMaximize, isDarkTheme());
assert nativePtr != 0;
assert nativePtr != 0 : "Failed to create the native part of the decoration";
int t = nativeGetIntProperty(nativePtr, "gtk-dnd-drag-threshold");
dndThreshold = t > 0 ? t : 4;
}
@@ -87,8 +87,8 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
int width = peer.getWidth();
int height = titleBarHeight;
assert width >= titleBarMinWidth;
assert peer.getHeight() >= titleBarHeight;
assert width >= titleBarMinWidth : "The frame width is too small to display the title bar";
assert peer.getHeight() >= titleBarHeight : "The frame height is too small to display the title bar";
double scale = ((WLGraphicsConfig) peer.getGraphicsConfiguration()).getEffectiveScale();
g2d.setBackground(new Color(0, true));

View File

@@ -96,7 +96,7 @@ public class ServerSideFrameDecoration extends FrameDecoration {
@Override
public void dispose() {
// Native resources must have been already disposed when the window was hidden
assert nativeDecorPtr == 0;
assert nativeDecorPtr == 0 : "Native resources must have been already disposed";
}
private native long createToplevelDecorationImpl(long nativeFramePtr);

View File

@@ -34,6 +34,7 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.UUID;
public final class WLClipboard extends SunClipboard {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.wl.WLClipboard");
@@ -61,6 +62,10 @@ public final class WLClipboard extends SunClipboard {
// Guarded by dataLock.
private WLDataSource ourDataSource;
// Set when announcing a clipboard data source to a random value
// Guarded by dataLock.
private String ourDataSourceCookie = null;
static {
flavorTable = DataTransferer.adaptFlavorMap(getDefaultFlavorTable());
}
@@ -77,6 +82,10 @@ public final class WLClipboard extends SunClipboard {
}
}
private static String generateRandomMimeTypeCookie() {
return "JAVA_DATATRANSFER_COOKIE_" + UUID.randomUUID();
}
private int getProtocol() {
if (isPrimary) {
return WLDataDevice.DATA_TRANSFER_PROTOCOL_PRIMARY_SELECTION;
@@ -146,14 +155,26 @@ public final class WLClipboard extends SunClipboard {
log.fine("Clipboard: Offering new contents (" + contents + ")");
}
WLDataSource newOffer = null;
newOffer = new WLDataSource(dataDevice, getProtocol(), contents);
WLDataSource newOffer = new WLDataSource(dataDevice, getProtocol(), contents) {
@Override
protected void handleCancelled() {
synchronized (dataLock) {
if (ourDataSource == this) {
ourDataSource = null;
ourDataSourceCookie = null;
}
destroy();
}
}
};
synchronized (dataLock) {
if (ourDataSource != null) {
ourDataSource.destroy();
}
ourDataSource = newOffer;
ourDataSourceCookie = generateRandomMimeTypeCookie();
ourDataSource.offerExtraMime(ourDataSourceCookie);
dataDevice.setSelection(getProtocol(), newOffer, eventSerial);
}
}
@@ -240,9 +261,11 @@ public final class WLClipboard extends SunClipboard {
}
void handleClipboardOffer(WLDataOffer offer /* nullable */) {
lostOwnershipNow(null);
synchronized (dataLock) {
if (offer == null || ourDataSourceCookie == null || !offer.getMimes().contains(ourDataSourceCookie)) {
lostOwnershipNow(null);
}
if (clipboardDataOfferedToUs != null) {
clipboardDataOfferedToUs.destroy();
}

View File

@@ -88,6 +88,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.wl.focus.WLComponentPeer");
private static final PlatformLogger popupLog = PlatformLogger.getLogger("sun.awt.wl.popup.WLComponentPeer");
public static final String POPUP_POSITION_UNCONSTRAINED_CLIENT_PROPERTY = "wlawt.popup_position_unconstrained";
protected static final int MINIMUM_WIDTH = 1;
protected static final int MINIMUM_HEIGHT = 1;
@@ -114,6 +116,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
private boolean resizePending = false; // protected by stateLock
private static final boolean shadowEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.wl.Shadow", "true"));
private static final boolean nativeModalityEnabled = Boolean.parseBoolean(
System.getProperty("sun.awt.wl.NativeModality", "false"));
static {
initIDs();
@@ -307,18 +311,18 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
static void moveToOverlap(Rectangle what, Rectangle where) {
if (what.getMaxX() <= where.getMinX()) {
what.x += where.getMaxX() - what.getMaxX();
what.x += where.getMaxX() - what.getMaxX() + 1;
}
if (what.getMinX() >= where.getMaxX()) {
what.x -= what.getMinX() - where.getMaxX();
what.x -= what.getMinX() - where.getMaxX() + 1;
}
if (what.getMaxY() <= where.getMinY()) {
what.y += where.getMaxY() - what.getMaxY();
what.y += where.getMaxY() - what.getMaxY() + 1;
}
if (what.getMinY() >= where.getMaxY()) {
what.y -= what.getMinY() - where.getMaxY();
what.y -= what.getMinY() - where.getMaxY() + 1;
}
assert what.intersects(where);
assert what.intersects(where) : String.format("Failed to move %s to overlap %s", what, where);
}
Point nativeLocationForPopup(Window popup, Component popupParent, Window toplevel) {
@@ -351,6 +355,18 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
return popupBounds.getLocation();
}
private boolean isPopupPositionUnconstrained() {
if (SunToolkit.isInstanceOf(target, "javax.swing.RootPaneContainer")) {
javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer) target).getRootPane();
Object prop = rootpane.getClientProperty(POPUP_POSITION_UNCONSTRAINED_CLIENT_PROPERTY);
if (prop instanceof Boolean booleanProp) {
return booleanProp;
}
}
return false;
}
protected void wlSetVisible(boolean v) {
// TODO: this whole method should be moved to WLWindowPeer
synchronized (getStateLock()) {
@@ -370,9 +386,10 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
: Frame.NORMAL;
boolean isMaximized = (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH;
boolean isMinimized = (state & Frame.ICONIFIED) == Frame.ICONIFIED;
boolean isUnconstrained = isPopupPositionUnconstrained();
performLocked(() -> {
assert wlSurface == null;
assert wlSurface == null : "Invisible window already has a Wayland surface attached";
wlSurface = new WLMainSurface((WLWindowPeer) this);
long wlSurfacePtr = wlSurface.getWlSurfacePtr();
if (isWlPopup) {
@@ -381,7 +398,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
Window toplevel = getToplevelFor(popupParent);
Point nativeLocation = nativeLocationForPopup(popup, popupParent, toplevel);
nativeCreatePopup(nativePtr, getNativePtrFor(toplevel), wlSurfacePtr,
thisWidth, thisHeight, nativeLocation.x, nativeLocation.y);
thisWidth, thisHeight, nativeLocation.x, nativeLocation.y, isUnconstrained);
} else {
nativeCreateWindow(nativePtr, getParentNativePtr(target), wlSurfacePtr,
isModal, isMaximized, isMinimized, title, WLToolkit.getApplicationID());
@@ -442,16 +459,21 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
private boolean targetIsModal() {
return target instanceof Dialog dialog
&& (dialog.getModalityType() == Dialog.ModalityType.APPLICATION_MODAL
|| dialog.getModalityType() == Dialog.ModalityType.TOOLKIT_MODAL);
if (nativeModalityEnabled) {
return target instanceof Dialog dialog
&& (dialog.getModalityType() == Dialog.ModalityType.APPLICATION_MODAL
|| dialog.getModalityType() == Dialog.ModalityType.TOOLKIT_MODAL);
}
return false;
}
void updateSurfaceData() {
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
getGraphicsConfiguration(), getBufferWidth(), getBufferHeight(), getDisplayScale());
performLocked(() -> {
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
getGraphicsConfiguration(), getBufferWidth(), getBufferHeight(), getDisplayScale());
shadow.updateSurfaceData();
shadow.updateSurfaceData();
});
}
public boolean isResizable() {
@@ -460,7 +482,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
@Override
public void updateSurfaceSize() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
// Note: must be called after a buffer of proper size has been attached to the surface,
// but the surface has not yet been committed. Otherwise, the sizes will get out of sync,
// which may result in visual artifacts.
@@ -498,7 +520,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
final Component popupParent = AWTAccessor.getWindowAccessor().getPopupParent(popup);
final Window toplevel = getToplevelFor(popupParent);
Point nativeLocation = nativeLocationForPopup(popup, popupParent, toplevel);
nativeRepositionWLPopup(nativePtr, surfaceWidth, surfaceHeight, nativeLocation.x, nativeLocation.y);
boolean isUnconstrained = isPopupPositionUnconstrained();
nativeRepositionWLPopup(nativePtr, surfaceWidth, surfaceHeight, nativeLocation.x, nativeLocation.y, isUnconstrained);
}
}
@@ -892,7 +915,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
// a button press, key press, or touch down event."
// So 'serial' must appertain to such an event.
assert serial != 0;
assert serial != 0 : "The serial number of the event requesting the window menu must be non-zero";
int xNative = javaUnitsToSurfaceUnits(x);
int yNative = javaUnitsToSurfaceUnits(y);
@@ -952,7 +975,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
WLToolkit.targetDisposedPeer(target, this);
performLocked(() -> {
assert !isVisible();
assert !isVisible() : "Disposed window must have been already hidden";
nativeDisposeFrame(nativePtr);
nativePtr = 0;
@@ -1065,10 +1088,11 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
log.fine(String.format("%s is updating buffer to %dx%d pixels", this, getBufferWidth(), getBufferHeight()));
}
}
updateSurfaceData();
postPaintEvent();
}
updateSurfaceData();
postPaintEvent();
// Not sure what would need to have changed in Wayland's graphics configuration
// to warrant destroying the peer and creating a new one from scratch.
// So return "never recreate" here.
@@ -1119,6 +1143,14 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
}
final void reactivate(long serial, long surface) {
performLocked(() -> {
if (serial != 0 &&wlSurface != null && surface != 0) {
wlSurface.activateByAnotherSurface(serial, surface);
}
});
}
private static long getSerialForActivation() {
long serial;
if (WLToolkit.isKDE()) {
@@ -1147,12 +1179,14 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
String title, String appID);
protected native void nativeCreatePopup(long ptr, long parentPtr, long wlSurfacePtr,
int width, int height,
int offsetX, int offsetY);
int width, int height,
int offsetX, int offsetY,
boolean isUnconstrained);
protected native void nativeRepositionWLPopup(long ptr,
int width, int height,
int offsetX, int offsetY);
int offsetX, int offsetY,
boolean isUnconstrained);
protected native void nativeHideFrame(long ptr);
protected native void nativeDisposeFrame(long ptr);
@@ -1206,14 +1240,14 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
* the freshly updated WLInputState, and the previous WLInputState.
*/
void dispatchPointerEventInContext(WLPointerEvent e, WLInputState oldInputState, WLInputState newInputState) {
final long timestamp = System.currentTimeMillis();
final int x = newInputState.getPointerX();
final int y = newInputState.getPointerY();
final Point abs = relativePointToAbsolute(new Point(x, y));
int xAbsolute = abs.x;
int yAbsolute = abs.y;
final long timestamp = newInputState.getTimestamp();
if (e.hasEnterEvent()) {
updateCursorImmediately();
final MouseEvent mouseEvent = new MouseEvent(getTarget(), MouseEvent.MOUSE_ENTERED,
@@ -1249,7 +1283,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
postMouseEvent(mouseEvent);
final boolean isButtonReleased = !e.getIsButtonPressed();
final boolean wasSameButtonPressed = oldInputState.hasThisPointerButtonPressed(e.getButtonCode());
final boolean wasSameButtonPressed = oldInputState.hasThisPointerButtonPressedAt(e.getButtonCode(), x, y);
final boolean isButtonClicked = isButtonReleased && wasSameButtonPressed;
if (isButtonClicked) {
final MouseEvent mouseClickEvent = new MouseEvent(getTarget(),
@@ -1352,7 +1386,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
if (verticalMWERoundRotations != 0 || verticalMWEPreciseRotations != 0) {
assert(verticalMWEScrollAmount > 0);
assert verticalMWEScrollAmount > 0
: String.format("Vertical scrolling event has negative scroll amount: %d", verticalMWEScrollAmount);
final MouseEvent mouseEvent = new MouseWheelEvent(getTarget(),
MouseEvent.MOUSE_WHEEL,
@@ -1371,7 +1406,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
if (horizontalMWERoundRotations != 0 || horizontalMWEPreciseRotations != 0) {
assert(horizontalMWEScrollAmount > 0);
assert horizontalMWEScrollAmount > 0
: String.format("Horizontal scrolling event has negative scroll amount: %d", horizontalMWEScrollAmount);;
final MouseEvent mouseEvent = new MouseWheelEvent(getTarget(),
MouseEvent.MOUSE_WHEEL,
@@ -1582,7 +1618,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
// "This request must be used in response to some sort of user action like a button press,
// key press, or touch down event. The passed serial is used to determine the type
// of interactive move (touch, pointer, etc)."
assert serial != 0;
assert serial != 0 : "The serial number of the event requesting the drag must be non-zero";
performLocked(() -> nativeStartDrag(serial, nativePtr));
}
@@ -1591,7 +1627,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
// "This request must be used in response to some sort of user action like a button press,
// key press, or touch down event. The passed serial is used to determine the type
// of interactive resize (touch, pointer, etc)."
assert serial != 0;
assert serial != 0 : "The serial number of the event requesting the resize must be non-zero";
performLocked(() -> nativeStartResize(serial, nativePtr, edges));
}
@@ -1671,7 +1707,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
void notifyConfigured(int newSurfaceX, int newSurfaceY, int newSurfaceWidth, int newSurfaceHeight,
boolean active, boolean maximized, boolean fullscreen) {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
// NB: The width and height, as well as X and Y arguments, specify the size and the location
// of the window in surface-local coordinates.
@@ -1752,12 +1788,12 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
void notifyPopupDone() {
assert(targetIsWlPopup());
assert targetIsWlPopup() : "This method must be invoked only for popups";
target.setVisible(false);
}
void checkIfOnNewScreen() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
if (wlSurface == null) return;
final WLGraphicsDevice newDevice = wlSurface.getGraphicsDevice();
@@ -2002,7 +2038,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
@Override
public void updateSurfaceSize() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
shadowSurface.updateSurfaceSize(shadowWlSize.getSurfaceWidth(), shadowWlSize.getSurfaceHeight());
}
@@ -2014,8 +2050,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
public void createSurface() {
assert shadowSurface == null;
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert shadowSurface == null : "The shadow surface must not be created twice";
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
int shadowOffset = -javaUnitsToSurfaceUnits(shadowSize);
shadowSurface = new WLSubSurface(wlSurface, shadowOffset, shadowOffset);
@@ -2023,13 +2059,13 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
public void commitSurface() {
assert shadowSurface != null;
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
shadowSurface.commit();
}
public void dispose() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
if (shadowSurface != null) {
shadowSurface.dispose();
@@ -2044,7 +2080,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
public void hide() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
if (shadowSurface != null) {
shadowSurface.dispose();
@@ -2053,7 +2089,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
public void updateSurfaceData() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
needsRepaint = true;
SurfaceData.convertTo(WLSurfaceDataExt.class, shadowSurfaceData).revalidate(
@@ -2061,7 +2097,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
public void paint() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
if (!needsRepaint) {
return;
@@ -2087,7 +2123,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
public void notifyConfigured(boolean active, boolean maximized, boolean fullscreen) {
assert shadowSurface != null;
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
needsRepaint |= active ^ isActive;

View File

@@ -77,7 +77,8 @@ public class WLDataOffer {
fd = openReceivePipe(nativePtr, mime);
assert(fd != -1); // Otherwise an exception should be thrown from native code
// Otherwise an exception should be thrown from native code
assert fd != -1 : "An invalid file descriptor received from the native code";
FileDescriptor javaFD = new FileDescriptor();
jdk.internal.access.SharedSecrets.getJavaIOFileDescriptorAccess().set(javaFD, fd);

View File

@@ -53,7 +53,7 @@ public class WLDataSource {
var wlDataTransferer = (WLDataTransferer) WLDataTransferer.getInstance();
nativePtr = initNative(dataDevice.getNativePtr(), protocol);
assert nativePtr != 0; // should've already thrown in native
assert nativePtr != 0 : "Failed to initialize the native part of the source"; // should've already thrown in native
this.data = data;
try {
@@ -121,6 +121,13 @@ public class WLDataSource {
setDnDIconImpl(nativePtr, scale, width, height, offsetX, offsetY, pixels);
}
public void offerExtraMime(String mime) {
if (nativePtr == 0) {
throw new IllegalStateException("Native pointer is null");
}
offerMimeImpl(nativePtr, mime);
}
public synchronized void destroy() {
if (nativePtr != 0) {
destroyImpl(nativePtr);

View File

@@ -27,12 +27,10 @@ package sun.awt.wl;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Window;
import java.awt.event.MouseEvent;
import java.awt.event.WindowEvent;
public abstract class WLDecoratedPeer extends WLWindowPeer {
private FrameDecoration decoration; // protected by stateLock
@@ -95,14 +93,6 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
return ((WLToolkit) WLToolkit.getDefaultToolkit()).checkGtkVersion(3, 20, 0);
}
private static native void initIDs();
static {
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
}
public abstract boolean isInteractivelyResizable();
public abstract boolean isFrameStateSupported(int state);
public abstract void setState(int newState);
@@ -169,11 +159,6 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
super.updateWindow();
}
// called from native code
void postWindowClosing() {
WLToolkit.postEvent(new WindowEvent((Window) target, WindowEvent.WINDOW_CLOSING));
}
@Override
void postMouseEvent(MouseEvent e) {
boolean processed = getDecoration().processMouseEvent(e);

View File

@@ -24,8 +24,13 @@
*/
package sun.awt.wl;
import java.awt.*;
import sun.awt.AWTAccessor;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Window;
import java.awt.peer.DialogPeer;
import java.awt.peer.WindowPeer;
import java.util.List;
public class WLDialogPeer extends WLDecoratedPeer implements DialogPeer {
@@ -41,7 +46,12 @@ public class WLDialogPeer extends WLDecoratedPeer implements DialogPeer {
@Override
public void blockWindows(List<Window> windows) {
for (Window w : windows) {
WindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
wp.setModalBlocked((Dialog)getTarget(), true);
}
}
}
@Override

View File

@@ -35,7 +35,10 @@ import java.awt.GraphicsDevice;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Window;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
@@ -119,7 +122,7 @@ public class WLGraphicsDevice extends GraphicsDevice {
* Top-level window peers that consider this device as their primary one
* and get their graphics configuration from it
*/
private final Set<WLComponentPeer> toplevels = new HashSet<>(); // guarded by 'this'
private final Set<WeakReference<WLComponentPeer>> toplevels = new HashSet<>(); // guarded by 'this'
private WLGraphicsDevice(int id,
String name,
@@ -128,10 +131,10 @@ public class WLGraphicsDevice extends GraphicsDevice {
int widthLogical, int heightLogical,
int widthMm, int heightMm,
int displayScale) {
assert width > 0 && height > 0;
assert widthLogical > 0 && heightLogical > 0;
assert widthMm > 0 && heightMm > 0;
assert displayScale > 0;
assert width > 0 && height > 0 : String.format("Invalid device size: %dx%d", width, height);
assert widthLogical > 0 && heightLogical > 0 : String.format("Invalid logical device size: %dx%d", widthLogical, heightLogical);
assert widthMm > 0 && heightMm > 0 : String.format("Invalid physical device size: %dx%d", widthMm, heightMm);
assert displayScale > 0 : String.format("Invalid display scale: %d", displayScale);
this.wlID = id;
this.name = name;
@@ -176,10 +179,10 @@ public class WLGraphicsDevice extends GraphicsDevice {
int widthLogical, int heightLogical,
int widthMm, int heightMm,
int scale) {
assert width > 0 && height > 0;
assert widthLogical > 0 && heightLogical > 0;
assert widthMm > 0 && heightMm > 0;
assert scale > 0;
assert width > 0 && height > 0 : String.format("Invalid device size: %dx%d", width, height);
assert widthLogical > 0 && heightLogical > 0 : String.format("Invalid logical device size: %dx%d", widthLogical, heightLogical);
assert widthMm > 0 && heightMm > 0 : String.format("Invalid physical device size: %dx%d", widthMm, heightMm);
assert scale > 0 : String.format("Invalid display scale: %d", scale);
this.name = name;
this.x = x;
@@ -205,9 +208,14 @@ public class WLGraphicsDevice extends GraphicsDevice {
}
private void notifyToplevels() {
Set<WLComponentPeer> toplevelsCopy = new HashSet<>(toplevels.size());
List<WLComponentPeer> toplevelsCopy = new ArrayList<>(toplevels.size());
synchronized (this) {
toplevelsCopy.addAll(toplevels);
for (var toplevel: toplevels) {
WLComponentPeer peer = toplevel.get();
if (peer != null) {
toplevelsCopy.add(peer);
}
}
}
toplevelsCopy.forEach(WLComponentPeer::checkIfOnNewScreen);
}
@@ -369,13 +377,16 @@ public class WLGraphicsDevice extends GraphicsDevice {
public void addWindow(WLComponentPeer peer) {
synchronized (this) {
toplevels.add(peer);
toplevels.add(new WeakReference<>(peer));
}
}
public void removeWindow(WLComponentPeer peer) {
synchronized (this) {
toplevels.remove(peer);
toplevels.removeIf(ref -> {
WLComponentPeer p = ref.get();
return p == null || p == peer;
});
}
}

View File

@@ -133,8 +133,16 @@ public class WLGraphicsEnvironment extends SunGraphicsEnvironment implements HiD
}
// Logical size comes from an optional protocol, so take the data from the main one, if absent
if (widthLogical == 0) widthLogical = width;
if (heightLogical == 0) heightLogical = height;
if (widthLogical <= 0) widthLogical = width;
if (heightLogical <= 0) heightLogical = height;
// Physical size may be absent for virtual outputs.
if (widthMm <= 0 || heightMm <= 0) {
// Assume a 92 DPI display
widthMm = (int) Math.ceil(25.4 * width / 92.0);
heightMm = (int) Math.ceil(25.4 * height / 92.0);
}
String humanID = deviceNameFrom(name, make, model);
WLGraphicsDevice gd = deviceWithID(wlID);

View File

@@ -242,7 +242,9 @@ record WLInputState(WLPointerEvent eventWithSurface,
WLPointerEvent newEventWithTimestamp,
WLPointerEvent newEventWithPosition) {
if (pointerEvent.hasButtonEvent() && pointerEvent.getIsButtonPressed() && newEventWithSurface != null) {
assert newEventWithTimestamp != null && newEventWithPosition != null;
assert newEventWithTimestamp != null && newEventWithPosition != null
: "Events with timestamp and position are both required to be present";
int clickCount = 1;
final boolean pressedSameButton = pointerButtonPressedEvent != null
&& pointerEvent.getButtonCode() == pointerButtonPressedEvent.linuxCode;
@@ -293,8 +295,9 @@ record WLInputState(WLPointerEvent eventWithSurface,
return newModifiers;
}
public boolean hasThisPointerButtonPressed(int linuxCode) {
return pointerButtonPressedEvent != null && pointerButtonPressedEvent.linuxCode == linuxCode;
public boolean hasThisPointerButtonPressedAt(int linuxCode, long x, long y) {
return pointerButtonPressedEvent != null && pointerButtonPressedEvent.linuxCode == linuxCode
&& pointerButtonPressedEvent.surfaceX == x && pointerButtonPressedEvent.surfaceY == y;
}
public boolean hasPointerButtonPressed() {
@@ -351,6 +354,12 @@ record WLInputState(WLPointerEvent eventWithSurface,
return true;
}
/**
* @return the timestamp of the most recent known {@code wl_pointer::*} event or 0 if no such event is known.
*
* @apiNote don't use these timestamps for constructing any new {@link java.awt.event.InputEvent}s
* because they are not guaranteed to be based on the midnight of Jan 1, 1970 UTC.
*/
public long getTimestamp() {
return eventWithTimestamp != null ? eventWithTimestamp.getTimestamp() : 0;
}

View File

@@ -48,7 +48,7 @@ class WLKeyboard {
// called from native code
void setRepeatInfo(int charsPerSecond, int delayMillis) {
// this function receives (0, 0) when key repeat is disabled
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
this.delayBeforeRepeatMillis = delayMillis;
if (charsPerSecond > 0) {
this.delayBetweenRepeatMillis = (int) (1000.0 / charsPerSecond);
@@ -64,7 +64,7 @@ class WLKeyboard {
}
void cancelRepeat() {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (currentRepeatTask != null) {
currentRepeatTask.cancel();
currentRepeatTask = null;
@@ -74,7 +74,7 @@ class WLKeyboard {
// called from native code
void stopRepeat(int keycode) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (currentRepeatKeycode == keycode) {
cancelRepeat();
}
@@ -82,7 +82,7 @@ class WLKeyboard {
// called from native code
void startRepeat(long serial, long timestamp, int keycode) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
cancelRepeat();
if (keycode == 0 || !isRepeatEnabled()) {
return;
@@ -123,7 +123,7 @@ class WLKeyboard {
public native boolean isNumLockPressed();
public void onLostFocus() {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
keyRepeatManager.cancelRepeat();
cancelCompose();
}

View File

@@ -6,11 +6,12 @@ import sun.util.logging.PlatformLogger;
import java.awt.Component;
import java.awt.Window;
import java.lang.ref.WeakReference;
public class WLKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.wl.focus.WLKeyboardFocusManagerPeer");
private Window currentFocusedWindow;
private WeakReference<Window> currentFocusedWindow = new WeakReference<>(null);
private static final WLKeyboardFocusManagerPeer instance = new WLKeyboardFocusManagerPeer();
public static WLKeyboardFocusManagerPeer getInstance() {
@@ -23,14 +24,14 @@ public class WLKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Current focused window -> " + win);
}
currentFocusedWindow = win;
currentFocusedWindow = new WeakReference<>(win);
}
}
@Override
public Window getCurrentFocusedWindow() {
synchronized (this) {
return currentFocusedWindow;
return currentFocusedWindow.get();
}
}
@@ -61,7 +62,7 @@ public class WLKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
@Override
public Component getCurrentFocusOwner() {
synchronized (this) {
return currentFocusedWindow;
return currentFocusedWindow.get();
}
}
}

View File

@@ -91,7 +91,7 @@ public class WLMainSurface extends WLSurface {
}
public void activateByAnotherSurface(long serial, long activatingSurfacePtr) {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
nativeActivate(getNativePtr(), serial, activatingSurfacePtr);

View File

@@ -217,37 +217,37 @@ class WLPointerEvent {
}
public long getSurface() {
assert hasSurface();
assert hasSurface() : "The event must have a valid surface";
return surface;
}
public long getSerial() {
assert hasSerial();
assert hasSerial() : "The event must have a valid serial";
return serial;
}
public long getTimestamp() {
assert hasTimestamp();
assert hasTimestamp() : "The event must have a valid timestamp";
return timestamp;
}
public int getSurfaceX() {
assert hasCoordinates();
assert hasCoordinates() : "The event must have valid coordinates";
return surface_x;
}
public int getSurfaceY() {
assert hasCoordinates();
assert hasCoordinates() : "The event must have valid coordinates";
return surface_y;
}
public int getButtonCode() {
assert hasButtonEvent();
assert hasButtonEvent() : "Must have a button event to get the button code";
return buttonCode;
}
public boolean getIsButtonPressed() {
assert hasButtonEvent();
assert hasButtonEvent() : "Must have a button event to get the button state";
return isButtonPressed;
}
@@ -270,12 +270,12 @@ class WLPointerEvent {
}
public double getXAxisVectorValue() {
assert xAxisHasVectorValue();
assert xAxisHasVectorValue() : "Must have an X axis vector value";
return xAxis_vectorValue;
}
public int getXAxisSteps120Value() {
assert xAxisHasSteps120Value();
assert xAxisHasSteps120Value() : "Must have an X axis steps120 value";
return xAxis_steps120Value;
}
@@ -298,12 +298,12 @@ class WLPointerEvent {
}
public double getYAxisVectorValue() {
assert yAxisHasVectorValue();
assert yAxisHasVectorValue() : "Must have an Y axis vector value";
return yAxis_vectorValue;
}
public int getYAxisSteps120Value() {
assert yAxisHasSteps120Value();
assert yAxisHasSteps120Value(): "Must have an Y axis steps120 value";
return yAxis_steps120Value;
}

View File

@@ -171,7 +171,7 @@ public class WLRobotPeer implements RobotPeer {
static Point getLocationOfWLSurface(WLSurface wlSurface) {
checkExtensionPresent();
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
final long wlSurfacePtr = wlSurface.getWlSurfacePtr();
// The native implementation allows for just one such request at a time

View File

@@ -57,7 +57,7 @@ public class WLSurface {
}
public void dispose() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
if (isValid) {
hide();
@@ -67,7 +67,7 @@ public class WLSurface {
}
public void hide() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
if (surfaceData == null) return;
@@ -85,14 +85,14 @@ public class WLSurface {
}
public boolean hasSurfaceData() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
return surfaceData != null;
}
public void associateWithSurfaceData(SurfaceData data) {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
Objects.requireNonNull(data);
assertIsValid();
@@ -103,7 +103,7 @@ public class WLSurface {
}
public void commit() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
nativeCommitWlSurface(nativePtr);
@@ -115,28 +115,28 @@ public class WLSurface {
* @return a pointer to wl_surface native object
*/
public long getWlSurfacePtr() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
return wlSurfacePtr;
}
protected long getNativePtr() {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
return nativePtr;
}
public void setSize(int width, int height) {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
nativeSetSize(nativePtr, width, height);
}
public void setOpaqueRegion(int x, int y, int width, int height) {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
nativeSetOpaqueRegion(nativePtr, x, y, width, height);
@@ -151,7 +151,7 @@ public class WLSurface {
}
public void updateSurfaceSize(int surfaceWidth, int surfaceHeight) {
assert SunToolkit.isAWTLockHeldByCurrentThread();
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
assertIsValid();
setSize(surfaceWidth, surfaceHeight);

View File

@@ -331,7 +331,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
private static void dispatchPointerEvent(WLPointerEvent e) {
// Invoked from the native code
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINE)) log.fine("dispatchPointerEvent: " + e);
@@ -353,7 +353,6 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
}
private static void dispatchKeyboardKeyEvent(long serial,
long timestamp,
int id,
int keyCode,
int keyLocation,
@@ -362,16 +361,12 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
char keyChar,
int modifiers) {
// Invoked from the native code
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
final long timestamp = System.currentTimeMillis();
inputState = inputState.updatedFromKeyEvent(serial);
if (timestamp == 0) {
// Happens when a surface was focused with keys already pressed.
// Fake the timestamp by peeking at the last known event.
timestamp = inputState.getTimestamp();
}
final long surfacePtr = inputState.surfaceForKeyboardInput();
final WLComponentPeer peer = peerFromSurface(surfacePtr);
if (peer != null) {
@@ -425,43 +420,53 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
}
private static void dispatchKeyboardModifiersEvent(long serial) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
inputState = inputState.updatedFromKeyboardModifiersEvent(serial, keyboard.getModifiers());
WLDropTargetContextPeer.getInstance().handleModifiersUpdate();
}
private static void dispatchKeyboardEnterEvent(long serial, long surfacePtr) {
// Invoked from the native code
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
logKeys.fine("dispatchKeyboardEnterEvent: " + serial + ", surface 0x"
+ Long.toHexString(surfacePtr));
}
final WLInputState newInputState = inputState.updatedFromKeyboardEnterEvent(serial, surfacePtr);
final WLWindowPeer peer = peerFromSurface(surfacePtr);
final WLInputState newInputState = inputState.updatedFromKeyboardEnterEvent(serial, surfacePtr);
if (peer != null) {
Window window = (Window) peer.getTarget();
Window winToFocus = window;
Component s = peer.getSyntheticFocusOwner();
if (s instanceof Window synthWindow) {
if (synthWindow.isVisible() && synthWindow.isFocusableWindow()) {
winToFocus = synthWindow;
Dialog blocker = peer.getBlocker();
if (blocker != null) { // Modality support
long activationSerial = serial;
if (WLToolkit.isKDE()) {
activationSerial = inputState.latestInputSerial();
}
}
WLWindowPeer blockerPeer = AWTAccessor.getComponentAccessor().getPeer(blocker);
blockerPeer.reactivate(activationSerial, surfacePtr);
} else {
Window window = (Window) peer.getTarget();
Window winToFocus = window;
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusedWindow(window);
WindowEvent windowEnterEvent = new WindowEvent(winToFocus, WindowEvent.WINDOW_GAINED_FOCUS);
postPriorityEvent(windowEnterEvent);
Component s = peer.getSyntheticFocusOwner();
if (s instanceof Window synthWindow) {
if (synthWindow.isVisible() && synthWindow.isFocusableWindow()) {
winToFocus = synthWindow;
}
}
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusedWindow(window);
WindowEvent windowEnterEvent = new WindowEvent(winToFocus, WindowEvent.WINDOW_GAINED_FOCUS);
postPriorityEvent(windowEnterEvent);
}
}
inputState = newInputState;
}
private static void dispatchKeyboardLeaveEvent(long serial, long surfacePtr) {
// Invoked from the native code
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
logKeys.fine("dispatchKeyboardLeaveEvent: " + serial + ", surface 0x"
@@ -470,12 +475,13 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
keyboard.onLostFocus();
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusedWindow(null);
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusOwner(null);
final WLInputState newInputState = inputState.updatedFromKeyboardLeaveEvent(serial, surfacePtr);
final WLWindowPeer peer = peerFromSurface(surfacePtr);
if (peer != null && peer.getTarget() instanceof Window window) {
final WindowEvent winLostFocusEvent = new WindowEvent(window, WindowEvent.WINDOW_LOST_FOCUS);
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusedWindow(null);
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusOwner(null);
postPriorityEvent(winLostFocusEvent);
}
inputState = newInputState;
@@ -1115,6 +1121,17 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
protected static void targetDisposedPeer(Object target, Object peer) {
SunToolkit.targetDisposedPeer(target, peer);
if (target instanceof Window window) {
// TODO: focusedWindow and activeWindow of class java.awt.KeyboardFocusManager
// may still retain references to 'window' because disposed peer may not
// get the keyboard_leave event and therefore will not send the WINDOW_LOST_FOCUS
// event that would've cleared those references.
var gc = window.getGraphicsConfiguration();
if (gc != null && peer instanceof WLWindowPeer windowPeer) {
WLGraphicsDevice gd = (WLGraphicsDevice) gc.getDevice();
gd.removeWindow(windowPeer);
}
}
}
static void postEvent(AWTEvent event) {

View File

@@ -41,6 +41,7 @@ import java.awt.Dialog;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Rectangle;
@@ -57,7 +58,7 @@ import java.util.List;
public class WLWindowPeer extends WLComponentPeer implements WindowPeer, SurfacePixelGrabber {
private static Font defaultFont;
private Dialog blocker;
private Dialog blocker; // guarded by getStateLock()
private static WLWindowPeer grabbingWindow; // fake, kept for UngrabEvent only
// If this window gets focus from Wayland, we need to transfer focus synthFocusOwner, if any
@@ -72,6 +73,12 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer, Surface
private Path2D.Double bottomRightMask; // guarded by stateLock
private SunGraphics2D graphics; // guarded by stateLock
static {
if (!GraphicsEnvironment.isHeadless()) {
initIDs();
}
}
static synchronized Font getDefaultFont() {
if (null == defaultFont) {
defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@@ -173,7 +180,15 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer, Surface
@Override
public void setModalBlocked(Dialog blocker, boolean blocked) {
this.blocker = blocked ? blocker : null;
synchronized (getStateLock()) {
this.blocker = blocked ? blocker : null;
}
}
public Dialog getBlocker() {
synchronized (getStateLock()) {
return blocker;
}
}
@Override
@@ -312,6 +327,11 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer, Surface
}
}
// called from native code
void postWindowClosing() {
WLToolkit.postEvent(new WindowEvent((Window) target, WindowEvent.WINDOW_CLOSING));
}
@Override
public BufferedImage getClientAreaSnapshot(int x, int y, int width, int height) {
// Move the coordinate system to the client area
@@ -465,4 +485,6 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer, Surface
graphics.fill(bottomRightMask);
}
}
private static native void initIDs();
}

View File

@@ -67,7 +67,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
public void startTracking(final Component component) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(
@@ -108,7 +108,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
}
public void stopTrackingCurrentComponent() {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(String.format("stopTrackingCurrentComponent(): this=%s.", this), new Throwable("Stacktrace"));
@@ -160,7 +160,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
}
public Component getTrackedComponentIfTracking() {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
final Component trackedComponentStrong;
if (trackedComponent == null) {
@@ -188,7 +188,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
public void deferUpdates() {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(String.format("deferUpdates(): this=%s.", this), new Throwable("Stacktrace"));
@@ -198,7 +198,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
}
public void resumeUpdates(final boolean discardDeferredUpdates) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(String.format("resumeUpdates(%b): this=%s.", discardDeferredUpdates, this), new Throwable("Stacktrace"));
@@ -215,7 +215,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
}
public boolean areUpdatesDeferred() {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
return updatesAreDeferred;
}
@@ -225,7 +225,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
/** This method is intended to be called from the owning IM's {@link java.awt.im.spi.InputMethod#dispatchEvent(AWTEvent)}. */
public void onIMDispatchEvent(AWTEvent event) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("onIMDispatchEvent(event={0}): this={1}.", event, this);
@@ -254,7 +254,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
/** This method is intended to be called from the owning IM's {@link java.awt.im.spi.InputMethod#notifyClientWindowChange(Rectangle)}. */
public void onIMNotifyClientWindowChange(Rectangle location) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("onIMNotifyClientWindowChange(location={0}): this={1}.", location, this);
@@ -333,7 +333,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
private WLInputMethodZwpTextInputV3 getOwnerIm() {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
final WLInputMethodZwpTextInputV3 thisImStrong;
if (this.im == null) {

View File

@@ -40,7 +40,7 @@ final class InputContextState {
public InputContextState(long nativeContextPtr) {
assert(nativeContextPtr != 0);
assert nativeContextPtr != 0 : "Cannot create an input context from a NULL pointer";
this.nativeContextPtr = nativeContextPtr;
}

View File

@@ -82,8 +82,8 @@ record JavaPreeditString(String text, int cursorBeginCodeUnit, int cursorEndCode
}
if (resultText == null) {
assert(fixedCursorBeginUtf8Byte == 0);
assert(fixedCursorEndUtf8Byte == 0);
assert fixedCursorBeginUtf8Byte == 0 : "Cursor begin byte must be zero for an empty string";
assert fixedCursorEndUtf8Byte == 0 : "Cursor end byte must be zero for an empty string";
return JavaPreeditString.EMPTY;
}

View File

@@ -71,7 +71,7 @@ public final class WLInputMethodDescriptorZwpTextInputV3 implements InputMethodD
@Override
public String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) {
assert isAvailableOnPlatform();
assert isAvailableOnPlatform() : "IM must be available on the platform";
// This is how it's implemented in all other Toolkits.
//
@@ -183,7 +183,7 @@ public final class WLInputMethodDescriptorZwpTextInputV3 implements InputMethodD
private WLInputMethodDescriptorZwpTextInputV3() {
assert isAvailableOnPlatform();
assert isAvailableOnPlatform() : "IM must be available on the platform";
initAndGetToolkitStartupLocale();
}

View File

@@ -243,7 +243,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
}
// "The method is only called when the input method is inactive."
assert(this.awtActivationStatus != AWTActivationStatus.ACTIVATED);
assert this.awtActivationStatus != AWTActivationStatus.ACTIVATED : "The method is called when the IM is active";
// The protocol doesn't provide a separate method for hiding the IM window(s),
// but this effect can be achieved by disabling the native context.
@@ -259,7 +259,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
}
// "The method is only called when the input method is inactive."
assert(this.awtActivationStatus != AWTActivationStatus.ACTIVATED);
assert this.awtActivationStatus != AWTActivationStatus.ACTIVATED : "The method is called when the IM is active";
wlDisableContextNow();
}
@@ -374,10 +374,10 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/* AWT-side methods section */
private static void awtFillWlContentTypeOf(Component component, OutgoingChanges out) {
assert(component != null);
assert(out != null);
assert component != null : "Component must not be null";
assert out != null : "OutgoingChanges must not be null";
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
// TODO: there's no dedicated AWT/Swing API for that, but we can make a few guesses, e.g.
// (component instanceof JPasswordField) ? ContentPurpose.PASSWORD
@@ -389,7 +389,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
* compatible with {@code zwp_text_input_v3::set_cursor_rectangle} API;
*/
private static Rectangle awtGetWlCursorRectangleOf(Component component) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
Rectangle result = null;
@@ -434,7 +434,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
* @throws IllegalArgumentException if {@code visibleComponent} is {@code null} or isn't showing on the screen.
*/
private static Rectangle awtGetCaretOf(Component visibleComponent) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (!Objects.requireNonNull(visibleComponent, "visibleComponent").isShowing()) {
throw new IllegalArgumentException("visibleComponent must be showing");
@@ -474,7 +474,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
}
private static Rectangle awtGetVisibleRectOf(final Component component) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (component instanceof javax.swing.JComponent jComponent) {
return jComponent.getVisibleRect();
@@ -488,7 +488,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
* or {@code null} if the rectangle couldn't be determined.
*/
private static Rectangle awtConvertRectOnComponentToRectOnWlSurface(Component component, Rectangle rectOnComponent) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
Objects.requireNonNull(component, "component");
@@ -536,7 +536,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
* or its closest ancestor meeting these requirements.
*/
private static Window awtGetWlSurfaceComponentOf(Component component) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
return WLComponentPeer.getToplevelFor(component);
}
@@ -557,8 +557,8 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
log.finer("awtPostIMESafely(preeditString={0}, commitString={1}): this={2}.", preeditString, commitString, this);
}
assert(preeditString != null);
assert(commitString != null);
assert preeditString != null : "Pre-edit string must be present";
assert commitString != null : "Commit string must be present";
try {
if (awtActivationStatus != AWTActivationStatus.ACTIVATED) {
@@ -699,6 +699,10 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
String.format("awtPostIMESafely(...): posting a new InputMethodEvent=%s. this=%s.", ime, this),
new Throwable("Stacktrace")
);
// JBR-9719: reset ime's text iterator after logging
final var textIterToReset = ime.getText();
if (textIterToReset != null) textIterToReset.first();
}
SunToolkit.postEvent(SunToolkit.targetToAppContext(clientComponent), ime);
@@ -765,8 +769,8 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
specialPreeditHighlightingBegin = swapTemp;
}
assert(specialPreeditHighlightingBegin >= 0);
assert(specialPreeditHighlightingEnd <= preeditTextLength);
assert specialPreeditHighlightingBegin >= 0 : "specialPreeditHighlightingBegin is invalid";
assert specialPreeditHighlightingEnd <= preeditTextLength : "specialPreeditHighlightingEnd is out of range";
// v
// |BASIC+SPECIAL...|
@@ -823,10 +827,10 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
// The methods in this section implement the core logic of working with the "text-input-unstable-v3" protocol.
private void wlInitializeContext() throws AWTException {
assert(wlInputContextState == null);
assert(wlPendingChanges == null);
assert(wlBeingCommittedChanges == null);
assert(wlIncomingChanges == null);
assert wlInputContextState == null : "Must not initialize input context twice";
assert wlPendingChanges == null : "Must not initialize pending changes twice";
assert wlBeingCommittedChanges == null : "Must not initialize being-committed changes twice";
assert wlIncomingChanges == null : "Must not initialize incoming changes twice";
long nativeCtxPtr = 0;
@@ -874,7 +878,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
* followed by a {@code zwp_text_input_v3::commit} request.
*/
private void wlSendPendingChangesNow() {
assert(wlCanSendChangesNow());
assert wlCanSendChangesNow() : "Must be able to send pending changes now";
final OutgoingChanges changesToSend = wlPendingChanges;
wlPendingChanges = null;
@@ -993,7 +997,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
throw new IllegalStateException("Attempt to enable an input context which hasn't entered any surface");
}
assert(wlContextCanBeEnabledNow());
assert wlContextCanBeEnabledNow() : "Can't enable InputContext";
// This way we guarantee the context won't accidentally get disabled because such a change has been scheduled earlier.
// Anyway we consider any previously scheduled changes outdated because an 'enable' request is supposed to
@@ -1025,7 +1029,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
awtFillWlContentTypeOf(getClientComponent(), changeSet);
wlScheduleContextNewChanges(changeSet);
assert(wlPendingChanges != null);
assert wlPendingChanges != null : "Must have non-empty pending changes";
// Pretending there are no committed, but not applied yet changes, so that wlCanSendChangesNow() is true.
// We can do that because the assumption #1 and because any previously committed changes get lost when a
@@ -1034,7 +1038,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
// set_surrounding_text, set_text_change_cause, set_content_type, and set_cursor_rectangle requests [...]"
wlBeingCommittedChanges = null;
assert(wlCanSendChangesNow());
assert wlCanSendChangesNow() : "Must be able to send pending changes now";
wlSendPendingChangesNow();
// See the assumption #2 above.
@@ -1099,10 +1103,10 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
}
}
assert(wlInputContextState.getCurrentWlSurfacePtr() != 0);
assert wlInputContextState.getCurrentWlSurfacePtr() != 0 : "InputContext must have a valid current surface pointer";
wlScheduleContextNewChanges(new OutgoingChanges().setEnabledState(false));
assert(wlPendingChanges != null);
assert wlPendingChanges != null : "Must have non-empty pending changes";
// Pretending there are no committed, but not applied yet changes, so that wlCanSendChangesNow() is true.
// We can do that because the assumption #1 and because any previously committed changes get lost when a
@@ -1110,7 +1114,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
// "After an enter event or disable request all state information is invalidated and needs to be resent by the client."
wlBeingCommittedChanges = null;
assert(wlCanSendChangesNow());
assert wlCanSendChangesNow() : "Must be able to send pending changes now";
wlSendPendingChangesNow();
// See the assumption #2 above.
@@ -1202,7 +1206,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called by {@link ClientComponentCaretPositionTracker} */
boolean wlUpdateCursorRectangle(final boolean forceUpdate) {
assert(EventQueue.isDispatchThread());
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("wlUpdateCursorRectangle(): forceUpdate={0}, this={1}.", forceUpdate, this);
@@ -1286,7 +1290,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called in response to {@code zwp_text_input_v3::enter} events. */
private void zwp_text_input_v3_onEnter(long enteredWlSurfacePtr) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
try {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
@@ -1308,7 +1312,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called in response to {@code zwp_text_input_v3::leave} events. */
private void zwp_text_input_v3_onLeave(long leftWlSurfacePtr) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
try {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
@@ -1331,7 +1335,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called in response to {@code zwp_text_input_v3::preedit_string} events. */
private void zwp_text_input_v3_onPreeditString(byte[] preeditStrUtf8, int cursorBeginUtf8Byte, int cursorEndUtf8Byte) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
try {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
@@ -1351,7 +1355,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called in response to {@code zwp_text_input_v3::commit_string} events. */
private void zwp_text_input_v3_onCommitString(byte[] commitStrUtf8) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
try {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
@@ -1371,7 +1375,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called in response to {@code zwp_text_input_v3::delete_surrounding_text} events. */
private void zwp_text_input_v3_onDeleteSurroundingText(long numberOfUtf8BytesBeforeToDelete, long numberOfUtf8BytesAfterToDelete) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
// TODO: support the surrounding text API (set_surrounding_text + set_text_change_cause | delete_surrounding text)
// at least for particular cases.
@@ -1390,7 +1394,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
/** Called in response to {@code zwp_text_input_v3::done} events. */
private void zwp_text_input_v3_onDone(long doneSerial) {
assert EventQueue.isDispatchThread();
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
try {
if (log.isLoggable(PlatformLogger.Level.FINE)) {

View File

@@ -46,7 +46,7 @@
#include <gtk-shell.h>
#endif
static jmethodID postWindowClosingMID;
static jmethodID postWindowClosingMID; // WLWindowPeer.postWindowClosing
static jmethodID notifyConfiguredMID;
static jmethodID notifyPopupDoneMID;
@@ -174,7 +174,7 @@ xdg_toplevel_close(void *data,
struct WLFrame *frame = (struct WLFrame *) data;
JNIEnv *env = getEnv();
const jobject nativeFramePeer = (*env)->NewLocalRef(env, frame->nativeFramePeer);
if (nativeFramePeer) {
if (nativeFramePeer) { // a reference to WLWinowPeer or its descendant
(*env)->CallVoidMethod(env, nativeFramePeer, postWindowClosingMID);
(*env)->DeleteLocalRef(env, nativeFramePeer);
JNU_CHECK_EXCEPTION(env);
@@ -226,12 +226,12 @@ Java_sun_awt_wl_WLComponentPeer_initIDs
}
JNIEXPORT void JNICALL
Java_sun_awt_wl_WLDecoratedPeer_initIDs
Java_sun_awt_wl_WLWindowPeer_initIDs
(JNIEnv *env, jclass clazz)
{
CHECK_NULL_THROW_IE(env,
postWindowClosingMID = (*env)->GetMethodID(env, clazz, "postWindowClosing", "()V"),
"Failed to find method WLDecoratedPeer.postWindowClosing");
"Failed to find method WLWindowPeer.postWindowClosing");
}
JNIEXPORT jlong JNICALL
@@ -387,7 +387,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreateWindow
static struct xdg_positioner *
newPositioner
(jint width, jint height, jint offsetX, jint offsetY)
(jint width, jint height, jint offsetX, jint offsetY, jboolean isUnconstrained)
{
struct xdg_positioner *xdg_positioner = xdg_wm_base_create_positioner(xdg_wm_base);
CHECK_NULL_RETURN(xdg_positioner, NULL);
@@ -400,10 +400,15 @@ newPositioner
xdg_positioner_set_offset(xdg_positioner, 0, 0);
xdg_positioner_set_anchor(xdg_positioner, XDG_POSITIONER_ANCHOR_TOP_LEFT);
xdg_positioner_set_gravity(xdg_positioner, XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT);
xdg_positioner_set_constraint_adjustment(xdg_positioner,
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y);
if (isUnconstrained) {
xdg_positioner_set_constraint_adjustment(xdg_positioner,
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE);
} else {
xdg_positioner_set_constraint_adjustment(xdg_positioner,
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y);
}
return xdg_positioner;
}
@@ -411,7 +416,8 @@ JNIEXPORT void JNICALL
Java_sun_awt_wl_WLComponentPeer_nativeCreatePopup
(JNIEnv *env, jobject obj, jlong ptr, jlong parentPtr, jlong wlSurfacePtr,
jint width, jint height,
jint offsetX, jint offsetY)
jint offsetX, jint offsetY,
jboolean isUnconstrained)
{
struct WLFrame *frame = (struct WLFrame *) ptr;
struct WLFrame *parentFrame = (struct WLFrame*) parentPtr;
@@ -423,7 +429,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreatePopup
frame->toplevel = JNI_FALSE;
assert(parentFrame);
struct xdg_positioner *xdg_positioner = newPositioner(width, height, offsetX, offsetY);
struct xdg_positioner *xdg_positioner = newPositioner(width, height, offsetX, offsetY, isUnconstrained);
CHECK_NULL(xdg_positioner);
JNU_RUNTIME_ASSERT(env, parentFrame->toplevel, "Popup's parent surface must be a toplevel");
frame->xdg_popup = xdg_surface_get_popup(frame->xdg_surface, parentFrame->xdg_surface, xdg_positioner);
@@ -436,13 +442,14 @@ JNIEXPORT void JNICALL
Java_sun_awt_wl_WLComponentPeer_nativeRepositionWLPopup
(JNIEnv *env, jobject obj, jlong ptr,
jint width, jint height,
jint offsetX, jint offsetY)
jint offsetX, jint offsetY,
jboolean isUnconstrained)
{
struct WLFrame *frame = jlong_to_ptr(ptr);
assert (!frame->toplevel);
if (wl_proxy_get_version((struct wl_proxy *)xdg_wm_base) >= 3) {
struct xdg_positioner *xdg_positioner = newPositioner(width, height, offsetX, offsetY);
struct xdg_positioner *xdg_positioner = newPositioner(width, height, offsetX, offsetY, isUnconstrained);
CHECK_NULL(xdg_positioner);
static int token = 42; // This will be received by xdg_popup_repositioned(); unused for now.
xdg_popup_reposition(frame->xdg_popup, xdg_positioner, token++);

View File

@@ -386,6 +386,10 @@ static const struct KeysymToJavaKeycodeMapItem {
{0x1005ff72 /* XKB_KEY_SunCopy */, java_awt_event_KeyEvent_VK_COPY, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0x1005ff74 /* XKB_KEY_SunPaste */, java_awt_event_KeyEvent_VK_PASTE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0x1005ff75 /* XKB_KEY_SunCut */, java_awt_event_KeyEvent_VK_CUT, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0x1008ff55 /* XKB_KEY_XF86Clear */, java_awt_event_KeyEvent_VK_CLEAR, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0x1008ff57 /* XKB_KEY_XF86Copy */, java_awt_event_KeyEvent_VK_COPY, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0x1008ff58 /* XKB_KEY_XF86Cut */, java_awt_event_KeyEvent_VK_CUT, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0x1008ff6d /* XKB_KEY_XF86Paste */, java_awt_event_KeyEvent_VK_PASTE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
{0, 0, 0}
};

View File

@@ -454,7 +454,6 @@ wlPostKeyEvent(const struct WLKeyEvent* event)
tkClass,
dispatchKeyboardKeyEventMID,
event->serial,
event->timestamp,
event->id,
event->keyCode,
event->keyLocation,
@@ -807,7 +806,7 @@ initJavaRefs(JNIEnv *env, jclass clazz)
JNI_FALSE);
CHECK_NULL_RETURN(dispatchKeyboardKeyEventMID = (*env)->GetStaticMethodID(env, tkClass,
"dispatchKeyboardKeyEvent",
"(JJIIIIICI)V"),
"(JIIIIICI)V"),
JNI_FALSE);
CHECK_NULL_RETURN(dispatchKeyboardModifiersEventMID = (*env)->GetStaticMethodID(env, tkClass,
"dispatchKeyboardModifiersEvent",

View File

@@ -1,135 +0,0 @@
/*
* Copyright (c) 2024, 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JEditorPane;
import javax.swing.text.View;
import javax.swing.text.html.CSS;
/*
* @test
* @bug 8326734
* @summary Tests different combinations of setting 'line-through'
* @run main HTMLStrikeOnly
*/
public class HTMLStrikeOnly {
private static final String HTML = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>line-through</title>
<style>
.lineThrough { text-decoration: line-through }
</style>
</head>
<body>
<p><s><span style='text-decoration: line-through'>line-through?</span></s></p>
<p><strike><span style='text-decoration: line-through'>line-through?</span></strike></p>
<p><span style='text-decoration: line-through'><s>line-through?</s></span></p>
<p><span style='text-decoration: line-through'><strike>line-through?</strike></span></p>
<p><s><span class="lineThrough">line-through?</span></s></p>
<p><strike><span class="lineThrough">line-through?</span></strike></p>
<p><span class="lineThrough"><s>line-through?</s></span></p>
<p><span class="lineThrough"><strike>line-through?</strike></span></p>
<p style='text-decoration: line-through'><s>line-through?</s></p>
<p style='text-decoration: line-through'><strike>line-through?</strike></p>
<p style='text-decoration: line-through'><span style='text-decoration: line-through'>line-through?</span></p>
<p class="lineThrough"><s>line-through</s></p>
<p class="lineThrough"><strike>line-through</strike></p>
<p class="lineThrough"><span style='text-decoration: line-through'>line-through</span></p>
<p class="lineThrough"><span class="lineThrough">line-through</span></p>
</body>
</html>
""";
public static void main(String[] args) {
final JEditorPane html = new JEditorPane("text/html", HTML);
html.setEditable(false);
final Dimension size = html.getPreferredSize();
html.setSize(size);
BufferedImage image = new BufferedImage(size.width, size.height,
BufferedImage.TYPE_INT_RGB);
Graphics g = image.createGraphics();
// Paint the editor pane to ensure all views are created
html.paint(g);
g.dispose();
int errorCount = 0;
String firstError = null;
System.out.println("----- Views -----");
final View bodyView = html.getUI()
.getRootView(html)
.getView(1)
.getView(1);
for (int i = 0; i < bodyView.getViewCount(); i++) {
View pView = bodyView.getView(i);
View contentView = getContentView(pView);
String decoration =
contentView.getAttributes()
.getAttribute(CSS.Attribute.TEXT_DECORATION)
.toString();
System.out.println(i + ": " + decoration);
if (!decoration.contains("line-through")
|| decoration.contains("underline")) {
errorCount++;
if (firstError == null) {
firstError = "Line " + i + ": " + decoration;
}
}
}
if (errorCount > 0) {
saveImage(image);
throw new RuntimeException(errorCount + " error(s) found, "
+ "the first one: " + firstError);
}
}
private static View getContentView(View parent) {
View view = parent.getView(0);
return view.getViewCount() > 0
? getContentView(view)
: view;
}
private static void saveImage(BufferedImage image) {
try {
ImageIO.write(image, "png",
new File("html.png"));
} catch (IOException ignored) { }
}
}

View File

@@ -1,157 +0,0 @@
/*
* Copyright (c) 2024, 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JEditorPane;
import javax.swing.text.View;
import javax.swing.text.html.CSS;
/*
* @test
* @bug 8323801 8326734
* @summary Tests different combination of 'underline' and 'line-through';
* the text should render with both 'underline' and 'line-through'.
* @run main HTMLTextDecoration
*/
public final class HTMLTextDecoration {
private static final String HTML = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>underline + line-through text</title>
<style>
.underline { text-decoration: underline }
.lineThrough { text-decoration: line-through }
</style>
</head>
<body>
<p><u><span style='text-decoration: line-through'>underline + line-through?</span></u></p>
<p><s><span style='text-decoration: underline'>underline + line-through?</span></s></p>
<p><strike><span style='text-decoration: underline'>underline + line-through?</span></strike></p>
<p><span style='text-decoration: line-through'><u>underline + line-through?</u></span></p>
<p><span style='text-decoration: underline'><s>underline + line-through?</s></span></p>
<p><span style='text-decoration: underline'><strike>underline + line-through?</strike></span></p>
<p><span style='text-decoration: line-through'><span style='text-decoration: underline'>underline + line-through?</span></span></p>
<p><span style='text-decoration: underline'><span style='text-decoration: line-through'>underline + line-through?</span></span></p>
<p style='text-decoration: line-through'><u>underline + line-through?</u></p>
<p style='text-decoration: underline'><s>underline + line-through?</s></p>
<p style='text-decoration: underline'><strike>underline + line-through?</strike></p>
<p style='text-decoration: line-through'><span style='text-decoration: underline'>underline + line-through?</span></p>
<p style='text-decoration: underline'><span style='text-decoration: line-through'>underline + line-through?</span></p>
<p class="underline"><span class="lineThrough">underline + line-through?</span></p>
<p class="underline"><s>underline + line-through?</s></p>
<p class="underline"><strike>underline + line-through?</strike></p>
<p class="lineThrough"><span class="underline">underline + line-through?</span></p>
<p class="lineThrough"><u>underline + line-through?</u></p>
<div class="underline"><span class="lineThrough">underline + line-through?</span></div>
<div class="underline"><s>underline + line-through?</s></div>
<div class="underline"><strike>underline + line-through?</strike></div>
<div class="lineThrough"><span class="underline">underline + line-through?</span></div>
<div class="lineThrough"><u>underline + line-through?</u></div>
<div class="underline"><p class="lineThrough">underline + line-through?</p></div>
<div class="lineThrough"><p class="underline">underline + line-through?</p></div>
<div class="underline"><div class="lineThrough">underline + line-through?</div></div>
<div class="lineThrough"><div class="underline">underline + line-through?</div></div>
</body>
</html>
""";
public static void main(String[] args) {
final JEditorPane html = new JEditorPane("text/html", HTML);
html.setEditable(false);
final Dimension size = html.getPreferredSize();
html.setSize(size);
BufferedImage image = new BufferedImage(size.width, size.height,
BufferedImage.TYPE_INT_RGB);
Graphics g = image.createGraphics();
// Paint the editor pane to ensure all views are created
html.paint(g);
g.dispose();
int errorCount = 0;
String firstError = null;
System.out.println("----- Views -----");
final View bodyView = html.getUI()
.getRootView(html)
.getView(1)
.getView(1);
for (int i = 0; i < bodyView.getViewCount(); i++) {
View pView = bodyView.getView(i);
View contentView = getContentView(pView);
String decoration =
contentView.getAttributes()
.getAttribute(CSS.Attribute.TEXT_DECORATION)
.toString();
System.out.println(i + ": " + decoration);
if (!decoration.contains("underline")
|| !decoration.contains("line-through")) {
errorCount++;
if (firstError == null) {
firstError = "Line " + i + ": " + decoration;
}
}
}
if (errorCount > 0) {
saveImage(image);
throw new RuntimeException(errorCount + " error(s) found, "
+ "the first one: " + firstError);
}
}
private static View getContentView(View parent) {
View view = parent.getView(0);
return view.getViewCount() > 0
? getContentView(view)
: view;
}
private static void saveImage(BufferedImage image) {
try {
ImageIO.write(image, "png",
new File("html.png"));
} catch (IOException ignored) { }
}
}

View File

@@ -1,128 +0,0 @@
/*
* Copyright (c) 2024, 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JEditorPane;
import javax.swing.text.View;
import javax.swing.text.html.CSS;
/*
* @test
* @bug 8335967
* @summary Tests 'text-decoration: none' is respected
* @run main HTMLTextDecorationNone
*/
public final class HTMLTextDecorationNone {
private static final String HTML = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>text-decoration: none (&lt;a&gt;)</title>
<style>
a.none { text-decoration: none }
</style>
</head>
<body>
<p><a href="https://openjdk.org/">underlined</a></p>
<p><a href="https://openjdk.org/" style="text-decoration: none">not underlined</a></p>
<p><a href="https://openjdk.org/" class="none">not underlined</a></p>
<p style="text-decoration: underline"><a
href="https://openjdk.org/" style="text-decoration: none">underlined?</a></p>
<p style="text-decoration: underline"><a
href="https://openjdk.org/" class="none">underlined?</a></p>
</body>
</html>
""";
private static final boolean[] underlined = {true, false, false, true, true};
public static void main(String[] args) {
final JEditorPane html = new JEditorPane("text/html", HTML);
html.setEditable(false);
final Dimension size = html.getPreferredSize();
html.setSize(size);
BufferedImage image = new BufferedImage(size.width, size.height,
BufferedImage.TYPE_INT_RGB);
Graphics g = image.createGraphics();
// Paint the editor pane to ensure all views are created
html.paint(g);
g.dispose();
int errorCount = 0;
String firstError = null;
System.out.println("----- Views -----");
final View bodyView = html.getUI()
.getRootView(html)
.getView(1)
.getView(1);
for (int i = 0; i < bodyView.getViewCount(); i++) {
View pView = bodyView.getView(i);
View contentView = getContentView(pView);
Object decorationAttr =
contentView.getAttributes()
.getAttribute(CSS.Attribute.TEXT_DECORATION);
String decoration = decorationAttr == null
? "none" : decorationAttr.toString();
System.out.println(i + ": " + decoration);
if (decoration.contains("underline") != underlined[i]) {
errorCount++;
if (firstError == null) {
firstError = "Line " + i + ": " + decoration + " vs "
+ (underlined[i] ? "underline" : "none");
}
}
}
if (errorCount > 0) {
saveImage(image);
throw new RuntimeException(errorCount + " error(s) found, "
+ "the first one: " + firstError);
}
}
private static View getContentView(View parent) {
View view = parent.getView(0);
return view.getViewCount() > 0
? getContentView(view)
: view;
}
private static void saveImage(BufferedImage image) {
try {
ImageIO.write(image, "png",
new File("html.png"));
} catch (IOException ignored) { }
}
}

View File

@@ -1,129 +0,0 @@
/*
* Copyright (c) 2024, 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JEditorPane;
import javax.swing.text.View;
import javax.swing.text.html.CSS;
/*
* @test
* @bug 8326734
* @summary Tests different combinations of setting 'underline'
* @run main HTMLUnderlineOnly
*/
public class HTMLUnderlineOnly {
private static final String HTML = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>underline</title>
<style>
.underline { text-decoration: underline }
</style>
</head>
<body>
<p><u><span style='text-decoration: underline'>underline?</span></u></p>
<p><span style='text-decoration: underline'><u>underline?</u></span></p>
<p><u><span class="underline">underline?</span></u></p>
<p><span class="underline"><u>underline?</u></span></p>
<p style='text-decoration: underline'><u>underline?</u></p>
<p style='text-decoration: underline'><span style='text-decoration: underline'>underline?</span></p>
<p class="underline"><u>underline</u></p>
<p class="underline"><span style='text-decoration: underline'>underline</span></p>
<p class="underline"><span class="underline">underline</span></p>
</body>
</html>
""";
public static void main(String[] args) {
final JEditorPane html = new JEditorPane("text/html", HTML);
html.setEditable(false);
final Dimension size = html.getPreferredSize();
html.setSize(size);
BufferedImage image = new BufferedImage(size.width, size.height,
BufferedImage.TYPE_INT_RGB);
Graphics g = image.createGraphics();
// Paint the editor pane to ensure all views are created
html.paint(g);
g.dispose();
int errorCount = 0;
String firstError = null;
System.out.println("----- Views -----");
final View bodyView = html.getUI()
.getRootView(html)
.getView(1)
.getView(1);
for (int i = 0; i < bodyView.getViewCount(); i++) {
View pView = bodyView.getView(i);
View contentView = getContentView(pView);
String decoration =
contentView.getAttributes()
.getAttribute(CSS.Attribute.TEXT_DECORATION)
.toString();
System.out.println(i + ": " + decoration);
if (!decoration.contains("underline")
|| decoration.contains("line-through")) {
errorCount++;
if (firstError == null) {
firstError = "Line " + i + ": " + decoration;
}
}
}
if (errorCount > 0) {
saveImage(image);
throw new RuntimeException(errorCount + " error(s) found, "
+ "the first one: " + firstError);
}
}
private static View getContentView(View parent) {
View view = parent.getView(0);
return view.getViewCount() > 0
? getContentView(view)
: view;
}
private static void saveImage(BufferedImage image) {
try {
ImageIO.write(image, "png",
new File("html.png"));
} catch (IOException ignored) { }
}
}

View File

@@ -31,7 +31,7 @@ import javax.swing.text.html.HTMLEditorKit;
/*
* @test
* @bug 8323801 8326734
* @bug 8323801
* @summary Tests that '<u><s>' produce underlined and struck-through text
*/
public final class HTMLUnderlineStrike {

View File

@@ -0,0 +1,178 @@
/*
* Copyright 2025 JetBrains s.r.o.
* 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @summary Verifies that if the machine is equipped with mouse then all the buttons were pressed and released
* @key headful
* @run main/othervm/manual MouseBackForwardButtonsTest
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
public class MouseBackForwardButtonsTest extends JFrame {
static final CompletableFuture<RuntimeException> swingError = new CompletableFuture<>();
public static void main(String[] args) throws InterruptedException, InvocationTargetException, ExecutionException {
final MouseBackForwardButtonsTest frame;
{
final CompletableFuture<MouseBackForwardButtonsTest> frameFuture = new CompletableFuture<>();
SwingUtilities.invokeAndWait(() -> {
try {
final var result = new MouseBackForwardButtonsTest();
result.setVisible(true);
frameFuture.complete(result);
} catch (Throwable err) {
frameFuture.completeExceptionally(err);
}
});
frame = frameFuture.get();
}
try {
final var err = swingError.get();
if (err != null) {
throw err;
}
} finally {
if (frame != null) {
SwingUtilities.invokeAndWait(frame::dispose);
}
}
}
public MouseBackForwardButtonsTest() {
super("Test mouse buttons");
setDefaultCloseOperation(HIDE_ON_CLOSE);
mouseButtonsTextArea = new JTextArea();
mouseButtonsTextArea.setLineWrap(true);
mouseButtonsTextArea.setWrapStyleWord(true);
mouseButtonsTextArea.setText(
"""
INSTRUCTION:
1. Hover mouse cursor over this text area
2. Press each mouse button one by one
3. Verify the accuracy of the displayed information regarding the button pressed.
"""
);
mouseButtonsTextArea.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
final int button = e.getButton();
// On X11, ButtonPress/ButtonRelease native events use the following button indices for different buttons:
// 1: left mouse button
// 2: middle mouse button (the primary wheel)
// 3: right mouse button
// 4, 5: rotations of the primary mouse wheel (depending on the rotation direction)
// 6, 7: rotations of the secondary mouse wheel (it's usually used for horizontal scrolling)
// >= 8: all extra buttons
//
// XToolkit handles them as the following:
// 1, 2, 3: mapped to MouseEvent as-is
// 4, 5: mapped to MouseWheelEvent
// >= 6: mapped to MouseEvent with the button set to 2 less
//
// In other words, MouseEvent.getButton() under XToolkit means the following:
// 1, 2, 3: left mouse button, middle mouse button, right mouse button respectively
// 4, 5: rotations of the secondary mouse wheel
// >= 6: extra buttons
if ("sun.awt.X11.XToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
if (button == MouseEvent.BUTTON1) {
mouseButtonsTextArea.append("-->Left mouse button pressed.\n");
} else if (button == MouseEvent.BUTTON2) {
mouseButtonsTextArea.append("-->Middle mouse button pressed.\n");
} else if (button == MouseEvent.BUTTON3) {
mouseButtonsTextArea.append("-->Right mouse button pressed.\n");
} else if (button == 4) {
mouseButtonsTextArea.append("-->Horizontal scrolling (direction 1).\n");
} else if (button == 5) {
mouseButtonsTextArea.append("-->Horizontal scrolling (direction 2).\n");
} else if (button == 6) {
mouseButtonsTextArea.append("-->Mouse button 6 (Back) pressed.\n");
} else if (button == 7) {
mouseButtonsTextArea.append("-->Mouse button 7 (Forward) pressed.\n");
} else {
mouseButtonsTextArea.append("Other mouse button pressed: " + button + "\n");
}
} else {
if (button == MouseEvent.BUTTON1) {
mouseButtonsTextArea.append("-->Left mouse button pressed.\n");
} else if (button == MouseEvent.BUTTON2) {
mouseButtonsTextArea.append("-->Middle mouse button pressed.\n");
} else if (button == MouseEvent.BUTTON3) {
mouseButtonsTextArea.append("-->Right mouse button pressed.\n");
} else if (button == 4) { // Check for button 4
mouseButtonsTextArea.append("-->Mouse button 4 (Back) pressed.\n");
} else if (button == 5) { // Check for button 5
mouseButtonsTextArea.append("-->Mouse button 5 (Forward) pressed.\n");
} else {
mouseButtonsTextArea.append("Other mouse button pressed: " + button + "\n");
}
}
}
});
mouseButtonsTextArea.setEditable(false);
final JScrollPane mouseButtonTextAreaScrollPane = new JScrollPane(mouseButtonsTextArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
add(mouseButtonTextAreaScrollPane, BorderLayout.CENTER);
final JPanel southContainer = new JPanel(new BorderLayout());
JButton failTestButton = new JButton("FAIL");
JButton passTestButton = new JButton("PASS");
southContainer.add(failTestButton, BorderLayout.LINE_START);
southContainer.add(passTestButton, BorderLayout.LINE_END);
add(southContainer, BorderLayout.SOUTH);
pack();
setSize(400, 250);
setLocationRelativeTo(null);
failTestButton.addActionListener(ignored -> swingError.completeExceptionally(new RuntimeException("The tester has pressed FAILED")));
passTestButton.addActionListener(ignored -> swingError.complete(null));
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
swingError.completeExceptionally(new RuntimeException("The window was closed not through the \"PASS\"/\"FAIL\" buttons"));
}
});
}
private final JTextArea mouseButtonsTextArea;
}

View File

@@ -0,0 +1,120 @@
/*
* Copyright 2026 JetBrains s.r.o.
* Copyright (c) 2026, 2016, 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @key headful
* @summary Tests that nothing prevents windows from being removed from the global list
* after they have been disposed
* @library /javax/swing/regtesthelpers
* @modules java.desktop/sun.awt
* java.desktop/sun.java2d
* @build Util
* @run main/othervm -Xms32M -Xmx32M WLWindowsLeak
*/
import java.awt.Color;
import java.awt.Frame;
import java.awt.Robot;
import java.awt.Window;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import com.sun.management.HotSpotDiagnosticMXBean;
import sun.awt.AppContext;
import sun.java2d.Disposer;
public class WLWindowsLeak {
public static final int WINDOWS_COUNT = 42;
private static volatile boolean disposerPhantomComplete;
public static void main(String[] args) throws Exception {
spawnWindows();
Disposer.addRecord(new Object(), () -> disposerPhantomComplete = true);
while (!disposerPhantomComplete) {
Util.generateOOME();
}
Vector<WeakReference<Window>> windowList =
(Vector<WeakReference<Window>>) AppContext.getAppContext().get(Window.class);
// Note: focusedWindow and activeWindow of class java.awt.KeyboardFocusManager
// may still retain references to the last window shown. This makes the test flaky and
// therefore less useful. Until this is fixed, the test allows for 1 retained window.
if (windowList != null && !windowList.isEmpty() && windowList.size() > 1) {
dumpHeap("heap_dump_live_windows.hprof");
System.out.println("Live window list:");
windowList.forEach(ref -> System.out.println(ref.get()));
throw new RuntimeException("Test FAILED: Window list is not empty: " + windowList.size());
}
System.out.println("Test PASSED");
}
private static void dumpHeap(String filePath) {
try {
HotSpotDiagnosticMXBean mxBean = ManagementFactory
.getPlatformMXBean(HotSpotDiagnosticMXBean.class);
mxBean.dumpHeap(filePath, true); // true = live objects only
System.out.println("Heap dump created at: " + filePath);
} catch (IOException e) {
System.err.println("Failed to dump heap: " + e.getMessage());
}
}
private static void spawnWindows() throws Exception {
List<WeakReference<Frame>> frameList = new ArrayList<>();
Robot r = new Robot();
for (int i = 0; i < WINDOWS_COUNT; i++) {
Frame f = new Frame(String.format("Frame %d", i));
f.setBackground(Color.WHITE);
f.setSize(100, 100);
f.setVisible(true);
frameList.add(new WeakReference<>(f));
Thread.sleep(42);
}
r.waitForIdle();
frameList.forEach(ref -> {
ref.get().setVisible(false);
});
r.waitForIdle();
frameList.forEach(ref -> {
var f = ref.get();
if (f != null) f.dispose();
});
frameList.clear();
r.waitForIdle(); // to make sure no events hold a reference to frames
System.gc();
}
}

View File

@@ -24,11 +24,14 @@
/* @test
* @summary java.io.RandomAccessFileTest uses java.nio.file inside.
* @library testNio
* @compile --enable-preview --source 25 RandomAccessFileTest.java
* @run junit/othervm
* -Djava.nio.file.spi.DefaultFileSystemProvider=testNio.ManglingFileSystemProvider
* -Djava.nio.file.spi.DefaultFileSystemProvider=testNio.ManglingFileSystemProvidera
* -Djbr.java.io.use.nio=true
* --add-opens jdk.unsupported/com.sun.nio.file=ALL-UNNAMED
* --add-opens java.base/java.io=ALL-UNNAMED
* --enable-native-access=ALL-UNNAMED
* --enable-preview
* RandomAccessFileTest
*/
@@ -45,6 +48,9 @@ import testNio.ManglingFileSystemProvider;
import java.io.EOFException;
import java.io.File;
import java.io.RandomAccessFile;
import java.lang.foreign.*;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.VarHandle;
import java.lang.reflect.Field;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
@@ -55,6 +61,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -293,4 +300,122 @@ public class RandomAccessFileTest {
FileSystems.getDefault().provider().newFileChannel(file.toPath(), Collections.singleton(option)).close();
}
}
/**
* JBR-9779
*/
@Test
public void testWindowsPipe() throws Throwable {
Assume.assumeTrue("Windows-only test", System.getProperty("os.name").toLowerCase().startsWith("win"));
// Creating a pipe.
Linker linker = Linker.nativeLinker();
SymbolLookup loader = SymbolLookup.libraryLookup("kernel32", Arena.global());
StructLayout captureLayout = Linker.Option.captureStateLayout();
VarHandle GetLastError = captureLayout.varHandle(MemoryLayout.PathElement.groupElement("GetLastError"));
MethodHandle CreateNamedPipeW = linker.downcallHandle(
loader.find("CreateNamedPipeW").get(),
FunctionDescriptor.of(ValueLayout.JAVA_LONG,
ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT,
ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT, ValueLayout.JAVA_INT,
ValueLayout.ADDRESS),
Linker.Option.captureCallState("GetLastError")
);
MethodHandle ConnectNamedPipe = linker.downcallHandle(
loader.find("ConnectNamedPipe").get(),
FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG, ValueLayout.ADDRESS),
Linker.Option.captureCallState("GetLastError")
);
MethodHandle DisconnectNamedPipe = linker.downcallHandle(
loader.find("DisconnectNamedPipe").get(),
FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG)
);
MethodHandle PeekNamedPipe = linker.downcallHandle(
loader.find("PeekNamedPipe").get(),
FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG,
ValueLayout.ADDRESS, ValueLayout.JAVA_INT, ValueLayout.ADDRESS,
ValueLayout.ADDRESS, ValueLayout.ADDRESS)
);
MethodHandle CloseHandle = linker.downcallHandle(
loader.find("CloseHandle").get(),
FunctionDescriptor.of(ValueLayout.JAVA_INT, ValueLayout.JAVA_LONG)
);
String pipeName = "\\\\.\\pipe\\jbr-test-pipe-" + System.nanoTime();
Arena arena = Arena.ofAuto();
char[] nameChars = (pipeName + "\0").toCharArray(); // `char` on Windows is UTF-16, as WinAPI expects.
MemorySegment pipeWinPath = arena.allocateFrom(ValueLayout.JAVA_CHAR, nameChars);
MemorySegment capturedState = arena.allocate(captureLayout);
final long INVALID_HANDLE_VALUE = -1L;
long hPipe = (long) CreateNamedPipeW.invokeExact(
capturedState,
pipeWinPath,
0x00000003, // dwOpenMode = PIPE_ACCESS_DUPLEX
0x00000000, // dwPipeMode = PIPE_TYPE_BYTE
1, // nMaxInstances. Limit to 1 to force ERROR_PIPE_BUSY.
1024, // nOutBufferSize
1024, // nInBufferSize
0, // nDefaultTimeOut
MemorySegment.NULL // lpSecurityAttributes
);
if (hPipe == INVALID_HANDLE_VALUE) {
int errorCode = (int) GetLastError.get(capturedState);
throw new Exception("CreateNamedPipeW failed: " + errorCode);
}
AtomicBoolean keepRunning = new AtomicBoolean(true);
Thread serverThread = new Thread(() -> {
// This server accepts a connection and does nothing until the client disconnects explicitly.
try {
int i = 0;
while (keepRunning.get()) {
int connected = (int) ConnectNamedPipe.invokeExact(capturedState, hPipe, MemorySegment.NULL);
if (connected == 0) {
int errorCode = (int) GetLastError.get(capturedState);
// https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
if (errorCode == 6 && !keepRunning.get()) { // ERROR_INVALID_HANDLE
break;
}
throw new Exception("ConnectNamedPipe failed: " + errorCode);
}
try {
int peekResult;
do {
// Random timeout. The timeout must be big enough to reveal possible consequent
// attempts to connect to the pipe.
Thread.sleep(1000);
// Check if the pipe is still connected by peeking at it.
peekResult = (int) PeekNamedPipe.invokeExact(hPipe, MemorySegment.NULL, 0,
MemorySegment.NULL, MemorySegment.NULL, MemorySegment.NULL);
}
while (keepRunning.get() && peekResult != 0);
} finally {
int disconnected = (int) DisconnectNamedPipe.invokeExact(hPipe);
}
}
} catch (Throwable e) {
e.printStackTrace();
}
});
serverThread.setDaemon(true);
serverThread.start();
try {
new RandomAccessFile(pipeName, "rw").close();
} finally {
keepRunning.set(false);
int closed = (int) CloseHandle.invokeExact(hPipe);
}
}
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2025 JetBrains s.r.o.
* 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JWindow;
import javax.swing.SwingUtilities;
import java.awt.GridLayout;
import java.awt.Window;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.util.concurrent.CompletableFuture;
/**
* @test
* @summary Verifies popups can be located regardless of the screen edge proximity
* @requires os.family == "linux"
* @key headful
* @modules java.desktop/sun.awt
* @run main/manual WLPopupUnconstrained
*/
public class WLPopupUnconstrained {
static final CompletableFuture<RuntimeException> swingError = new CompletableFuture<>();
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(WLPopupUnconstrained::showUI);
swingError.get();
}
private static void showUI() {
JFrame frame = new JFrame("Unconstrained popup test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel label = new JLabel("Right-click here for a popup.");
JPanel popupContents = new JPanel();
popupContents.add(new JLabel("test popup"));
JWindow popup = new JWindow(frame);
popup.setType(Window.Type.POPUP);
sun.awt.AWTAccessor.getWindowAccessor().setPopupParent(popup, label);
popup.getRootPane().putClientProperty("wlawt.popup_position_unconstrained", Boolean.TRUE);
popup.setSize(300, 250);
popup.add(popupContents);
label.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
if (e.isPopupTrigger()) {
popup.setLocation(e.getX(), e.getY());
popup.setVisible(true);
} else {
popup.setVisible(false);
}
}
});
JPanel content = new JPanel();
var layout = new GridLayout(3, 2, 10, 10);
content.setLayout(layout);
content.add(new JLabel("<html><h1>INSTRUCTIONS</h1>" +
"<p>Locate this window close to the bottom-right edge of the screen.</p>" +
"<p>Make the popup appear (on the right) such that it is partially outside the screen.</p>" +
"<p>Press Pass iff the popup indeed crossed the screen edge.</p>" +
"<p>Otherwise press Fail.</p></html>"));
content.add(label);
JButton passButton = new JButton("Pass");
passButton.addActionListener(e -> {swingError.complete(null);});
JButton failButton = new JButton("Fail");
failButton.addActionListener(e -> {swingError.completeExceptionally(new RuntimeException("The tester has pressed FAILED"));});
content.add(failButton);
content.add(passButton);
frame.setContentPane(content);
frame.pack();
frame.setVisible(true);
}
}

View File

@@ -53,6 +53,7 @@ javax/swing/JFileChooser/4966171/bug4966171.java JBR-8855 windows-x64
javax/swing/JFileChooser/bug4759934.java JBR-9711 windows-x64
javax/swing/JFileChooser/FileChooserListenerLeak.java JBR-8855 windows-x64
javax/swing/JFileChooser/JFileChooserFontReset.java JBR-8855 windows-x64
javax/swing/JFileChooser/JFileChooserSetLocationTest.java JBR-9702 windows-x64
javax/swing/JInternalFrame/Test6505027.java nobug macosx-all,linux-all,windows-all
javax/swing/JMenuBar/MenuBarRTLBug.java JBR-7385 windows-x64
javax/swing/JPopupMenu/4634626/bug4634626.java nobug macosx-all,linux-all,windows-all
@@ -183,6 +184,7 @@ java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java JB
java/awt/Frame/DisabledParentOfToplevel.java JBR-9092 windows-x64
java/awt/Frame/DisposeStressTest/DisposeStressTest.java JBR-7331 windows-all
java/awt/Frame/FramesGC/FramesGC.java JBR-6057 windows-x64
java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-9887 windows-10.0
java/awt/Frame/WindowDragTest/WindowDragTest.java JBR-5505 windows-all
java/awt/FullScreen/MultimonFullscreenTest/MultimonDeadlockTest.java JBR-5505 windows-all
java/awt/hidpi/DrawOnFrameGraphicsTest.java JBR-5505 windows-all

View File

@@ -112,21 +112,21 @@
############################################################################
java/awt/dnd/RemoveDropTargetCrashTest/RemoveDropTargetCrashTest.java JBR-8960 windows-x64
java/awt/Focus/ModalDialogInFocusEventTest.java JBR-7818 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws,linux-6.14.0-1014-aws,linux-6.14.0-1015-aws
java/awt/Focus/ModalDialogInFocusEventTest.java JBR-7818 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws,linux-6.14.0-1014-aws,linux-6.14.0-1015-aws,linux-6.14.0-1017-aws,linux-6.14.0-1018-aws
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-8542 windows-all timeout
java/awt/Graphics2D/TextPerf.java JBR-8541 linux-all,windows-all
java/awt/GridBagLayout/ComponentShortage.java 8355280,JBR-9347 windows-all,linux-all,macosx-x64
java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogTest/EnqueueWithDialogTest.java JBR-7077 linux-all,windows-all
java/awt/MenuItem/EnableTest.java JBR-8543 windows-all timeout
java/awt/Modal/MultipleDialogs/MixOfModalAndNonModalDialogs.java JBR-9317 linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/Robot/NonEmptyErrorStream.java JBR-6275,JBR-8299,JBR-9259 macosx-all,linux-aarch64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Modal/MultipleDialogs/MixOfModalAndNonModalDialogs.java JBR-9317 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/Robot/NonEmptyErrorStream.java JBR-6275,JBR-8299,JBR-9259 macosx-all,linux-aarch64
javax/swing/border/TestTitledBorderLeak.java JBR-9272 macosx-14.8
javax/swing/JButton/TestMnemonicAction.java JBR-6508 windows-all,linux-all,macosx-all
javax/swing/JComboBox/8072767/bug8072767.java JBR-5540 windows-all,macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java JBR-7404 macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentGradient.java JBR-9446 macosx-all
javax/swing/plaf/synth/7158712/bug7158712.java 8322653,JBR-9061 macosx-all,linux-6.8.0-1033-aws,linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws
javax/swing/plaf/synth/7158712/bug7158712.java 8322653,JBR-9061 macosx-all,linux-6.8.0-1033-aws,linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-6274 windows-all,macosx-all
jb/build/ResolveSymbolsTest/ResolveSymbolsRealEnv.java JBR-8544 linux-all

View File

@@ -6,6 +6,7 @@ java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java JBR-6294 linux-al
java/awt/dnd/MissedDragEnterTest.java JBR-6091 windows-all
java/awt/event/ComponentEvent/TextComponentTextEventTest.java JBR-7141 windows-x64
java/awt/Focus/FocusKeepTest.java JBR-8874 windows-x64
java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java JBR-9846 windows-10.0
java/awt/Frame/FramesGC/FramesGC.java 8079069,JBR-6057 macosx-all,windows-all
java/awt/FullScreen/CurrentDisplayModeTest/CurrentDisplayModeTest.java JBR-5059 linux-all
java/awt/FullScreen/MultimonFullscreenTest/MultimonDeadlockTest.java JBR-4379 windows-all
@@ -15,6 +16,7 @@ java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java JBR-6336 macosx-
java/awt/GraphicsDevice/IncorrectDisplayModeExitFullscreen.java JBR-6336 macosx-all
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-5117 linux-all
java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedTest.java JBR-8905 windows-x64
java/awt/MenuShortcut/ActionCommandTest.java JBR-8822 windows-10.0
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java#id1 JBR-5442 linux-all
java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java 8253184,JBR-5442 windows-all,linux-all
java/awt/MouseInfo/MultiscreenPointerInfo.java JBR-5442 linux-all
@@ -47,80 +49,61 @@ javax/swing/JTextArea/8149849/DNDTextToScaledArea.java JBR-6296 linux-all
javax/swing/JTextField/8036819/bug8036819.java JBR-6065 windows-all
javax/swing/JTree/4927934/bug4927934.java JBR-6065 windows-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-5442 linux-all
javax/swing/plaf/metal/MetalGradient/8163193/ButtonGradientTest.java 8253184,JBR-5510,JBR-5442 windows-all,linux-all
javax/swing/plaf/metal/MetalGradient/8163193/ButtonGradientTest.java 8253184,JBR-5442 windows-all,linux-all
javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java JBR-5442 linux-all
javax/swing/text/html/StyleSheet/bug4936917.java JBR-899,JBR-5510,JBR-5442 windows-all,linux-all
javax/swing/text/html/StyleSheet/bug4936917.java JBR-899,JBR-5442 windows-all,linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-5442 windows-x64,linux-all
java/awt/Choice/ChoiceGeneratesItemEvents.java JBR-551 linux-all
java/awt/Choice/ChoiceStaysOpenedOnTAB.java JBR-5510 linux-all
java/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents.java JBR-5510 linux-all
java/awt/ColorClass/AlphaColorTest.java JBR-5510 linux-all
java/awt/Component/RepaintTest.java JBR-5510 linux-all
java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java JBR-5210,JBR-5510 windows-all,linux-all
java/awt/dnd/DnDTestWithHIDPI/DragTestWithHIDPI.java NOBUG linux-all
java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-5510 linux-all
java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java JBR-5210 windows-all,linux-all
java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java JBR-5210 windows-all
java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java JBR-5210 windows-all
java/awt/grab/SystemMenuTest.java JBR-8829 windows-x64
java/awt/Graphics/XORPaint.java#id2 NOBUG linux-all
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354 macosx-all,windows-all,linux-all
java/awt/image/multiresolution/MenuMultiresolutionIconTest.java JBR-4880,8253184,JBR-5510 windows-all,linux-all
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184,JBR-5510 windows-all,linux-all
java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java JBR-5510 linux-all
java/awt/Mixing/AWT_Mixing/JButtonInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JButtonOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JColorChooserOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405,JBR-5510 macosx-all,linux-all
java/awt/Mixing/AWT_Mixing/JEditorPaneInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JEditorPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java JBR-5510 linux-all
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-5510 linux-all
java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JInternalFrameOverlapping.java JBR-5510 linux-all
java/awt/Mixing/AWT_Mixing/JLabelInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JLabelOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JListInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JListOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JPanelInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JPanelOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java JBR-5210,8049405,JBR-5510 windows-all,macosx-all,linux-all
java/awt/Mixing/AWT_Mixing/JProgressBarInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JProgressBarOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JScrollBarInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JScrollBarOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JScrollPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JSliderInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JSliderOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JSpinnerInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JSpinnerOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JTableOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JTextAreaOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JTextFieldOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JToggleButtonInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JToggleButtonOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java 8158801,JBR-5510 windows-all,linux-all
java/awt/Modal/BlockedMouseInputTest.java NOBUG linux-all
java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java 8066259,8253184,JBR-5510 macosx-all,windows-all,linux-all
java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665,8253184,JBR-5510 macosx-all,windows-all,linux-all
java/awt/Paint/PaintNativeOnUpdate.java 8253184,JBR-5510 windows-all,linux-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184,NOBUG windows-all,linux-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java NOBUG linux-all
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java JBR-5510 linux-all
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-5510 linux-all
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8253184,JBR-5510 windows-all,linux-all
java/awt/Window/ShapedAndTranslucentWindows/SetShape.java 8253184,JBR-5510 windows-all,linux-all
java/awt/Window/WindowTitleVisibleTest/WindowTitleVisibleTestLinuxGnome.java NOBUG linux-all
java/awt/image/multiresolution/MenuMultiresolutionIconTest.java JBR-4880,8253184 windows-all
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184 windows-all
java/awt/Mixing/AWT_Mixing/JButtonInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JButtonOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JColorChooserOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405 macosx-all,linux-all
java/awt/Mixing/AWT_Mixing/JEditorPaneInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JEditorPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109 windows-all,linux-all
java/awt/Mixing/AWT_Mixing/JLabelInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JLabelOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JListInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JListOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JPanelInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JPanelOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java JBR-5210,8049405 windows-all,macosx-all,linux-all
java/awt/Mixing/AWT_Mixing/JProgressBarInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JProgressBarOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JScrollBarInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JScrollBarOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JScrollPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JSliderInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JSliderOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JSpinnerInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JSpinnerOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JTableOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JTextAreaOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JTextFieldOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JToggleButtonInGlassPaneOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/JToggleButtonOverlapping.java 8158801 windows-all
java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java 8158801 windows-all
java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java 8066259,8253184 macosx-all,windows-all
java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665,8253184 macosx-all,windows-all
java/awt/Paint/PaintNativeOnUpdate.java 8253184 windows-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184 windows-all
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8253184 windows-all
java/awt/Window/ShapedAndTranslucentWindows/SetShape.java 8253184 windows-all
javax/swing/JButton/bug4323121.java JBR-8924 windows-x64
javax/swing/JButton/bug4490179.java JBR-8925 windows-x64
javax/swing/JButton/8151303/PressedIconTest.java JBR-5210,JBR-5510 windows-all,linux-all
javax/swing/JButton/8151303/PressedIconTest.java JBR-5210 windows-all
javax/swing/JComboBox/6559152/bug6559152.java JBR-8964 windows-all
javax/swing/JComponent/7154030/bug7154030.java JBR-5510 linux-all
javax/swing/JDialog/Transparency/TransparencyTest.java 8253184,JBR-5510 windows-all,linux-all
javax/swing/JEditorPane/TestBrowserBGColor.java JBR-5510 linux-all
javax/swing/JDialog/Transparency/TransparencyTest.java 8253184 windows-all
javax/swing/JFileChooser/4400728/JFileChooserDefaultDirectoryTest.java JBR-8534 windows-x64
javax/swing/JFileChooser/4847375/bug4847375.java JBR-8534 windows-x64
javax/swing/JFileChooser/4966171/bug4966171.java JBR-8534 windows-x64
@@ -128,29 +111,15 @@ javax/swing/JFileChooser/6520101/bug6520101.java JBR-7413 windows-x64
javax/swing/JFileChooser/8013442/Test8013442.java JBR-8534 windows-x64
javax/swing/JFileChooser/FileChooserListenerLeak.java JBR-8534 windows-x64
javax/swing/JFileChooser/JFileChooserFontReset.java JBR-8534 windows-x64
javax/swing/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-5510,JBR-6160 linux-all
javax/swing/JInternalFrame/5066752/bug5066752.java 8253184,JBR-5510 windows-all,linux-all
javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java JBR-5510 linux-all
javax/swing/JMenu/JMenuSelectedColorTest.java JBR-5510 linux-all
javax/swing/JMenu/TestDisabledMenuForegroundColor.java JBR-5510 linux-all
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-5510 linux-all
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-5510 linux-all
javax/swing/JRadioButton/8041561/bug8041561.java JBR-5510 linux-all
javax/swing/JSlider/TestJSliderRendering.java JBR-5510 linux-all
javax/swing/JSpinner/4670051/DateFieldUnderCursorTest.java JBR-5510 linux-all
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-5510 linux-all
javax/swing/JSplitPane/4820080/JSplitPaneDragColorTest.java JBR-5510 linux-all
javax/swing/JSplitPane/4885629/bug4885629.java JBR-5510 linux-all
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java JBR-5510 linux-all
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-5510 linux-all
javax/swing/JTree/TestTreeBackgroundColor.java JBR-5510 linux-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java 8253184,JBR-5510 windows-all,linux-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 8194128,8253184,JBR-5510 macosx-all,windows-all,linux-all
javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java 8253184,JBR-5510 windows-all,linux-all
javax/swing/plaf/nimbus/8041642/bug8041642.java 8253184,JBR-5510 windows-all,linux-all
javax/swing/text/html/CSS/4530474/bug4530474.java JBR-5510,JBR-5951 linux-all,windows-x64
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312,JBR-5510 windows-all,macosx-all,linux-all
sanity/client/SwingSet/src/EditorPaneDemoTest.java JBR-5510 linux-all
sanity/client/SwingSet/src/FileChooserDemoTest.java JBR-8534 windows-x64
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5510 linux-all
javax/swing/JInternalFrame/5066752/bug5066752.java 8253184 windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java 8253184 windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 8194128,8253184 macosx-all,windows-all
javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java 8253184 windows-all
javax/swing/plaf/nimbus/8041642/bug8041642.java 8253184 windows-all
javax/swing/text/html/CSS/4530474/bug4530474.java JBR-5951 windows-x64
jb/java/awt/Focus/RequestFocusInParent.java JBR-9843 windows-10.0
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312 windows-all,macosx-all
sanity/client/SwingSet/src/FileChooserDemoTest.java JBR-8534 windows-x64

View File

@@ -128,7 +128,7 @@ java/awt/event/StressTest/MouseAndKeyEventStressTest.java JBR-6479 generic-all
java/awt/FileDialog/8003399/bug8003399.java JBR-6930 windows-all
java/awt/FlowLayout/PreferredLayoutSize.java JBR-6349 linux-all
java/awt/Focus/EmptyWindowKeyTest.java JBR-7913 windows-all
java/awt/Focus/FocusKeepTest.java JBR-9487 linux-6.8.0-1040-aws
java/awt/Focus/FocusKeepTest.java JBR-9487 linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java JBR-5178 windows-all
java/awt/Focus/FocusTransitionTest/FocusTransitionTest.java JBR-5809 linux-all
@@ -136,7 +136,7 @@ java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayout
java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-all
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
java/awt/Focus/InactiveFocusRace.java 8023263,JBR-8586 linux-all,windows-x64
java/awt/Focus/InputVerifierTest3/InputVerifierTest3.java JBR-7311 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws
java/awt/Focus/InputVerifierTest3/InputVerifierTest3.java JBR-7311 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
java/awt/Focus/LabelScrollBarFocus.java JBR-8027 linux-all
@@ -208,7 +208,7 @@ java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150,JBR-4880,825318
java/awt/grab/GrabOnUnfocusableToplevel/GrabOnUnfocusableToplevel.java JBR-4880 windows-all
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
java/awt/MenuBar/8007006/bug8007006.java JBR-9213 macosx-26.0
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-9207 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-9207 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405,8253184 generic-all
java/awt/Mixing/AWT_Mixing/MixingFrameResizing.java 8049405,8253184 generic-all
java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8294264 windows-x64
@@ -342,7 +342,7 @@ java/awt/Window/ShapedAndTranslucentWindows/ShapedTranslucentWindowClick.java 80
java/awt/Window/ShapedAndTranslucentWindows/TranslucentChoice.java 8253184 windows-all
java/awt/Window/ShapedAndTranslucentWindows/TranslucentWindowClick.java 8253184 windows-all
java/awt/Window/setLocRelativeTo/SetLocationRelativeToTest.java 8253184 windows-all
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-9192 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-9192 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8253184,JBR-6463 windows-all,linux-all
java/awt/Window/ShapedAndTranslucentWindows/FocusAWTTest.java 8222328 windows-all,linux-all,macosx-all
java/awt/Window/ShapedAndTranslucentWindows/Shaped.java 8222328 windows-all,linux-all,macosx-all
@@ -380,7 +380,7 @@ java/awt/image/multiresolution/MultiresolutionIconTest.java 8252812 windows-all,
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184 windows-all
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all
sun/awt/font/TestArabicHebrew.java JBR-8826,JBR-9210 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
sun/awt/font/TestArabicHebrew.java JBR-8826,JBR-9210 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8301177 generic-all
sun/java2d/DirectX/OpaqueImageToSurfaceBlitTest/OpaqueImageToSurfaceBlitTest.java JBR-5393 windows-aarch64
@@ -390,8 +390,8 @@ sun/java2d/DirectX/RenderingToCachedGraphicsTest/RenderingToCachedGraphicsTest.j
java/awt/Graphics/GDIResourceExhaustionTest.java JBR-8719 linux-5.18.2-arch1-1
java/awt/Graphics/NativeWin32Clear.java JBR-8689 linux-aarch64,linux-5.18.2-arch1-1
java/awt/Graphics/XORPaint.java#id1 JBR-8642 macosx-aarch64
java/awt/Graphics/XORPaint.java#id2 JBR-9348 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354,JBR-9206 macosx-all,windows-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/Graphics/XORPaint.java#id2 JBR-9348 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354,JBR-9206 macosx-all,windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/Graphics2D/DrawString/DisposerTest.java JBR-5010 linux-aarch64
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8297175 linux-all
@@ -439,7 +439,7 @@ java/awt/Frame/MiscUndecorated/FrameCloseTest.java JBR-5210 windows-all
java/awt/Frame/MiscUndecorated/RepaintTest.java 8266244,JBR-5786 macosx-aarch64,generic-all
java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java 8253184 windows-all
java/awt/Robot/InfiniteLoopException.java 8342638 windows-all,linux-all
java/awt/Robot/NonEmptyErrorStream.java JBR-8299,JBR-9259 linux-aarch64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Robot/NonEmptyErrorStream.java JBR-8299,JBR-9259 linux-aarch64
java/awt/Robot/RobotExtraButton/RobotExtraButton.java JBR-6554 linux-all
java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 7186009,8253184 macosx-all,windows-all
java/awt/Modal/FileDialog/FileDialogAppModal2Test.java 7186009,8253184 macosx-all,windows-all
@@ -584,7 +584,7 @@ java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal1Test.java 825318
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal2Test.java 8253184,8196432 windows-all,linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal3Test.java 8253184 windows-all
java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java 8253184,JBR-6302 windows-all,linux-all
java/awt/Modal/MultipleDialogs/MixOfModalAndNonModalDialogs.java JBR-9317 linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/Modal/MultipleDialogs/MixOfModalAndNonModalDialogs.java JBR-9317 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/Modal/MultipleDialogs/MultipleDialogs1Test.java 8198665,8253184 macosx-all,windows-all
java/awt/Modal/MultipleDialogs/MultipleDialogs2Test.java 8198665,8253184 macosx-all,windows-all
java/awt/Modal/MultipleDialogs/MultipleDialogs3Test.java 8198665,8253184 macosx-all,windows-all,linux-all
@@ -593,7 +593,7 @@ java/awt/Modal/MultipleDialogs/MultipleDialogs5Test.java 8198665,8253184 macosx-
java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326,8253184,JBR-6305 macosx-all,windows-all,linux-x64
java/awt/Mouse/EnterExitEvents/DragWindowTest.java 8253184 windows-all
java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java 8253184,JBR-5811 windows-all,linux-all
java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021,8253184,JBR-9208 macosx-all,windows-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021,8253184,JBR-9208 macosx-all,windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java 8051455 macosx-all
java/awt/Mouse/ExtraMouseClick/ExtraMouseClick.java 8253184,JBR-5709 windows-all,linux-all
java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java 8253184,JBR-6752 windows-all,linux-all
@@ -728,8 +728,8 @@ java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java 8253184 windows-all
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 linux-all,windows-all
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java 8164473 linux-all
java/awt/Frame/DecoratedFrameInsets/DecoratedFrameInsetsTest.java JBR-5205,JBR-9204 linux-5.4.0-1103-aws,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/Frame/DynamicLayout/DynamicLayout.java JBR-9205 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/Frame/DecoratedFrameInsets/DecoratedFrameInsetsTest.java JBR-5205,JBR-9204 linux-5.4.0-1103-aws,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/Frame/DynamicLayout/DynamicLayout.java JBR-9205 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223,8274106 macosx-all,linux-all,windows-all
java/awt/GraphicsDevice/DisplayModes/ExtraAllocationTest.java JBR-6384 macosx-all
@@ -753,7 +753,7 @@ java/awt/Paint/bug8024864.java JBR-6544 generic-all
java/awt/Paint/ComponentIsNotDrawnAfterRemoveAddTest/ComponentIsNotDrawnAfterRemoveAddTest.java 8253184,JBR-6844 windows-all,linux-5.18.2-arch1-1
java/awt/Paint/ListRepaint.java JBR-5060 linux-all
java/awt/Paint/PaintNativeOnUpdate.java 8253184 windows-all
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-7035,JBR-9251 windows-all,macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-7035,JBR-9251 windows-all,macosx-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/GridBagLayout/ComponentShortage.java 8355280 windows-all,linux-all
java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java 8253184 windows-all
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720,8322653 windows-all,macosx-all
@@ -841,9 +841,9 @@ com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all
java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java 8247426 generic-all
sun/management/jdp/JdpDefaultsTest.java 8241865,JBR-9229 linux-aarch64,macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8241865,JBR-9229 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
sun/management/jdp/JdpSpecificAddressTest.java 8241865,JBR-9229 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
sun/management/jdp/JdpDefaultsTest.java 8241865,JBR-9229 linux-aarch64,macosx-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8241865,JBR-9229 macosx-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
sun/management/jdp/JdpSpecificAddressTest.java 8241865,JBR-9229 macosx-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.java JBR-8707 windows-all
sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id0 JBR-8707 windows-all
@@ -886,16 +886,16 @@ java/net/MulticastSocket/Test.java 7145658 macosx-a
java/nio/channels/AsyncCloseAndInterrupt.java 8368290 macosx-26.0
java/nio/channels/AsynchronousSocketChannel/StressLoopback.java JBR-8817 windows-aarch64
java/nio/channels/DatagramChannel/AdaptorMulticasting.java 8144003,JBR-8455,JBR-8456,8308807,JBR-9219 macosx-all,aix-ppc64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/nio/channels/DatagramChannel/AdaptorMulticasting.java 8144003,JBR-8455,JBR-8456,8308807,JBR-9219 macosx-all,aix-ppc64,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/nio/channels/DatagramChannel/BasicMulticastTests.java 8144003 macosx-all
java/nio/channels/DatagramChannel/Loopback.java JBR-9219 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/nio/channels/DatagramChannel/Loopback.java JBR-9219 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/nio/channels/DatagramChannel/ManySourcesAndTargets.java 8264385 macosx-aarch64
java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java 8144003,JBR-9218 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/nio/channels/DatagramChannel/Promiscuous.java 8144003,JBR-9218 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/nio/channels/DatagramChannel/PromiscuousIPv6.java JBR-8828,JBR-9218 macosx-x64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/nio/channels/DatagramChannel/SendReceiveMaxSize.java JBR-9447 linux-6.14.0-1013-aws,linux-6.14.0-1014-aws,linux-6.14.0-1015-aws
java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java 8144003,JBR-9218 macosx-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/nio/channels/DatagramChannel/Promiscuous.java 8144003,JBR-9218 macosx-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/nio/channels/DatagramChannel/PromiscuousIPv6.java JBR-8828,JBR-9218 macosx-x64,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/nio/channels/DatagramChannel/SendReceiveMaxSize.java JBR-9447 linux-6.14.0-1013-aws,linux-6.14.0-1014-aws,linux-6.14.0-1015-aws,linux-6.14.0-1017-aws,linux-6.14.0-1018-aws
java/nio/channels/DatagramChannel/Unref.java 8233437 generic-all
java/nio/channels/FileChannel/LargeGatheringWrite.java JBR-9316 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/nio/channels/FileChannel/LargeGatheringWrite.java JBR-9316 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/nio/channels/Selector/LotsOfInterrupts.java#virtual JBR-8940 windows-aarch64
java/nio/channels/Selector/Wakeup.java 6963118 windows-all
@@ -1043,7 +1043,7 @@ javax/swing/DataTransfer/bug4655513.java JBR-8849 windows-aarch64,windows-10.0
javax/swing/DefaultButtonModel/DefaultButtonModelCrashTest.java JBR-5210,JBR-5799 windows-all
javax/swing/dnd/7171812/bug7171812.java 8253184 windows-all
javax/swing/dnd/8139050/NativeErrorsInTableDnD.java 8202765,JBR-5210 macosx-all,linux-all,windows-all
javax/swing/GraphicsConfigNotifier/StalePreferredSize.java JBR-5210,JBR-9273 windows-all,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
javax/swing/GraphicsConfigNotifier/StalePreferredSize.java JBR-5210,JBR-9273 windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
javax/swing/JButton/4368790/bug4368790.java JBR-5210 windows-all
javax/swing/JButton/4659800/SpaceKeyActivatesButton.java JBR-4949 linux-all,windows-all
javax/swing/JButton/8151303/PressedIconTest.java JBR-5210 windows-all
@@ -1077,7 +1077,7 @@ javax/swing/JDialog/Transparency/TransparencyTest.java 8253184 windows-all
javax/swing/JFrame/MaximizeWindowTest.java 8321289,JBR-8292 linux-all
javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java JBR-8837 macosx-all
javax/swing/JLabel/4138746/JLabelMnemonicsTest.java JBR-4949 linux-all,windows-all
javax/swing/JLabel/6596966/bug6596966.java JBR-9195,JBR-9507 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,windows-10.0
javax/swing/JLabel/6596966/bug6596966.java JBR-9507 windows-10.0
javax/swing/JLabel/7004134/bug7004134.java JBR-5437 linux-all
javax/swing/JLabel/bug4822331.java JBR-7422 windows-all
javax/swing/JList/6462008/bug6462008.java JBR-8063 windows-all
@@ -1091,7 +1091,6 @@ javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java JBR-5799,JBR-6306 windo
javax/swing/JMenu/bug4140643.java JBR-8489 windows-all
javax/swing/JMenu/PopupReferenceMemoryLeak.java JBR-5890,JBR-6056 windows-aarch64,windows-x64
javax/swing/JMenuBar/TestMenuMnemonic.java JBR-7301 windows-all
javax/swing/JMenuBar/TestMenuMnemonicLinuxAndMac.java JBR-7927,JBR-9416 linux-5.15.0-1080-aws,linux-5.15.0-1083-aws,linux-5.15.0-1084-aws,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
javax/swing/JMenuBar/4750590/bug4750590.java JBR-6094 windows-all
javax/swing/JMenuItem/4171437/bug4171437.java JBR-6112 windows-all
javax/swing/JMenuItem/4654927/bug4654927.java JBR-164,JBR-4337 windows-all,linux-all
@@ -1118,7 +1117,6 @@ javax/swing/JWindow/ShapedAndTranslucentWindows/SetShapeAndClickSwing.java 80134
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java 8024627,8253184 macosx-all,windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java JBR-8327 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.5,macosx-15.6,macosx-15.6.1,macosx-15.7,macosx-15.7
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentWindowClickSwing.java 8253184 windows-all
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-9202 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
# The next test below is an intermittent failure
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
javax/swing/JTree/4330357/bug4330357.java 8253184,JBR-6466 windows-all,linux-all
@@ -1156,10 +1154,9 @@ javax/swing/JTabbedPane/TestJTabbedPaneBackgroundColor.java JBR-8493 macosx-15.4
javax/swing/JToggleButton/TestSelectedKey.java JBR-5846 windows-all
javax/swing/JToolBar/4529206/bug4529206.java JBR-5387 linux-all
javax/swing/JToolTip/6219960/bug6219960.java 8253184 windows-all
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-9201 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
javax/swing/text/AbstractDocument/8190763/TestCCEOnEditEvent.java JBR-5799,JBR-8290 windows-all,linux-all
javax/swing/text/Caret/TestCaretPosition.java linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
javax/swing/text/Caret/TestCaretPosition.java linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64,linux-6.17.12-300.fc43.x86_64,linux-6.18.4-200.fc43.x86_64,linux-6.17.12-300.fc43.aarch64,linux-6.18.4-200.fc43.aarch64
javax/swing/text/TableView/TableViewLayoutTest.java 8194936,JBR-4316 linux-all
javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
javax/swing/JComboBox/4515752/DefaultButtonTest.java JBR-5799 windows-all
@@ -1172,9 +1169,9 @@ javax/swing/JInternalFrame/6288609/TestJInternalFrameDispose.java JBR-788 window
javax/swing/JInternalFrame/6647340/bug6647340.java 8253184 windows-all
javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java JBR-788 windows-all,linux-all
javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java JBR-5539 windows-all
javax/swing/JInternalFrame/JInternalFrameTest.java JBR-9193 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
javax/swing/JInternalFrame/JInternalFrameTest.java JBR-9193 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64,linux-6.17.12-300.fc43.x86_64,linux-6.18.4-200.fc43.x86_64,linux-6.17.12-300.fc43.aarch64,linux-6.18.4-200.fc43.aarch64
javax/swing/JInternalFrame/Test6325652.java JBR-6111,JBR-9194 windows-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
javax/swing/JInternalFrame/Test6325652.java JBR-6111,JBR-9194 windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64,linux-6.17.12-300.fc43.x86_64,linux-6.18.4-200.fc43.x86_64,linux-6.17.12-300.fc43.aarch64,linux-6.18.4-200.fc43.aarch64
javax/swing/JInternalFrame/Test6505027.java JBR-5954 linux-all,macosx-all
javax/swing/JInternalFrame/Test6802868.java 8253184 windows-all
javax/swing/JPopupMenu/4634626/bug4634626.java 8253184 windows-all
@@ -1203,14 +1200,14 @@ javax/swing/text/GlyphPainter2/6427244/bug6427244.java JBR-896,JBR-6760 windows-
javax/swing/text/JTextComponent/5074573/bug5074573.java CODETOOLS-7901623,JBR-5386 windows-all,linux-all
javax/swing/text/JTextComponent/6361367/bug6361367.java JBR-521 windows-all
javax/swing/text/View/8014863/bug8014863.java JBR-5541 windows-all,linux-all
javax/swing/text/View/8048110/bug8048110.java JBR-9256,JBR-9207 windows-all,linux-6.16.7-100.fc41.x86_64
javax/swing/text/View/8048110/bug8048110.java JBR-9256,JBR-9207 windows-all
javax/swing/text/View/8156217/FPMethodCalledTest.java JBR-5542 linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952 windows-all
java/awt/Robot/CheckCommonColors/CheckCommonColors.java 8253184 windows-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184 windows-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184 windows-all
java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java JBR-5802 windows-all
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-9209 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-9209 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312 windows-all,macosx-all
@@ -1349,7 +1346,6 @@ javax/swing/JFileChooser/6698013/bug6698013.java 8024419 macosx-all
javax/swing/JColorChooser/8065098/bug8065098.java 8065647 macosx-all
java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all
javax/swing/JTabbedPane/4666224/bug4666224.html 8144124 macosx-all
javax/swing/JTextArea/4697612/bug4697612.java JBR-9200 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
javax/swing/JTextArea/7049024/bug7049024.java JBR-5836 linux-all
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java 8253184 windows-all
java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 8162380,JBR-4207 generic-all,windows-all
@@ -1477,7 +1473,7 @@ jb/java/awt/wayland/VulkanBlitTest.java JBR-8394 linux-5.18.2-arch1-1,linux-5.15
jb/java/awt/wayland/VulkanCompositeTest.java JBR-8394 linux-5.18.2-arch1-1,linux-5.15.0-1081-aws,linux-5.15.0-1083-aws,linux-5.15.0-1084-aws
jb/java/awt/wayland/VulkanGCCompatibilityTest.java JBR-8394 linux-5.18.2-arch1-1
jb/java/awt/wayland/VulkanMaskFillTest.java JBR-8394 linux-5.18.2-arch1-1
jb/java/io/IoOverNio/FileTest.java JBR-8723 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
jb/java/io/IoOverNio/FileTest.java JBR-8723 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
javax/swing/text/StyledEditorKit/bug4329418.java
jb/java/jcef/HandleJSQueryTest3314.sh JBR-4866 linux-all
jb/java/jcef/HwFacadeWindowNoFrontTest.java JBR-6556 windows-all
@@ -1513,7 +1509,6 @@ jb/build/ResolveSymbolsTest/ResolveSymbolsTestMinEnv.java JBR-7910 linux-all
java/awt/Choice/RemoveAllShrinkTest/RemoveAllShrinkTest.java 8310487 linux-all
java/awt/Choice/ResizeAutoClosesChoice/ResizeAutoClosesChoice.java JBR-5905 linux-all
java/awt/Choice/SelectNewItemTest/SelectNewItemTest.java 8315733 macosx-all
java/awt/Mixing/LWComboBox.java JBR-7595 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Mixing/LWPopupMenu.java JBR-824 generic-all
java/awt/Mixing/OpaqueTest.java JBR-5707 linux-all
java/awt/Mixing/OverlappingButtons.java JBR-5707 linux-all
@@ -1545,7 +1540,6 @@ jb/java/awt/Focus/TitleBarClickTest.java JBR-6394 linux-5.18.2-arch1-1
com/sun/java/swing/plaf/gtk/bug6492108.java JBR-8021 linux-all
com/sun/java/swing/plaf/gtk/TestBackSpaceAction.java JBR-8570 linux-all
java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java JBR-5765 macosx-all
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-9199 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/font/DoubleAntialiasTest.java JBR-6760 linux-i386
java/awt/Paint/RepaintOnAWTShutdown.java JBR-6760 linux-i386

View File

@@ -8,7 +8,7 @@ java/awt/dnd/DnDAWTLockTest.java JBR-8745 linux-all
java/awt/dnd/DragOverDropTargetPerformanceTest.java JBR-5799 windows-all
java/awt/dnd/DragSourceGCrashTest.java JBR-8745 linux-all
java/awt/dnd/InterJVMGetDropSuccessTest/InterJVMGetDropSuccessTest.java JBR-8745 linux-all
java/awt/dnd/InterJVMLinkTest.java JBR-9255 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/dnd/InterJVMLinkTest.java JBR-9255 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64,linux-6.17.12-300.fc43.aarch64,linux-6.18.4-200.fc43.aarch64,linux-6.17.12-300.fc43.x86_64,linux-6.18.4-200.fc43.x86_64
java/awt/Dialog/ChoiceModalDialogTest.java JBR-8724 windows-all
java/awt/dnd/MozillaDnDTest.java JBR-6442 linux-all
java/awt/event/ComponentEvent/TextComponentTextEventTest.java JBR-6287 windows-all
@@ -33,7 +33,7 @@ java/awt/Frame/WindowDragTest/WindowDragTest.java JBR-6090 windows-all
java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.java 7124275,JBR-5799 macosx-all,windows-all
java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java JBR-7299,JBR-8728 linux-all,windows-all
java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150,JBR-4880,8253184,JBR-8725 macosx-all,windows-all,linux-6.8.0-all
java/awt/Graphics/LineClipTest.java JBR-9386 linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/Graphics/LineClipTest.java JBR-9386 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/Graphics/NativeWin32Clear.java JBR-8730 windows-all
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720,8322653,JBR-5071 windows-all,macosx-all,linux-all
java/awt/GridLayout/ComponentPreferredSize/ComponentPreferredSize.java 8238720,8322653,JBR-5071 windows-all,macosx-all,linux-all
@@ -44,19 +44,19 @@ java/awt/List/ItemEventTest/ItemEventTest.java JBR-5711,JBR-6234 linux-all,windo
java/awt/List/TriggerActionEventTest.java JBR-6234 windows-all
java/awt/MenuItem/SetLabelTest.java JBR-8731 windows-all
java/awt/MenuShortcut/ActionCommandTest.java JBR-8822 windows-10.0
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-8732,JBR-9207 windows-all,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-8732,JBR-9207 windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405,JBR-6134 macosx-all,windows-all
java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java JBR-6234 windows-all
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-6134 windows-all
java/awt/Mixing/MixingOnDialog.java JBR-6134 windows-all
java/awt/Modal/BlockedMouseInputTest2.java JBR-6090 windows-all
java/awt/Mouse/MouseEnterExitTest.java JBR-8096 linux-all,windows-all
java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.java JBR-7309 linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.8-200.fc42.aarch64
java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.java JBR-7309 linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.8-200.fc42.aarch64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64
java/awt/MouseInfo/ContainerResizeMousePositionTest.java JBR-7881,JBR-7915,JBR-8746 macosx-all,linux-all
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-7035,JBR-8726 windows-all,macosx-all,linux-all
java/awt/Robot/ScreenCaptureRobotTest.java#id0 JBR-8784 macosx-all
java/awt/Scrollbar/UnitIncrementTest.java JBR-8733 windows-all
java/awt/TextArea/ScrollbarIntersectionTest/ScrollbarIntersectionTest.java 8253184,JBR-9387 windows-all,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/TextArea/ScrollbarIntersectionTest/ScrollbarIntersectionTest.java 8253184,JBR-9387 windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64
java/awt/TextField/GetTextTest/GetTextTest.java JBR-8734 windows-all
java/awt/Window/AlwaysOnTop/SyncAlwaysOnTopFieldTest.java JBR-6845 linux-all
java/awt/Window/TopLevelLocation/TopLevelLocation.java JBR-5799 windows-all
@@ -70,7 +70,7 @@ javax/swing/JButton/bug4490179.java JBR-8925 windows-all
javax/swing/JFileChooser/JFileChooserSetLocationTest.java JBR-8098 linux-all,windows-all
javax/swing/JInternalFrame/4202966/IntFrameCoord.java JBR-9006 window-all
javax/swing/JMenu/bug4342646.java JBR-8727 linux-all,windows-all
javax/swing/JPopupMenu/6580930/bug6580930.java JBR-5071 linux-6.8.0-1033-aws,linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JPopupMenu/6580930/bug6580930.java JBR-5071 linux-6.8.0-1033-aws,linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws
javax/swing/JTable/JTableRightOrientationTest.java JBR-8102 linux-all,windows-all
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8747 linux-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
@@ -137,7 +137,7 @@ java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java nobug generic
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java nobug generic-all
java/awt/Robot/ScreenCaptureRobotTest.java#id1 nobug generic-all
java/awt/Toolkit/ScreenInsetsDPIVariation/ScreenInsetsDPIVariation.java nobug generic-all
java/awt/TrayIcon/RightClickWhenBalloonDisplayed/RightClickWhenBalloonDisplayed.java 8238720,JBR-6931 windows-all,linux-aarch64,linux-6.16.7-100.fc41.x86_64,linux-linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64
java/awt/TrayIcon/RightClickWhenBalloonDisplayed/RightClickWhenBalloonDisplayed.java 8238720,JBR-6931 windows-all,linux-6.16.7-200.fc42.x86_64,linux-6.17.7-200.fc42.x86_64,linux-6.17.8-200.fc42.x86_64,linux-6.17.13-200.fc42.aarch64,linux-6.18.4-100.fc42.aarch64,linux-6.17.13-200.fc42.x86_64,linux-6.18.4-100.fc42.x86_64,linux-6.17.12-300.fc43.aarch64,linux-6.18.4-200.fc43.aarch64,linux-6.17.12-300.fc43.x86_64,linux-6.18.4-200.fc43.x86_64
java/awt/Window/8159168/SetShapeTest.java nobug generic-all
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java nobug generic-all
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java nobug generic-all

View File

@@ -7,8 +7,8 @@ java/awt/image/DrawImage/BlitRotateClippedArea.java JBR-9026 linux-all
java/awt/image/DrawImage/EABlitTest.java JBR-9027 linux-all
javax/swing/GraphicsConfigNotifier/StalePreferredSize.java JBR-9031 linux-all
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-8266 linux-x64
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-7928 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-7928 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws
javax/swing/JEditorPane/JEditorPaneFontFallback.java JBR-8305 linux-all
javax/swing/JFormattedTextField/bug4741926.java JBR-9321 linux-6.14.9-arch1-1
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1

View File

@@ -2,15 +2,14 @@ java/awt/font/GlyphVector/LayoutCompatTest.java JBR-8262 linux-all
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-7932 linux-all
java/awt/Multiscreen/MultiScreenCheckScreenIDTest.java JBR-8263 linux-x64
javax/swing/JComponent/6989617/bug6989617.java JBR-8796 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws,linux-6.14.0-1014-aws,linux-6.14.0-1015-aws
javax/swing/JComponent/6989617/bug6989617.java JBR-8796 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws,linux-6.14.0-1014-aws,linux-6.14.0-1015-aws,linux-6.14.0-1017-aws,linux-6.14.0-1018-aws
javax/swing/JDesktopPane/TestDesktopManagerNPE.java JBR-8449 linux-x64
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-8266 linux-x64
javax/swing/InputVerifier/VerifyTarget/VerifyTargetTest.java JBR-7520,JBR-9320 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.14.9-arch1-1
javax/swing/InputVerifier/VerifyTarget/VerifyTargetTest.java JBR-7520,JBR-9320 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.8.0-1039-aws,linux-6.8.0-1040-aws,linux-6.8.0-1043-aws,linux-6.8.0-1044-aws,linux-6.14.9-arch1-1
javax/swing/JEditorPane/JEditorPaneFontFallback.java JBR-8305 linux-all
javax/swing/JFormattedTextField/bug4741926.java JBR-7530,JBR-9321 linux-all,linux-6.14.9-arch1-1
javax/swing/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-8790 linux-all
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1