mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-21 08:49:39 +01:00
Compare commits
40 Commits
jb25.0.1-b
...
vpr/jbr25_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38afbeccf1 | ||
|
|
b86151562f | ||
|
|
00dfb2b2ce | ||
|
|
4c46c41847 | ||
|
|
16405f4f09 | ||
|
|
9f98448896 | ||
|
|
7abc1a541d | ||
|
|
de8ea2d81c | ||
|
|
bc737fb03a | ||
|
|
f8e0ee5a18 | ||
|
|
e956e04e37 | ||
|
|
9cae1177d6 | ||
|
|
50729485cf | ||
|
|
59055bc850 | ||
|
|
7666cf1882 | ||
|
|
21a1668c8f | ||
|
|
aa937adccf | ||
|
|
1434025d74 | ||
|
|
89b841701e | ||
|
|
352117baf3 | ||
|
|
79d925f6ae | ||
|
|
e37c54a24f | ||
|
|
d96581ebec | ||
|
|
f37e00d801 | ||
|
|
a49aa72e7b | ||
|
|
5af08d88d5 | ||
|
|
87a46979f3 | ||
|
|
e7a86af739 | ||
|
|
60bfa2b12e | ||
|
|
ae6360371c | ||
|
|
f8aee55ea6 | ||
|
|
ffc581146c | ||
|
|
75930f77d2 | ||
|
|
7b721d2610 | ||
|
|
fed9ce336e | ||
|
|
14be13239e | ||
|
|
c9aea14597 | ||
|
|
d619feefc6 | ||
|
|
b38204cb12 | ||
|
|
c7fe20689c |
3
.github/README.md
vendored
3
.github/README.md
vendored
@@ -254,8 +254,7 @@ configurations (for example, `release` and `fastdebug`), supply the `--conf <con
|
|||||||
Then open the git root directory as a project in IDEA.
|
Then open the git root directory as a project in IDEA.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
We are happy to receive your pull requests!
|
Please contribute your changes through [OpenJDK](https://dev.java/contribute/openjdk/).
|
||||||
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
|
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
* [JetBrains Runtime on GitHub](https://github.com/JetBrains/JetBrainsRuntime).
|
* [JetBrains Runtime on GitHub](https://github.com/JetBrains/JetBrainsRuntime).
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ JCEF_PATH=${JCEF_PATH:=./jcef_linux_aarch64}
|
|||||||
function do_configure {
|
function do_configure {
|
||||||
|
|
||||||
GTK_SHELL_PATH=/gtk-shell.xml
|
GTK_SHELL_PATH=/gtk-shell.xml
|
||||||
|
WAYLAND_PROTOCOLS_PATH=/opt/wayland-protocols
|
||||||
|
WITH_WAYLAND_PROTOCOLS=
|
||||||
|
|
||||||
|
if [ -e "$WAYLAND_PROTOCOLS_PATH" ]; then
|
||||||
|
WITH_WAYLAND_PROTOCOLS="--with-wayland-protocols=$WAYLAND_PROTOCOLS_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e $GTK_SHELL_PATH ]; then
|
if [ ! -e $GTK_SHELL_PATH ]; then
|
||||||
echo $GTK_SHELL_PATH" does not exist"
|
echo $GTK_SHELL_PATH" does not exist"
|
||||||
@@ -54,6 +60,7 @@ function do_configure {
|
|||||||
$REPRODUCIBLE_BUILD_OPTS \
|
$REPRODUCIBLE_BUILD_OPTS \
|
||||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||||
$WITH_BUNDLED_FREETYPE \
|
$WITH_BUNDLED_FREETYPE \
|
||||||
|
$WITH_WAYLAND_PROTOCOLS \
|
||||||
|| do_exit $?
|
|| do_exit $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ function do_configure {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
GTK_SHELL_PATH=/gtk-shell.xml
|
GTK_SHELL_PATH=/gtk-shell.xml
|
||||||
|
WAYLAND_PROTOCOLS_PATH=/opt/wayland-protocols
|
||||||
|
WITH_WAYLAND_PROTOCOLS=
|
||||||
|
|
||||||
|
if [ -e "$WAYLAND_PROTOCOLS_PATH" ]; then
|
||||||
|
WITH_WAYLAND_PROTOCOLS="--with-wayland-protocols=$WAYLAND_PROTOCOLS_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -e $GTK_SHELL_PATH ]; then
|
if [ ! -e $GTK_SHELL_PATH ]; then
|
||||||
echo $GTK_SHELL_PATH" does not exist"
|
echo $GTK_SHELL_PATH" does not exist"
|
||||||
@@ -68,6 +74,7 @@ function do_configure {
|
|||||||
$REPRODUCIBLE_BUILD_OPTS \
|
$REPRODUCIBLE_BUILD_OPTS \
|
||||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||||
$WITH_BUNDLED_FREETYPE \
|
$WITH_BUNDLED_FREETYPE \
|
||||||
|
$WITH_WAYLAND_PROTOCOLS \
|
||||||
|| do_exit $?
|
|| do_exit $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,23 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
|||||||
[specify the root directory for the wayland protocols xml files])])
|
[specify the root directory for the wayland protocols xml files])])
|
||||||
AC_ARG_WITH(gtk-shell1-protocol, [AS_HELP_STRING([--with-gtk-shell1-protocol],
|
AC_ARG_WITH(gtk-shell1-protocol, [AS_HELP_STRING([--with-gtk-shell1-protocol],
|
||||||
[specify the path to the gtk-shell1 Wayland protocol xml file])])
|
[specify the path to the gtk-shell1 Wayland protocol xml file])])
|
||||||
|
AC_ARG_WITH(xkbcommon, [AS_HELP_STRING([--with-xkbcommon],
|
||||||
|
[specify prefix directory for the xkbcommon package
|
||||||
|
(expecting the headers under PATH/include)])])
|
||||||
|
AC_ARG_WITH(xkbcommon-include, [AS_HELP_STRING([--with-xkbcommon-include],
|
||||||
|
[specify directory for the xkbcommon include files])])
|
||||||
|
AC_ARG_WITH(xkbcommon-lib, [AS_HELP_STRING([--with-xkbcommon-lib],
|
||||||
|
[specify directory for the xkbcommon library files])])
|
||||||
|
|
||||||
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
|
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
|
||||||
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
|
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
|
||||||
(test "x${with_wayland_include}" != x && test "x${with_wayland_include}" != xno); then
|
(test "x${with_wayland_include}" != x && test "x${with_wayland_include}" != xno); then
|
||||||
AC_MSG_WARN([[wayland not used, so --with-wayland[-*] is ignored]])
|
AC_MSG_WARN([[wayland not used, so --with-wayland[-*] is ignored]])
|
||||||
fi
|
fi
|
||||||
|
if (test "x${with_xkbcommon}" != x && test "x${with_xkbcommon}" != xno) || \
|
||||||
|
(test "x${with_xkbcommon_include}" != x && test "x${with_xkbcommon_include}" != xno); then
|
||||||
|
AC_MSG_WARN([[wayland not used, so --with-xkbcommon[-*] is ignored]])
|
||||||
|
fi
|
||||||
WAYLAND_CFLAGS=
|
WAYLAND_CFLAGS=
|
||||||
WAYLAND_LIBS=
|
WAYLAND_LIBS=
|
||||||
else
|
else
|
||||||
@@ -55,6 +66,9 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
|||||||
if test "x${with_wayland}" = xno || test "x${with_wayland_include}" = xno; then
|
if test "x${with_wayland}" = xno || test "x${with_wayland_include}" = xno; then
|
||||||
AC_MSG_ERROR([It is not possible to disable the use of wayland. Remove the --without-wayland option.])
|
AC_MSG_ERROR([It is not possible to disable the use of wayland. Remove the --without-wayland option.])
|
||||||
fi
|
fi
|
||||||
|
if test "x${with_xkbcommon}" = xno || test "x${with_xkbcommon_include}" = xno; then
|
||||||
|
AC_MSG_ERROR([It is not possible to disable the use of xkbcommon. Remove the --without-xkbcommon option.])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x${with_wayland}" != x; then
|
if test "x${with_wayland}" != x; then
|
||||||
AC_MSG_CHECKING([for wayland headers])
|
AC_MSG_CHECKING([for wayland headers])
|
||||||
@@ -121,7 +135,52 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
|||||||
HELP_MSG_MISSING_DEPENDENCY([wayland])
|
HELP_MSG_MISSING_DEPENDENCY([wayland])
|
||||||
AC_MSG_ERROR([Could not find wayland! $HELP_MSG ])
|
AC_MSG_ERROR([Could not find wayland! $HELP_MSG ])
|
||||||
fi
|
fi
|
||||||
WAYLAND_CFLAGS="${WAYLAND_INCLUDES} ${WAYLAND_DEFINES}"
|
|
||||||
|
XKBCOMMON_FOUND=no
|
||||||
|
XKBCOMMON_INCLUDES=
|
||||||
|
XKBCOMMON_LIBS=-lxkbcommon
|
||||||
|
if test "x${with_xkbcommon}" != x; then
|
||||||
|
AC_MSG_CHECKING([for xkbcommon headers])
|
||||||
|
if test -s "${with_xkbcommon}/include/xkbcommon/xkbcommon.h" &&
|
||||||
|
test -s "${with_xkbcommon}/include/xkbcommon/xkbcommon-compose.h"; then
|
||||||
|
XKBCOMMON_INCLUDES="-I${with_xkbcommon}/include"
|
||||||
|
XKBCOMMON_LIBS="-L${with_xkbcommon}/lib ${XKBCOMMON_LIBS}"
|
||||||
|
|
||||||
|
XKBCOMMON_FOUND=yes
|
||||||
|
AC_MSG_RESULT([$XKBCOMMON_FOUND])
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Can't find 'include/xkbcommon/xkbcommon.h' and 'include/xkbcommon/xkbcommon-compose.h' under ${with_xkbcommon} given with the --with-xkbcommon option.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x${with_xkbcommon_include}" != x; then
|
||||||
|
AC_MSG_CHECKING([for xkbcommon headers])
|
||||||
|
if test -s "${with_xkbcommon_include}/xkbcommon/xkbcommon.h" &&
|
||||||
|
test -s "${with_xkbcommon_include}/xkbcommon/xkbcommon-compose.h"; then
|
||||||
|
XKBCOMMON_INCLUDES="-I${with_xkbcommon_include}"
|
||||||
|
XKBCOMMON_FOUND=yes
|
||||||
|
AC_MSG_RESULT([$XKBCOMMON_FOUND])
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Can't find 'include/xkbcommon/xkbcommon.h' and 'include/xkbcommon/xkbcommon-compose.h' under ${with_xkbcommon_include} given with the --with-xkbcommon-include option.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x${with_xkbcommon_lib}" != x; then
|
||||||
|
XKBCOMMON_LIBS="-L${with_xkbcommon_lib} ${XKBCOMMON_LIBS}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x${XKBCOMMON_FOUND}" != xyes; then
|
||||||
|
AC_CHECK_HEADERS([xkbcommon/xkbcommon.h xkbcommon/xkbcommon-compose.h],
|
||||||
|
[ XKBCOMMON_FOUND=yes ],
|
||||||
|
[ XKBCOMMON_FOUND=no; break ]
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$XKBCOMMON_FOUND" != xyes; then
|
||||||
|
HELP_MSG_MISSING_DEPENDENCY([xkbcommon])
|
||||||
|
AC_MSG_ERROR([Could not find xkbcommon! $HELP_MSG ])
|
||||||
|
fi
|
||||||
|
|
||||||
|
WAYLAND_LIBS="${WAYLAND_LIBS} ${XKBCOMMON_LIBS}"
|
||||||
|
WAYLAND_CFLAGS="${WAYLAND_INCLUDES} ${XKBCOMMON_INCLUDES} ${WAYLAND_DEFINES}"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(WAYLAND_CFLAGS)
|
AC_SUBST(WAYLAND_CFLAGS)
|
||||||
AC_SUBST(WAYLAND_LIBS)
|
AC_SUBST(WAYLAND_LIBS)
|
||||||
|
|||||||
@@ -33,10 +33,12 @@ WAYLAND_BASIC_PROTOCOL_FILES := \
|
|||||||
$(WAYLAND_PROTOCOLS_ROOT)/stable/viewporter/viewporter.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/stable/viewporter/viewporter.xml \
|
||||||
$(WAYLAND_PROTOCOLS_ROOT)/stable/xdg-shell/xdg-shell.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/stable/xdg-shell/xdg-shell.xml \
|
||||||
$(WAYLAND_PROTOCOLS_ROOT)/staging/xdg-activation/xdg-activation-v1.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/staging/xdg-activation/xdg-activation-v1.xml \
|
||||||
|
$(WAYLAND_PROTOCOLS_ROOT)/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml \
|
||||||
$(WAYLAND_PROTOCOLS_ROOT)/unstable/primary-selection/primary-selection-unstable-v1.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/unstable/primary-selection/primary-selection-unstable-v1.xml \
|
||||||
$(WAYLAND_PROTOCOLS_ROOT)/unstable/xdg-output/xdg-output-unstable-v1.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/unstable/xdg-output/xdg-output-unstable-v1.xml \
|
||||||
$(WAYLAND_PROTOCOLS_ROOT)/unstable/relative-pointer/relative-pointer-unstable-v1.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/unstable/relative-pointer/relative-pointer-unstable-v1.xml \
|
||||||
$(WAYLAND_PROTOCOLS_ROOT)/unstable/text-input/text-input-unstable-v3.xml \
|
$(WAYLAND_PROTOCOLS_ROOT)/unstable/text-input/text-input-unstable-v3.xml \
|
||||||
|
$(WAYLAND_PROTOCOLS_ROOT)/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml \
|
||||||
$(GTK_SHELL1_PROTOCOL_PATH) \
|
$(GTK_SHELL1_PROTOCOL_PATH) \
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ ifeq ($(call isTargetOs, windows), true)
|
|||||||
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
|
$(TOPDIR)/src/$(MODULE)/share/native/common/font \
|
||||||
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d/opengl \
|
$(TOPDIR)/src/$(MODULE)/share/native/common/java2d/opengl \
|
||||||
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
|
$(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt/systemscale \
|
||||||
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/launcher \
|
|
||||||
#
|
#
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -102,6 +101,7 @@ ifeq ($(call isTargetOs, windows), true)
|
|||||||
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
|
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
|
||||||
LIBAWT_VERSIONINFO_RESOURCE := \
|
LIBAWT_VERSIONINFO_RESOURCE := \
|
||||||
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
|
$(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
|
||||||
|
LIBAWT_EXTRA_HEADER_DIRS += $(TOPDIR)/src/java.base/windows/native/launcher
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# This is the object file to provide the dladdr API, which is not
|
# This is the object file to provide the dladdr API, which is not
|
||||||
|
|||||||
@@ -352,16 +352,6 @@ void ClassLoaderDataGraph::verify_dictionary() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// (DCEVM) - iterate over dict classes
|
|
||||||
void ClassLoaderDataGraph::dictionary_classes_do(KlassClosure* klass_closure) {
|
|
||||||
ClassLoaderDataGraphIterator iter;
|
|
||||||
while (ClassLoaderData* cld = iter.get_next()) {
|
|
||||||
if (cld->dictionary() != nullptr) {
|
|
||||||
cld->dictionary()->classes_do(klass_closure);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// (DCEVM) rollback redefined classes
|
// (DCEVM) rollback redefined classes
|
||||||
void ClassLoaderDataGraph::rollback_redefinition() {
|
void ClassLoaderDataGraph::rollback_redefinition() {
|
||||||
ClassLoaderDataGraphIterator iter;
|
ClassLoaderDataGraphIterator iter;
|
||||||
@@ -373,17 +363,27 @@ void ClassLoaderDataGraph::rollback_redefinition() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// (DCEVM) - iterate over all classes in all dictionaries
|
// (DCEVM) - iterate over all classes in all dictionaries
|
||||||
bool ClassLoaderDataGraph::dictionary_classes_do_update_klass(Thread* current, Symbol* name, InstanceKlass* k, InstanceKlass* old_klass) {
|
bool ClassLoaderDataGraph::dictionary_classes_do_update_klass(Thread* current, Symbol* name, InstanceKlass* k, InstanceKlass* old_klass, bool check_old) {
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
ClassLoaderDataGraphIterator iter;
|
ClassLoaderDataGraphIterator iter;
|
||||||
while (ClassLoaderData* cld = iter.get_next()) {
|
while (ClassLoaderData* cld = iter.get_next()) {
|
||||||
if (cld->dictionary() != nullptr) {
|
if (cld->dictionary() != nullptr) {
|
||||||
ok = cld->dictionary()->update_klass(current, name, k, old_klass) || ok;
|
ok = cld->dictionary()->update_klass(current, name, k, old_klass, check_old) || ok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// (DCEVM) - iterate over all classes in all dictionaries
|
||||||
|
void ClassLoaderDataGraph::dictionary_classes_do_classes_do_safepoint(void f(InstanceKlass* const)) {
|
||||||
|
ClassLoaderDataGraphIterator iter;
|
||||||
|
while (ClassLoaderData* cld = iter.get_next()) {
|
||||||
|
if (cld->dictionary() != nullptr) {
|
||||||
|
cld->dictionary()->classes_do_safepoint(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ClassLoaderDataGraph::print_dictionary(outputStream* st) {
|
void ClassLoaderDataGraph::print_dictionary(outputStream* st) {
|
||||||
ClassLoaderDataGraphIterator iter;
|
ClassLoaderDataGraphIterator iter;
|
||||||
while (ClassLoaderData *cld = iter.get_next()) {
|
while (ClassLoaderData *cld = iter.get_next()) {
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ class ClassLoaderDataGraph : public AllStatic {
|
|||||||
static void walk_metadata_and_clean_metaspaces();
|
static void walk_metadata_and_clean_metaspaces();
|
||||||
|
|
||||||
// (DCEVM) Enhanced class redefinition
|
// (DCEVM) Enhanced class redefinition
|
||||||
static void dictionary_classes_do(KlassClosure* klass_closure);
|
|
||||||
static void rollback_redefinition();
|
static void rollback_redefinition();
|
||||||
static bool dictionary_classes_do_update_klass(Thread* current, Symbol* name, InstanceKlass* k, InstanceKlass* old_klass);
|
static bool dictionary_classes_do_update_klass(Thread* current, Symbol* name, InstanceKlass* k, InstanceKlass* old_klass, bool check_old);
|
||||||
|
static void dictionary_classes_do_classes_do_safepoint(void f(InstanceKlass* const));
|
||||||
|
|
||||||
static void verify_dictionary();
|
static void verify_dictionary();
|
||||||
static void print_dictionary(outputStream* st);
|
static void print_dictionary(outputStream* st);
|
||||||
|
|||||||
@@ -211,15 +211,23 @@ class UpdateKlassDcevm : public StackObj {
|
|||||||
InstanceKlass* _new_klass;
|
InstanceKlass* _new_klass;
|
||||||
InstanceKlass* _old_klass;
|
InstanceKlass* _old_klass;
|
||||||
bool _replaced;
|
bool _replaced;
|
||||||
|
bool _check_old;
|
||||||
public:
|
public:
|
||||||
UpdateKlassDcevm(InstanceKlass* new_klass, InstanceKlass* old_klass) :
|
UpdateKlassDcevm(InstanceKlass* new_klass, InstanceKlass* old_klass, bool check_old) :
|
||||||
_new_klass(new_klass),
|
_new_klass(new_klass),
|
||||||
_old_klass(old_klass),
|
_old_klass(old_klass),
|
||||||
_replaced(false) {
|
_replaced(false),
|
||||||
|
_check_old(check_old) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator()(InstanceKlass** old_table_value) {
|
void operator()(InstanceKlass** old_table_value) {
|
||||||
assert(*old_table_value == _old_klass, "should be old class");
|
InstanceKlass* table_class = *old_table_value;
|
||||||
|
assert(!_check_old || table_class == _old_klass, "should be old class");
|
||||||
|
assert(table_class->class_loader_data() == _new_klass->class_loader_data(), "Must be same class loader");
|
||||||
|
if (!_check_old && table_class->new_version() != nullptr) {
|
||||||
|
ResourceMark rm;
|
||||||
|
log_debug(redefine, class, redefine, metadata)("Updating old class from doit() %s", table_class->name()->as_C_string());
|
||||||
|
}
|
||||||
*old_table_value = _new_klass;
|
*old_table_value = _new_klass;
|
||||||
_replaced = true;
|
_replaced = true;
|
||||||
}
|
}
|
||||||
@@ -230,10 +238,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// (DCEVM) replace old_class by new class in dictionary
|
// (DCEVM) replace old_class by new class in dictionary
|
||||||
bool Dictionary::update_klass(Thread* current, Symbol* class_name, InstanceKlass* k, InstanceKlass* old_klass) {
|
bool Dictionary::update_klass(Thread* current, Symbol* class_name, InstanceKlass* k, InstanceKlass* old_klass, bool check_old) {
|
||||||
UpdateKlassDcevm found(k, old_klass);
|
UpdateKlassDcevm found(k, old_klass, check_old);
|
||||||
|
|
||||||
DictionaryLookup lookup(class_name);
|
DictionaryLookup lookup(class_name);
|
||||||
|
// (DCEVM): old_klass is replaced with the new one in UpdateKlassDcevm::operator(),
|
||||||
|
// which is invoked when class_name is found in the dictionary.
|
||||||
bool exists = _table->get(current, lookup, found);
|
bool exists = _table->get(current, lookup, found);
|
||||||
return exists && found.get_replaced();
|
return exists && found.get_replaced();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public:
|
|||||||
void verify();
|
void verify();
|
||||||
|
|
||||||
// (DCEVM) Enhanced class redefinition
|
// (DCEVM) Enhanced class redefinition
|
||||||
bool update_klass(Thread* current, Symbol* class_name, InstanceKlass* k, InstanceKlass* old_klass);
|
bool update_klass(Thread* current, Symbol* class_name, InstanceKlass* k, InstanceKlass* old_klass, bool check_old);
|
||||||
|
|
||||||
void rollback_redefinition();
|
void rollback_redefinition();
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1386,10 +1386,9 @@ void SystemDictionary::define_instance_class(InstanceKlass* k, InstanceKlass* ol
|
|||||||
if (is_redefining) {
|
if (is_redefining) {
|
||||||
// Update all dictionaries containing old_class to new_class
|
// Update all dictionaries containing old_class to new_class
|
||||||
// outcome must be same as result of standard redefinition, that does not create a new Klass
|
// outcome must be same as result of standard redefinition, that does not create a new Klass
|
||||||
ClassLoaderDataGraph_lock->lock();
|
MutexLocker lock(ClassLoaderDataGraph_lock);
|
||||||
Symbol* name_h = k->name();
|
Symbol* name_h = k->name();
|
||||||
bool ok = ClassLoaderDataGraph::dictionary_classes_do_update_klass(THREAD, name_h, k, old_klass);
|
bool ok = ClassLoaderDataGraph::dictionary_classes_do_update_klass(THREAD, name_h, k, old_klass, true);
|
||||||
ClassLoaderDataGraph_lock->unlock();
|
|
||||||
assert (ok, "must have found old class and updated!");
|
assert (ok, "must have found old class and updated!");
|
||||||
}
|
}
|
||||||
check_constraints(k, loader_data, !is_redefining, CHECK);
|
check_constraints(k, loader_data, !is_redefining, CHECK);
|
||||||
|
|||||||
@@ -432,6 +432,9 @@ protected:
|
|||||||
const Klass* newest_version() const { return _new_version == nullptr ? this : _new_version->newest_version(); }
|
const Klass* newest_version() const { return _new_version == nullptr ? this : _new_version->newest_version(); }
|
||||||
Klass* newest_version() { return _new_version == nullptr ? this : _new_version->newest_version(); }
|
Klass* newest_version() { return _new_version == nullptr ? this : _new_version->newest_version(); }
|
||||||
|
|
||||||
|
const Klass* oldest_version() const { return _old_version == nullptr ? this : _old_version->oldest_version(); }
|
||||||
|
Klass* oldest_version() { return _old_version == nullptr ? this : _old_version->oldest_version(); }
|
||||||
|
|
||||||
const Klass* active_version() const { return _new_version == nullptr || _new_version->is_redefining() ? this : _new_version->active_version(); }
|
const Klass* active_version() const { return _new_version == nullptr || _new_version->is_redefining() ? this : _new_version->active_version(); }
|
||||||
Klass* active_version() { return _new_version == nullptr || _new_version->is_redefining() ? this : _new_version->active_version(); }
|
Klass* active_version() { return _new_version == nullptr || _new_version->is_redefining() ? this : _new_version->active_version(); }
|
||||||
|
|
||||||
|
|||||||
@@ -218,9 +218,7 @@ intptr_t jfieldIDWorkaround::encode_klass_hash(Klass* k, int offset) {
|
|||||||
DEBUG_ONLY(NoSafepointVerifier nosafepoint;)
|
DEBUG_ONLY(NoSafepointVerifier nosafepoint;)
|
||||||
|
|
||||||
if (AllowEnhancedClassRedefinition) {
|
if (AllowEnhancedClassRedefinition) {
|
||||||
while (field_klass->old_version() != nullptr) {
|
field_klass = field_klass->oldest_version();
|
||||||
field_klass = field_klass->old_version();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
uintptr_t klass_hash = field_klass->identity_hash();
|
uintptr_t klass_hash = field_klass->identity_hash();
|
||||||
return ((klass_hash & klass_mask) << klass_shift) | checked_mask_in_place;
|
return ((klass_hash & klass_mask) << klass_shift) | checked_mask_in_place;
|
||||||
@@ -242,9 +240,9 @@ bool jfieldIDWorkaround::klass_hash_ok(Klass* k, jfieldID id) {
|
|||||||
intptr_t klass_hash = (as_uint >> klass_shift) & klass_mask;
|
intptr_t klass_hash = (as_uint >> klass_shift) & klass_mask;
|
||||||
|
|
||||||
if (AllowEnhancedClassRedefinition) {
|
if (AllowEnhancedClassRedefinition) {
|
||||||
while (k->old_version() != nullptr) {
|
// DCEVM: use the oldest class version so all pre-existing IDs
|
||||||
k = k->old_version();
|
// from old classes match IDs of the new (current) class.
|
||||||
}
|
k = k->oldest_version();
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -253,6 +251,11 @@ bool jfieldIDWorkaround::klass_hash_ok(Klass* k, jfieldID id) {
|
|||||||
if ((k->identity_hash() & klass_mask) == klass_hash)
|
if ((k->identity_hash() & klass_mask) == klass_hash)
|
||||||
return true;
|
return true;
|
||||||
k = k->super();
|
k = k->super();
|
||||||
|
if (AllowEnhancedClassRedefinition) {
|
||||||
|
// DCEVM: Same for each superclass: normalize to the oldest version
|
||||||
|
// so old IDs match the new class IDs.
|
||||||
|
k = k->oldest_version();
|
||||||
|
}
|
||||||
} while (k != nullptr);
|
} while (k != nullptr);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,6 @@
|
|||||||
#include "utilities/bitMap.inline.hpp"
|
#include "utilities/bitMap.inline.hpp"
|
||||||
#include "prims/jvmtiThreadState.inline.hpp"
|
#include "prims/jvmtiThreadState.inline.hpp"
|
||||||
#include "utilities/events.hpp"
|
#include "utilities/events.hpp"
|
||||||
#include "oops/constantPool.inline.hpp"
|
|
||||||
#if INCLUDE_G1GC
|
#if INCLUDE_G1GC
|
||||||
#include "gc/g1/g1CollectedHeap.hpp"
|
#include "gc/g1/g1CollectedHeap.hpp"
|
||||||
#endif
|
#endif
|
||||||
@@ -372,7 +371,24 @@ class ChangePointersOopClosure : public BasicOopIterateClosure {
|
|||||||
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
|
int ref_kind = (flags >> REFERENCE_KIND_SHIFT) & REFERENCE_KIND_MASK;
|
||||||
if (MethodHandles::ref_kind_is_method(ref_kind)) {
|
if (MethodHandles::ref_kind_is_method(ref_kind)) {
|
||||||
Method* m = (Method*) java_lang_invoke_MemberName::vmtarget(obj);
|
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
|
// Let's try to re-resolve method
|
||||||
InstanceKlass* newest = InstanceKlass::cast(m->method_holder()->newest_version());
|
InstanceKlass* newest = InstanceKlass::cast(m->method_holder()->newest_version());
|
||||||
Method* new_method = newest->find_method(m->name(), m->signature());
|
Method* new_method = newest->find_method(m->name(), m->signature());
|
||||||
@@ -695,6 +711,16 @@ void VM_EnhancedRedefineClasses::doit() {
|
|||||||
new_class->old_version()->set_new_version(new_class);
|
new_class->old_version()->set_new_version(new_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update Dictionaries to ensure all references contain the new class versions.
|
||||||
|
// During load_new_class_versions(), another thread may have loaded an old version, so this pass replaces
|
||||||
|
// any remaining old ones.
|
||||||
|
for (int i = 0; i < _new_classes->length(); i++) {
|
||||||
|
InstanceKlass* new_class = _new_classes->at(i);
|
||||||
|
InstanceKlass* old_class = InstanceKlass::cast(new_class->old_version());
|
||||||
|
Symbol *name_h = new_class->name();
|
||||||
|
ClassLoaderDataGraph::dictionary_classes_do_update_klass(Thread::current(), name_h, new_class, old_class, false);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _new_classes->length(); i++) {
|
for (int i = 0; i < _new_classes->length(); i++) {
|
||||||
Klass* new_class = _new_classes->at(i);
|
Klass* new_class = _new_classes->at(i);
|
||||||
redefine_single_class(current, _new_classes->at(i));
|
redefine_single_class(current, _new_classes->at(i));
|
||||||
@@ -917,7 +943,7 @@ void VM_EnhancedRedefineClasses::doit() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
log_trace(redefine, class, redefine, metadata)("calling check_class");
|
log_trace(redefine, class, redefine, metadata)("calling check_class");
|
||||||
ClassLoaderData::the_null_class_loader_data()->dictionary()->classes_do_safepoint(check_class);
|
ClassLoaderDataGraph::dictionary_classes_do_classes_do_safepoint(check_class);
|
||||||
#ifdef PRODUCT
|
#ifdef PRODUCT
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef __linux
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "cds/aotLogging.hpp"
|
#include "cds/aotLogging.hpp"
|
||||||
#include "cds/cds_globals.hpp"
|
#include "cds/cds_globals.hpp"
|
||||||
#include "cds/cdsConfig.hpp"
|
#include "cds/cdsConfig.hpp"
|
||||||
@@ -3855,6 +3859,34 @@ void Arguments::set_compact_headers_flags() {
|
|||||||
#endif
|
#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() {
|
jint Arguments::apply_ergo() {
|
||||||
// Set flags based on ergonomics.
|
// Set flags based on ergonomics.
|
||||||
jint result = set_ergonomics_flags();
|
jint result = set_ergonomics_flags();
|
||||||
@@ -3925,6 +3957,17 @@ jint Arguments::apply_ergo() {
|
|||||||
FLAG_SET_DEFAULT(BytecodeVerificationRemote, true);
|
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
|
#ifndef PRODUCT
|
||||||
if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
|
if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
|
||||||
if (use_vm_log()) {
|
if (use_vm_log()) {
|
||||||
|
|||||||
@@ -1312,24 +1312,24 @@ void VMError::report(outputStream* st, bool _verbose) {
|
|||||||
NativeHeapTrimmer::print_state(st);
|
NativeHeapTrimmer::print_state(st);
|
||||||
st->cr();
|
st->cr();
|
||||||
|
|
||||||
STEP("JNI global references")
|
STEP_IF("JNI global references", _verbose)
|
||||||
st->print_cr("JNI global refs:");
|
st->print_cr("JNI global refs:");
|
||||||
JNIHandles::print_on_unsafe(st);
|
JNIHandles::print_on_unsafe(st);
|
||||||
JNIHandles::print_memory_usage_on(st);
|
JNIHandles::print_memory_usage_on(st);
|
||||||
|
|
||||||
STEP_IF("Process memory usage", _verbose)
|
STEP_IF("Process memory usage", _verbose)
|
||||||
print_process_memory_usage(st);
|
print_process_memory_usage(st);
|
||||||
|
|
||||||
STEP("OOME stack traces")
|
STEP_IF("OOME stack traces", _verbose)
|
||||||
st->print_cr("OOME stack traces (most recent first):");
|
st->print_cr("OOME stack traces (most recent first):");
|
||||||
print_oome_stacks(st);
|
print_oome_stacks(st);
|
||||||
|
|
||||||
STEP("Classloader stats")
|
STEP_IF("Classloader stats", _verbose)
|
||||||
st->print_cr("Classloader memory used:");
|
st->print_cr("Classloader memory used:");
|
||||||
FREE_C_HEAP_ARRAY(void*, _ballast_memory);
|
FREE_C_HEAP_ARRAY(void*, _ballast_memory);
|
||||||
_ballast_memory = nullptr;
|
_ballast_memory = nullptr;
|
||||||
print_classloaders_stats(st);
|
print_classloaders_stats(st);
|
||||||
print_dup_classes(st); // do it separately in case we're low on memory
|
print_dup_classes(st); // do it separately in case we're low on memory
|
||||||
|
|
||||||
STEP_IF("printing system", _verbose)
|
STEP_IF("printing system", _verbose)
|
||||||
st->print_cr("--------------- S Y S T E M ---------------");
|
st->print_cr("--------------- S Y S T E M ---------------");
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class IoOverNio {
|
|||||||
*/
|
*/
|
||||||
public static final Debug DEBUG;
|
public static final Debug DEBUG;
|
||||||
public static final boolean IS_ENABLED_IN_GENERAL =
|
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<>();
|
private static final ThreadLocal<Integer> ALLOW_IN_THIS_THREAD = new ThreadLocal<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -159,5 +159,84 @@ public class IoOverNio {
|
|||||||
* <p>
|
* <p>
|
||||||
* The problem was found with the test {@code jtreg:test/jdk/java/io/FileDescriptor/Sharing.java}.
|
* The problem was found with the test {@code jtreg:test/jdk/java/io/FileDescriptor/Sharing.java}.
|
||||||
*/
|
*/
|
||||||
public static final ThreadLocal<Closeable> PARENT_FOR_FILE_CHANNEL_IMPL = new ThreadLocal<>();
|
public static class ParentForFileChannelImplHolder {
|
||||||
|
private static final ThreadLocal<Closeable> holder = new ThreadLocal<>();
|
||||||
|
|
||||||
|
private ParentForFileChannelImplHolder() {}
|
||||||
|
|
||||||
|
public static Closeable get() {
|
||||||
|
return holder.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void set(Closeable parent) {
|
||||||
|
RecursionGuard.ensureActive();
|
||||||
|
holder.set(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void remove() {
|
||||||
|
RecursionGuard.ensureActive();
|
||||||
|
holder.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>With java.io over java.nio backend, it's possible that some code invokes file system operations while
|
||||||
|
* already executing a similar operation. An example is when a classloader uses {@link FileSystems#getDefault()}
|
||||||
|
* during class loading. Such cases break usage of {@link ParentForFileChannelImplHolder}.</p>
|
||||||
|
*
|
||||||
|
* <p>This class is to be used around places that can hypothetically access {@link ParentForFileChannelImplHolder}
|
||||||
|
* recursively.</p>
|
||||||
|
*/
|
||||||
|
public static class RecursionGuard implements Closeable {
|
||||||
|
private static final ThreadLocal<RecursionGuard> HEAD = new ThreadLocal<>();
|
||||||
|
|
||||||
|
private final RecursionGuard parent;
|
||||||
|
private final Object label;
|
||||||
|
private final ThreadLocalCloseable additionalClosable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param label A unique object for a specific method. The object is used for reference equality.
|
||||||
|
* A static string or a reference to a class is a good candidate.
|
||||||
|
*/
|
||||||
|
public static RecursionGuard create(Object label) {
|
||||||
|
ThreadLocalCloseable additionalClosable = null;
|
||||||
|
for (var guard = HEAD.get(); guard != null; guard = guard.parent) {
|
||||||
|
if (guard.label == label) {
|
||||||
|
additionalClosable = disableInThisThread();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var result = new RecursionGuard(HEAD.get(), label, additionalClosable);
|
||||||
|
HEAD.set(result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private RecursionGuard(RecursionGuard parent, Object label, ThreadLocalCloseable additionalClosable) {
|
||||||
|
this.parent = parent;
|
||||||
|
this.label = label;
|
||||||
|
this.additionalClosable = additionalClosable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ensureActive() {
|
||||||
|
if (HEAD.get() == null) {
|
||||||
|
throw new Error("RecursionGuard is not installed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
HEAD.set(parent);
|
||||||
|
if (additionalClosable != null) {
|
||||||
|
additionalClosable.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Intended only for suppressing warnings about unused variables.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public static void blackhole(Object any) {
|
||||||
|
// Nothing here.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -156,37 +156,40 @@ public class FileInputStream extends InputStream
|
|||||||
}
|
}
|
||||||
path = file.getPath();
|
path = file.getPath();
|
||||||
|
|
||||||
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
|
try (var guard = IoOverNio.RecursionGuard.create(FileInputStream.class)) {
|
||||||
Path nioPath = null;
|
IoOverNio.blackhole(guard);
|
||||||
if (nioFs != null && path != null) {
|
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
|
||||||
try {
|
Path nioPath = null;
|
||||||
nioPath = nioFs.getPath(path);
|
if (nioFs != null && path != null) {
|
||||||
isRegularFile = Files.isRegularFile(nioPath);
|
try {
|
||||||
} catch (InvalidPathException _) {
|
nioPath = nioFs.getPath(path);
|
||||||
// Nothing.
|
isRegularFile = Files.isRegularFile(nioPath);
|
||||||
|
} catch (InvalidPathException _) {
|
||||||
|
// Nothing.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Two significant differences between the legacy java.io and java.nio.files:
|
// 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 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.
|
// * 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;
|
useNio = nioPath != null && isRegularFile == Boolean.TRUE;
|
||||||
|
|
||||||
if (useNio) {
|
if (useNio) {
|
||||||
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
|
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
|
||||||
this, nioFs, file, nioPath, Set.of(StandardOpenOption.READ), channelCleanable);
|
this, nioFs, file, nioPath, Set.of(StandardOpenOption.READ), channelCleanable);
|
||||||
channel = bundle.channel();
|
channel = bundle.channel();
|
||||||
fd = bundle.fd();
|
fd = bundle.fd();
|
||||||
externalChannelHolder = bundle.externalChannelHolder();
|
externalChannelHolder = bundle.externalChannelHolder();
|
||||||
} else {
|
} else {
|
||||||
fd = new FileDescriptor();
|
fd = new FileDescriptor();
|
||||||
fd.attach(this);
|
fd.attach(this);
|
||||||
open(path);
|
open(path);
|
||||||
FileCleanable.register(fd); // open set the fd, register the cleanup
|
FileCleanable.register(fd); // open set the fd, register the cleanup
|
||||||
externalChannelHolder = null;
|
externalChannelHolder = null;
|
||||||
}
|
}
|
||||||
if (DEBUG.writeTraces()) {
|
if (DEBUG.writeTraces()) {
|
||||||
System.err.printf("Created a FileInputStream for %s%n", file);
|
System.err.printf("Created a FileInputStream for %s%n", file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,46 +225,49 @@ public class FileOutputStream extends OutputStream
|
|||||||
}
|
}
|
||||||
this.path = file.getPath();
|
this.path = file.getPath();
|
||||||
|
|
||||||
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
|
try (var guard = IoOverNio.RecursionGuard.create(FileOutputStream.class)) {
|
||||||
useNio = path != null && nioFs != null;
|
IoOverNio.blackhole(guard);
|
||||||
if (useNio) {
|
java.nio.file.FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
|
||||||
Path nioPath = nioFs.getPath(path);
|
useNio = path != null && nioFs != null;
|
||||||
|
if (useNio) {
|
||||||
|
Path nioPath = nioFs.getPath(path);
|
||||||
|
|
||||||
// java.io backend doesn't open DOS hidden files for writing, but java.nio.file opens.
|
// java.io backend doesn't open DOS hidden files for writing, but java.nio.file opens.
|
||||||
// This code mimics the old behavior.
|
// This code mimics the old behavior.
|
||||||
if (nioFs.getSeparator().equals("\\")) {
|
if (nioFs.getSeparator().equals("\\")) {
|
||||||
DosFileAttributes attrs = null;
|
DosFileAttributes attrs = null;
|
||||||
try {
|
try {
|
||||||
var view = Files.getFileAttributeView(nioPath, DosFileAttributeView.class);
|
var view = Files.getFileAttributeView(nioPath, DosFileAttributeView.class);
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
attrs = view.readAttributes();
|
attrs = view.readAttributes();
|
||||||
|
}
|
||||||
|
} catch (IOException | UnsupportedOperationException _) {
|
||||||
|
// Windows paths without DOS attributes? Not a problem in this case.
|
||||||
|
}
|
||||||
|
if (attrs != null && (attrs.isHidden() || attrs.isDirectory())) {
|
||||||
|
throw new FileNotFoundException(file.getPath() + " (Access is denied)");
|
||||||
}
|
}
|
||||||
} catch (IOException | UnsupportedOperationException _) {
|
|
||||||
// Windows paths without DOS attributes? Not a problem in this case.
|
|
||||||
}
|
|
||||||
if (attrs != null && (attrs.isHidden() || attrs.isDirectory())) {
|
|
||||||
throw new FileNotFoundException(file.getPath() + " (Access is denied)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set<OpenOption> options = append
|
||||||
|
? Set.of(StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.APPEND)
|
||||||
|
: Set.of(StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
||||||
|
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
|
||||||
|
this, nioFs, file, nioPath, options, channelCleanable);
|
||||||
|
channel = bundle.channel();
|
||||||
|
fd = bundle.fd();
|
||||||
|
externalChannelHolder = bundle.externalChannelHolder();
|
||||||
|
} else {
|
||||||
|
this.fd = new FileDescriptor();
|
||||||
|
fd.attach(this);
|
||||||
|
|
||||||
|
open(this.path, append);
|
||||||
|
FileCleanable.register(fd); // open sets the fd, register the cleanup
|
||||||
|
externalChannelHolder = null;
|
||||||
|
}
|
||||||
|
if (DEBUG.writeTraces()) {
|
||||||
|
System.err.printf("Created a FileOutputStream for %s%n", file);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<OpenOption> options = append
|
|
||||||
? Set.of(StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.APPEND)
|
|
||||||
: Set.of(StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
|
||||||
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
|
|
||||||
this, nioFs, file, nioPath, options, channelCleanable);
|
|
||||||
channel = bundle.channel();
|
|
||||||
fd = bundle.fd();
|
|
||||||
externalChannelHolder = bundle.externalChannelHolder();
|
|
||||||
} else {
|
|
||||||
this.fd = new FileDescriptor();
|
|
||||||
fd.attach(this);
|
|
||||||
|
|
||||||
open(this.path, append);
|
|
||||||
FileCleanable.register(fd); // open sets the fd, register the cleanup
|
|
||||||
externalChannelHolder = null;
|
|
||||||
}
|
|
||||||
if (DEBUG.writeTraces()) {
|
|
||||||
System.err.printf("Created a FileOutputStream for %s%n", file);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -273,10 +273,10 @@ class IoOverNioFileSystem extends FileSystem {
|
|||||||
try {
|
try {
|
||||||
// This tricky thread local variable allows specifying an argument for sun.nio.ch.FileChannelImpl.<init>
|
// This tricky thread local variable allows specifying an argument for sun.nio.ch.FileChannelImpl.<init>
|
||||||
// which is not present in the NIO public API and which is not easy to specify another way.
|
// which is not present in the NIO public API and which is not easy to specify another way.
|
||||||
IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL.set(owner);
|
IoOverNio.ParentForFileChannelImplHolder.set(owner);
|
||||||
return initializeStreamsUsingNio0(owner, nioFs, file, nioPath, optionsForChannel, channelCleanable);
|
return initializeStreamsUsingNio0(owner, nioFs, file, nioPath, optionsForChannel, channelCleanable);
|
||||||
} finally {
|
} finally {
|
||||||
IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL.remove();
|
IoOverNio.ParentForFileChannelImplHolder.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -876,7 +876,8 @@ class IoOverNioFileSystem extends FileSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean delete(File f) {
|
public boolean delete(File f) {
|
||||||
try {
|
try (var guard = IoOverNio.RecursionGuard.create("IoOverNioFileSystem.delete")) {
|
||||||
|
IoOverNio.blackhole(guard);
|
||||||
boolean result = delete0(f, true);
|
boolean result = delete0(f, true);
|
||||||
if (DEBUG.writeTraces()) {
|
if (DEBUG.writeTraces()) {
|
||||||
System.err.printf("IoOverNioFileSystem.delete(%s) = %b%n", f, result);
|
System.err.printf("IoOverNioFileSystem.delete(%s) = %b%n", f, result);
|
||||||
|
|||||||
@@ -279,47 +279,50 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
|
|||||||
}
|
}
|
||||||
path = name;
|
path = name;
|
||||||
|
|
||||||
FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
|
try (var guard = IoOverNio.RecursionGuard.create(RandomAccessFile.class)) {
|
||||||
Path nioPath = null;
|
IoOverNio.blackhole(guard);
|
||||||
if (nioFs != null) {
|
FileSystem nioFs = IoOverNioFileSystem.acquireNioFs(path);
|
||||||
try {
|
Path nioPath = null;
|
||||||
nioPath = nioFs.getPath(path);
|
if (nioFs != null) {
|
||||||
} catch (InvalidPathException _) {
|
try {
|
||||||
// Nothing.
|
nioPath = nioFs.getPath(path);
|
||||||
|
} catch (InvalidPathException _) {
|
||||||
|
// Nothing.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Two significant differences between the legacy java.io and java.nio.files:
|
// 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 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.
|
// * java.nio.file doesn't work well with pseudo devices, i.e., `seek()` fails, while java.io works well.
|
||||||
boolean isRegularFile;
|
boolean isRegularFile;
|
||||||
try {
|
try {
|
||||||
isRegularFile = nioPath != null &&
|
isRegularFile = nioPath != null &&
|
||||||
Files.readAttributes(nioPath, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS).isRegularFile();
|
Files.readAttributes(nioPath, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS).isRegularFile();
|
||||||
}
|
}
|
||||||
catch (NoSuchFileException _) {
|
catch (NoSuchFileException _) {
|
||||||
isRegularFile = true;
|
isRegularFile = true;
|
||||||
}
|
}
|
||||||
catch (IOException _) {
|
catch (IOException _) {
|
||||||
isRegularFile = false;
|
isRegularFile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
useNio = nioPath != null && isRegularFile;
|
useNio = nioPath != null && isRegularFile;
|
||||||
if (useNio) {
|
if (useNio) {
|
||||||
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
|
var bundle = IoOverNioFileSystem.initializeStreamUsingNio(
|
||||||
this, nioFs, file, nioPath, optionsForChannel(imode), channelCleanable);
|
this, nioFs, file, nioPath, optionsForChannel(imode), channelCleanable);
|
||||||
channel = bundle.channel();
|
channel = bundle.channel();
|
||||||
fd = bundle.fd();
|
fd = bundle.fd();
|
||||||
externalChannelHolder = bundle.externalChannelHolder();
|
externalChannelHolder = bundle.externalChannelHolder();
|
||||||
} else {
|
} else {
|
||||||
fd = new FileDescriptor();
|
fd = new FileDescriptor();
|
||||||
fd.attach(this);
|
fd.attach(this);
|
||||||
open(name, imode);
|
open(name, imode);
|
||||||
FileCleanable.register(fd); // open sets the fd, register the cleanup
|
FileCleanable.register(fd); // open sets the fd, register the cleanup
|
||||||
externalChannelHolder = null;
|
externalChannelHolder = null;
|
||||||
}
|
}
|
||||||
if (DEBUG.writeTraces()) {
|
if (DEBUG.writeTraces()) {
|
||||||
System.err.printf("Created a RandomAccessFile for %s%n", file);
|
System.err.printf("Created a RandomAccessFile for %s%n", file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public class FileChannelImpl
|
|||||||
this.sync = sync;
|
this.sync = sync;
|
||||||
this.direct = direct;
|
this.direct = direct;
|
||||||
if (parent == null) {
|
if (parent == null) {
|
||||||
parent = IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL.get();
|
parent = IoOverNio.ParentForFileChannelImplHolder.get();
|
||||||
}
|
}
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
if (direct) {
|
if (direct) {
|
||||||
|
|||||||
@@ -144,9 +144,6 @@ typedef enum awt_toolkit {
|
|||||||
TK_WAYLAND = 2
|
TK_WAYLAND = 2
|
||||||
} awt_toolkit;
|
} awt_toolkit;
|
||||||
|
|
||||||
// TODO when wayland support will be fully implemented change to TK_UNKNOWN
|
|
||||||
// currently wayland support is not Production-Ready ready so default awt toolkit is X11
|
|
||||||
// wayland could be chosen manually via passing -Dawt.toolkit.name=WLToolkit argument
|
|
||||||
static awt_toolkit _awt_toolkit = TK_X11;
|
static awt_toolkit _awt_toolkit = TK_X11;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -759,33 +756,48 @@ CallJavaMainInNewThread(jlong stack_size, void* args) {
|
|||||||
/* Coarse estimation of number of digits assuming the worst case is a 64-bit pid. */
|
/* Coarse estimation of number of digits assuming the worst case is a 64-bit pid. */
|
||||||
#define MAX_PID_STR_SZ 20
|
#define MAX_PID_STR_SZ 20
|
||||||
|
|
||||||
|
#ifdef __linux
|
||||||
static char*
|
static char*
|
||||||
getToolkitNameByEnv() {
|
GetToolkitName(void) {
|
||||||
if (_awt_toolkit == TK_UNKNOWN) {
|
if (_awt_toolkit == TK_UNKNOWN) { // Prefer WLToolkit, then XToolkit
|
||||||
char *xdg_session_type = getenv("XDG_SESSION_TYPE");
|
void* libwayland = dlopen(VERSIONED_JNI_LIB_NAME("wayland-client", "0"), RTLD_LAZY | RTLD_LOCAL);
|
||||||
if (xdg_session_type != NULL && strcmp(xdg_session_type, "wayland") == 0) {
|
if (!libwayland) {
|
||||||
_awt_toolkit = TK_WAYLAND;
|
// Fallback to any development version available on the system
|
||||||
} else if (xdg_session_type != NULL && strcmp(xdg_session_type, "x11") == 0) {
|
libwayland = dlopen(JNI_LIB_NAME("wayland-client"), RTLD_LAZY | RTLD_LOCAL);
|
||||||
_awt_toolkit = TK_X11;
|
}
|
||||||
} else if (getenv("DISPLAY") != NULL) {
|
if (libwayland) {
|
||||||
_awt_toolkit = TK_X11;
|
typedef void* (*wl_display_connect_t)(const char*);
|
||||||
} else if (getenv("WAYLAND_DISPLAY") != NULL) {
|
typedef void (*wl_display_disconnect_t)(void*);
|
||||||
_awt_toolkit = TK_WAYLAND;
|
|
||||||
|
wl_display_connect_t fp_wl_display_connect = dlsym(libwayland, "wl_display_connect");
|
||||||
|
wl_display_disconnect_t fp_wl_display_disconnect = dlsym(libwayland, "wl_display_disconnect");
|
||||||
|
|
||||||
|
if (fp_wl_display_connect && fp_wl_display_disconnect) {
|
||||||
|
void* display = fp_wl_display_connect(NULL);
|
||||||
|
if (display) {
|
||||||
|
_awt_toolkit = TK_WAYLAND;
|
||||||
|
fp_wl_display_disconnect(display);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dlclose(libwayland);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _awt_toolkit == TK_WAYLAND ? "WLToolkit" : "XToolkit";
|
return _awt_toolkit == TK_WAYLAND ? "WLToolkit" : "XToolkit";
|
||||||
}
|
}
|
||||||
|
#endif // __linux
|
||||||
|
|
||||||
int
|
int
|
||||||
JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
|
JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
|
||||||
int argc, char **argv,
|
int argc, char **argv,
|
||||||
int mode, char *what, int ret)
|
int mode, char *what, int ret)
|
||||||
{
|
{
|
||||||
char *toolkit_name = getToolkitNameByEnv();
|
#ifdef __linux
|
||||||
|
char *toolkit_name = GetToolkitName();
|
||||||
size_t toolkit_name_size = JLI_StrLen("-Dawt.toolkit.name=") + JLI_StrLen(toolkit_name) + 1;
|
size_t toolkit_name_size = JLI_StrLen("-Dawt.toolkit.name=") + JLI_StrLen(toolkit_name) + 1;
|
||||||
char *toolkit_option = (char *)JLI_MemAlloc(toolkit_name_size);
|
char *toolkit_option = (char *)JLI_MemAlloc(toolkit_name_size);
|
||||||
snprintf(toolkit_option, toolkit_name_size, "-Dawt.toolkit.name=%s", toolkit_name);
|
snprintf(toolkit_option, toolkit_name_size, "-Dawt.toolkit.name=%s", toolkit_name);
|
||||||
AddOption(toolkit_option, NULL);
|
AddOption(toolkit_option, NULL);
|
||||||
|
#endif // __linux
|
||||||
|
|
||||||
ShowSplashScreen();
|
ShowSplashScreen();
|
||||||
return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
|
return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
|
||||||
@@ -806,7 +818,10 @@ RegisterThread()
|
|||||||
jboolean
|
jboolean
|
||||||
ProcessPlatformOption(const char *arg)
|
ProcessPlatformOption(const char *arg)
|
||||||
{
|
{
|
||||||
if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=WLToolkit") == 0) {
|
if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=auto") == 0) {
|
||||||
|
_awt_toolkit = TK_UNKNOWN;
|
||||||
|
return JNI_TRUE;
|
||||||
|
} else if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=WLToolkit") == 0) {
|
||||||
_awt_toolkit = TK_WAYLAND;
|
_awt_toolkit = TK_WAYLAND;
|
||||||
return JNI_TRUE;
|
return JNI_TRUE;
|
||||||
} else if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=XToolkit") == 0) {
|
} else if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=XToolkit") == 0) {
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* 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. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.jetbrains.desktop;
|
||||||
|
|
||||||
|
import com.jetbrains.desktop.image.TextureWrapperSurfaceManager;
|
||||||
|
import com.jetbrains.exported.JBRApi;
|
||||||
|
import sun.awt.image.SurfaceManager;
|
||||||
|
import sun.java2d.SurfaceData;
|
||||||
|
import sun.java2d.metal.MTLGraphicsConfig;
|
||||||
|
import sun.java2d.metal.MTLTextureWrapperSurfaceData;
|
||||||
|
|
||||||
|
import java.awt.GraphicsConfiguration;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
|
import java.awt.Image;
|
||||||
|
|
||||||
|
@JBRApi.Service
|
||||||
|
@JBRApi.Provides("SharedTextures")
|
||||||
|
public class SharedTexturesService extends SharedTextures {
|
||||||
|
private final int textureType;
|
||||||
|
|
||||||
|
public SharedTexturesService() {
|
||||||
|
textureType = getTextureTypeImpl();
|
||||||
|
if (textureType == UNDEFINED_TEXTURE_TYPE) {
|
||||||
|
throw new JBRApi.ServiceNotAvailableException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTextureType() {
|
||||||
|
return textureType;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getTextureTypeImpl() {
|
||||||
|
GraphicsConfiguration gc = GraphicsEnvironment
|
||||||
|
.getLocalGraphicsEnvironment()
|
||||||
|
.getDefaultScreenDevice()
|
||||||
|
.getDefaultConfiguration();
|
||||||
|
|
||||||
|
if (gc instanceof MTLGraphicsConfig) {
|
||||||
|
return METAL_TEXTURE_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected SurfaceManager createSurfaceManager(GraphicsConfiguration gc, Image image, long texture) {
|
||||||
|
SurfaceData sd;
|
||||||
|
if (gc instanceof MTLGraphicsConfig mtlGraphicsConfig) {
|
||||||
|
sd = new MTLTextureWrapperSurfaceData(mtlGraphicsConfig, image, texture);
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("Unsupported graphics configuration: " + gc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new TextureWrapperSurfaceManager(sd);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -31,7 +31,6 @@ import sun.awt.CGraphicsEnvironment;
|
|||||||
import sun.awt.image.OffScreenImage;
|
import sun.awt.image.OffScreenImage;
|
||||||
import sun.awt.image.SunVolatileImage;
|
import sun.awt.image.SunVolatileImage;
|
||||||
import sun.awt.image.SurfaceManager;
|
import sun.awt.image.SurfaceManager;
|
||||||
import sun.awt.image.TextureWrapperSurfaceManager;
|
|
||||||
import sun.awt.image.VolatileSurfaceManager;
|
import sun.awt.image.VolatileSurfaceManager;
|
||||||
import sun.java2d.Disposer;
|
import sun.java2d.Disposer;
|
||||||
import sun.java2d.DisposerRecord;
|
import sun.java2d.DisposerRecord;
|
||||||
@@ -49,7 +48,6 @@ import java.awt.BufferCapabilities;
|
|||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.GraphicsConfiguration;
|
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.ImageCapabilities;
|
import java.awt.ImageCapabilities;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
@@ -71,7 +69,7 @@ import static sun.java2d.pipe.hw.ContextCapabilities.*;
|
|||||||
import static sun.java2d.metal.MTLContext.MTLContextCaps.CAPS_EXT_BIOP_SHADER;
|
import static sun.java2d.metal.MTLContext.MTLContextCaps.CAPS_EXT_BIOP_SHADER;
|
||||||
|
|
||||||
public final class MTLGraphicsConfig extends CGraphicsConfig
|
public final class MTLGraphicsConfig extends CGraphicsConfig
|
||||||
implements AccelGraphicsConfig, SurfaceManager.Factory, SurfaceManager.TextureWrapperFactory
|
implements AccelGraphicsConfig, SurfaceManager.Factory
|
||||||
{
|
{
|
||||||
private static ImageCapabilities imageCaps = new MTLImageCaps();
|
private static ImageCapabilities imageCaps = new MTLImageCaps();
|
||||||
|
|
||||||
@@ -380,11 +378,4 @@ public final class MTLGraphicsConfig extends CGraphicsConfig
|
|||||||
Object context) {
|
Object context) {
|
||||||
return new MTLVolatileSurfaceManager(image, context);
|
return new MTLVolatileSurfaceManager(image, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public SurfaceManager createTextureWrapperSurfaceManager(
|
|
||||||
GraphicsConfiguration gc, Image image, long texture) {
|
|
||||||
SurfaceData sd = MTLSurfaceData.createData(this, image, texture);
|
|
||||||
return new TextureWrapperSurfaceManager(sd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ import java.awt.Transparency;
|
|||||||
|
|
||||||
import java.awt.image.ColorModel;
|
import java.awt.image.ColorModel;
|
||||||
import java.awt.image.Raster;
|
import java.awt.image.Raster;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
|
|
||||||
import static sun.java2d.pipe.BufferedOpCodes.DISPOSE_SURFACE;
|
import static sun.java2d.pipe.BufferedOpCodes.DISPOSE_SURFACE;
|
||||||
import static sun.java2d.pipe.BufferedOpCodes.FLUSH_SURFACE;
|
import static sun.java2d.pipe.BufferedOpCodes.FLUSH_SURFACE;
|
||||||
@@ -152,7 +151,7 @@ public abstract class MTLSurfaceData extends SurfaceData
|
|||||||
private native void initOps(MTLGraphicsConfig gc, long pConfigInfo, long pPeerData, long layerPtr,
|
private native void initOps(MTLGraphicsConfig gc, long pConfigInfo, long pPeerData, long layerPtr,
|
||||||
int xoff, int yoff, boolean isOpaque);
|
int xoff, int yoff, boolean isOpaque);
|
||||||
|
|
||||||
private MTLSurfaceData(MTLLayer layer, MTLGraphicsConfig gc,
|
protected MTLSurfaceData(MTLLayer layer, MTLGraphicsConfig gc,
|
||||||
ColorModel cm, int type, int width, int height)
|
ColorModel cm, int type, int width, int height)
|
||||||
{
|
{
|
||||||
super(getCustomSurfaceType(type), cm);
|
super(getCustomSurfaceType(type), cm);
|
||||||
@@ -201,10 +200,6 @@ public abstract class MTLSurfaceData extends SurfaceData
|
|||||||
type);
|
type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MTLTextureWrapperSurfaceData createData(MTLGraphicsConfig gc, Image image, long pTexture) {
|
|
||||||
return new MTLTextureWrapperSurfaceData(gc, image, pTexture);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getDefaultScaleX() {
|
public double getDefaultScaleX() {
|
||||||
return scale;
|
return scale;
|
||||||
@@ -224,8 +219,6 @@ public abstract class MTLSurfaceData extends SurfaceData
|
|||||||
|
|
||||||
protected native boolean initTexture(long pData, boolean isOpaque, int width, int height);
|
protected native boolean initTexture(long pData, boolean isOpaque, int width, int height);
|
||||||
|
|
||||||
protected native boolean initWithTexture(long pData, boolean isOpaque, long texturePtr);
|
|
||||||
|
|
||||||
protected native boolean initRTexture(long pData, boolean isOpaque, int width, int height);
|
protected native boolean initRTexture(long pData, boolean isOpaque, int width, int height);
|
||||||
|
|
||||||
protected native boolean initFlipBackbuffer(long pData, boolean isOpaque, int width, int height);
|
protected native boolean initFlipBackbuffer(long pData, boolean isOpaque, int width, int height);
|
||||||
@@ -681,46 +674,4 @@ public abstract class MTLSurfaceData extends SurfaceData
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static native boolean loadNativeRasterWithRects(long sdops, long pRaster, int width, int height, long pRects, int rectsCount);
|
private static native boolean loadNativeRasterWithRects(long sdops, long pRaster, int width, int height, long pRects, int rectsCount);
|
||||||
|
|
||||||
/**
|
|
||||||
* Surface data for an existing texture
|
|
||||||
*/
|
|
||||||
public static final class MTLTextureWrapperSurfaceData extends MTLSurfaceData {
|
|
||||||
private final Image myImage;
|
|
||||||
|
|
||||||
private MTLTextureWrapperSurfaceData(MTLGraphicsConfig gc, Image image, long pTexture) throws IllegalArgumentException {
|
|
||||||
super(null, gc, ColorModel.getRGBdefault(), RT_TEXTURE, /*width=*/ 0, /*height=*/ 0);
|
|
||||||
myImage = image;
|
|
||||||
|
|
||||||
MTLRenderQueue rq = MTLRenderQueue.getInstance();
|
|
||||||
AtomicBoolean success = new AtomicBoolean(false);
|
|
||||||
|
|
||||||
rq.lock();
|
|
||||||
try {
|
|
||||||
MTLContext.setScratchSurface(gc);
|
|
||||||
rq.flushAndInvokeNow(() -> success.set(initWithTexture(getNativeOps(), false, pTexture)));
|
|
||||||
} finally {
|
|
||||||
rq.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!success.get()) {
|
|
||||||
throw new IllegalArgumentException("Failed to init the surface data");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SurfaceData getReplacement() {
|
|
||||||
throw new UnsupportedOperationException("not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getDestination() {
|
|
||||||
return myImage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Rectangle getBounds() {
|
|
||||||
return getNativeBounds();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package sun.java2d.metal;
|
||||||
|
|
||||||
|
public class MTLSurfaceDataExt {
|
||||||
|
public static boolean initWithTexture(MTLSurfaceData sd, long texturePtr) {
|
||||||
|
return initWithTexture(sd.getNativeOps(), false, texturePtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native boolean initWithTexture(long pData, boolean isOpaque, long texturePtr);
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package sun.java2d.metal;
|
||||||
|
|
||||||
|
import sun.java2d.SurfaceData;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.image.ColorModel;
|
||||||
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Surface data for an existing texture
|
||||||
|
*/
|
||||||
|
public final class MTLTextureWrapperSurfaceData extends MTLSurfaceData {
|
||||||
|
private final Image myImage;
|
||||||
|
|
||||||
|
public MTLTextureWrapperSurfaceData(MTLGraphicsConfig gc, Image image, long pTexture) throws IllegalArgumentException {
|
||||||
|
super(null, gc, gc.getColorModel(TRANSLUCENT), RT_TEXTURE, /*width=*/ 0, /*height=*/ 0);
|
||||||
|
myImage = image;
|
||||||
|
|
||||||
|
MTLRenderQueue rq = MTLRenderQueue.getInstance();
|
||||||
|
AtomicBoolean success = new AtomicBoolean(false);
|
||||||
|
|
||||||
|
rq.lock();
|
||||||
|
try {
|
||||||
|
MTLContext.setScratchSurface(gc);
|
||||||
|
rq.flushAndInvokeNow(() -> success.set(MTLSurfaceDataExt.initWithTexture(this, pTexture)));
|
||||||
|
} finally {
|
||||||
|
rq.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!success.get()) {
|
||||||
|
throw new IllegalArgumentException("Failed to init the surface data");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SurfaceData getReplacement() {
|
||||||
|
throw new UnsupportedOperationException("not implemented");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getDestination() {
|
||||||
|
return myImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Rectangle getBounds() {
|
||||||
|
return getNativeBounds();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,7 +45,6 @@ import java.awt.Toolkit;
|
|||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.FocusEvent;
|
import java.awt.event.FocusEvent;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.awt.event.WindowStateListener;
|
|
||||||
import java.awt.peer.ComponentPeer;
|
import java.awt.peer.ComponentPeer;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
@@ -1066,33 +1065,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
|||||||
return isFullScreenMode;
|
return isFullScreenMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void waitForWindowState(int state) {
|
|
||||||
if (peer.getState() == state) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object lock = new Object();
|
|
||||||
WindowStateListener wsl = new WindowStateListener() {
|
|
||||||
public void windowStateChanged(WindowEvent e) {
|
|
||||||
synchronized (lock) {
|
|
||||||
if (e.getNewState() == state) {
|
|
||||||
lock.notifyAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
target.addWindowStateListener(wsl);
|
|
||||||
if (peer.getState() != state) {
|
|
||||||
synchronized (lock) {
|
|
||||||
try {
|
|
||||||
lock.wait();
|
|
||||||
} catch (InterruptedException ie) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
target.removeWindowStateListener(wsl);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setWindowState(int windowState) {
|
public void setWindowState(int windowState) {
|
||||||
if (peer == null || !peer.isVisible()) {
|
if (peer == null || !peer.isVisible()) {
|
||||||
@@ -1114,7 +1086,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
|||||||
// let's return into the normal states first
|
// let's return into the normal states first
|
||||||
// the zoom call toggles between the normal and the max states
|
// the zoom call toggles between the normal and the max states
|
||||||
unmaximize();
|
unmaximize();
|
||||||
waitForWindowState(Frame.NORMAL);
|
|
||||||
}
|
}
|
||||||
execute(CWrapper.NSWindow::miniaturize);
|
execute(CWrapper.NSWindow::miniaturize);
|
||||||
break;
|
break;
|
||||||
@@ -1122,7 +1093,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
|||||||
if (prevWindowState == Frame.ICONIFIED) {
|
if (prevWindowState == Frame.ICONIFIED) {
|
||||||
// let's return into the normal states first
|
// let's return into the normal states first
|
||||||
execute(CWrapper.NSWindow::deminiaturize);
|
execute(CWrapper.NSWindow::deminiaturize);
|
||||||
waitForWindowState(Frame.NORMAL);
|
|
||||||
}
|
}
|
||||||
maximize();
|
maximize();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -548,6 +548,7 @@ JNI_COCOA_ENTER(env);
|
|||||||
|
|
||||||
(*env)->CallVoidMethod(env, config, jc_DisplayConfiguration_addDescriptor,
|
(*env)->CallVoidMethod(env, config, jc_DisplayConfiguration_addDescriptor,
|
||||||
displayID, top, left, bottom, right, scale);
|
displayID, top, left, bottom, right, scale);
|
||||||
|
CHECK_EXCEPTION();
|
||||||
}
|
}
|
||||||
|
|
||||||
JNI_COCOA_EXIT(env);
|
JNI_COCOA_EXIT(env);
|
||||||
|
|||||||
@@ -67,9 +67,17 @@ static jclass sjc_CAccessibility = NULL;
|
|||||||
jobject axComponent = (*env)->CallStaticObjectMethod(env, sjc_CAccessibility,
|
jobject axComponent = (*env)->CallStaticObjectMethod(env, sjc_CAccessibility,
|
||||||
sjm_getCurrentAccessiblePopupMenu,
|
sjm_getCurrentAccessiblePopupMenu,
|
||||||
fAccessible, fComponent);
|
fAccessible, fComponent);
|
||||||
|
CHECK_EXCEPTION();
|
||||||
|
if (axComponent == NULL) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
CommonComponentAccessibility *currentElement = [CommonComponentAccessibility createWithAccessible:axComponent
|
CommonComponentAccessibility *currentElement = [CommonComponentAccessibility createWithAccessible:axComponent
|
||||||
withEnv:env withView:self->fView isCurrent:YES];
|
withEnv:env withView:self->fView isCurrent:YES];
|
||||||
|
(*env)->DeleteLocalRef(env, axComponent);
|
||||||
|
if (currentElement == nil) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
NSArray *children = [CommonComponentAccessibility childrenOfParent:currentElement
|
NSArray *children = [CommonComponentAccessibility childrenOfParent:currentElement
|
||||||
withEnv:env
|
withEnv:env
|
||||||
|
|||||||
@@ -112,6 +112,13 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
|||||||
NSLock* _lock;
|
NSLock* _lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (NSUInteger) getDrawableId:(id<MTLDrawable>)mtlDrawable {
|
||||||
|
if (@available(macOS 10.15.4, *)) {
|
||||||
|
return [mtlDrawable drawableID];
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
- (id) initWithJavaLayer:(jobject)layer usePerfCounters:(jboolean)perfCountersEnabled
|
- (id) initWithJavaLayer:(jobject)layer usePerfCounters:(jboolean)perfCountersEnabled
|
||||||
{
|
{
|
||||||
AWT_ASSERT_APPKIT_THREAD;
|
AWT_ASSERT_APPKIT_THREAD;
|
||||||
@@ -246,12 +253,12 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
|||||||
#if TRACE_DISPLAY_ON
|
#if TRACE_DISPLAY_ON
|
||||||
self.avgNextDrawableTime = nextDrawableLatency * a + self.avgNextDrawableTime * (1.0 - a);
|
self.avgNextDrawableTime = nextDrawableLatency * a + self.avgNextDrawableTime * (1.0 - a);
|
||||||
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
|
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
|
||||||
"[%.6lf] MTLLayer_blitTexture: drawable(%d) presented"
|
"[%.6lf] MTLLayer_blitTexture: drawable(%d) presented"
|
||||||
" - nextDrawableLatency = %.3lf ms - average = %.3lf ms",
|
" - nextDrawableLatency = %.3lf ms - average = %.3lf ms",
|
||||||
CACurrentMediaTime(), mtlDrawable.drawableID,
|
CACurrentMediaTime(), [MTLLayer getDrawableId:mtlDrawable],
|
||||||
1000.0 * nextDrawableLatency, 1000.0 * self.avgNextDrawableTime
|
1000.0 * nextDrawableLatency, 1000.0 * self.avgNextDrawableTime
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
// Keep Fence from now:
|
// Keep Fence from now:
|
||||||
@@ -284,7 +291,7 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
|||||||
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
|
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
|
||||||
"[%.6lf] MTLLayer_blitTexture_PresentedHandler: drawable(%d) presented"
|
"[%.6lf] MTLLayer_blitTexture_PresentedHandler: drawable(%d) presented"
|
||||||
" - presentedHandlerLatency = %.3lf ms frameInterval = %.3lf ms",
|
" - presentedHandlerLatency = %.3lf ms frameInterval = %.3lf ms",
|
||||||
CACurrentMediaTime(), drawable.drawableID,
|
CACurrentMediaTime(), [MTLLayer getDrawableId:drawable],
|
||||||
1000.0 * presentedHandlerLatency, 1000.0 * frameInterval
|
1000.0 * presentedHandlerLatency, 1000.0 * frameInterval
|
||||||
);
|
);
|
||||||
self.lastPresentedTime = presentedTime;
|
self.lastPresentedTime = presentedTime;
|
||||||
@@ -299,7 +306,8 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
|||||||
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
|
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
|
||||||
"[%.6lf] MTLLayer_blitTexture_PresentedHandler: drawable(%d) skipped"
|
"[%.6lf] MTLLayer_blitTexture_PresentedHandler: drawable(%d) skipped"
|
||||||
" - presentedHandlerLatency = %.3lf ms",
|
" - presentedHandlerLatency = %.3lf ms",
|
||||||
CACurrentMediaTime(), drawable.drawableID, 1000.0 * presentedHandlerLatency
|
CACurrentMediaTime(), [MTLLayer getDrawableId:drawable],
|
||||||
|
1000.0 * presentedHandlerLatency
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -309,7 +317,7 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
|||||||
// Present drawable:
|
// Present drawable:
|
||||||
NSUInteger drawableId = -1;
|
NSUInteger drawableId = -1;
|
||||||
if (TRACE_DISPLAY) {
|
if (TRACE_DISPLAY) {
|
||||||
drawableId = mtlDrawable.drawableID;
|
drawableId = [MTLLayer getDrawableId:mtlDrawable];
|
||||||
J2dRlsTraceLn(J2D_TRACE_INFO,
|
J2dRlsTraceLn(J2D_TRACE_INFO,
|
||||||
"[%.6lf] MTLLayer.blitTexture: layer[%p] present drawable(%d)",
|
"[%.6lf] MTLLayer.blitTexture: layer[%p] present drawable(%d)",
|
||||||
CACurrentMediaTime(), self, drawableId);
|
CACurrentMediaTime(), self, drawableId);
|
||||||
|
|||||||
@@ -107,81 +107,6 @@ static jboolean MTLSurfaceData_initTexture(BMTLSDOps *bmtlsdo, jboolean isOpaque
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static jboolean MTLSurfaceData_initWithTexture(BMTLSDOps *bmtlsdo, jboolean isOpaque, void* pTexture) {
|
|
||||||
@autoreleasepool {
|
|
||||||
if (bmtlsdo == NULL) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: ops are null");
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pTexture == NULL) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: texture is null");
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
id <MTLTexture> texture = (__bridge id <MTLTexture>) pTexture;
|
|
||||||
if (texture == NULL) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: failed to cast texture to MTLTexture");
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (texture.width >= MTL_GPU_FAMILY_MAC_TXT_SIZE || texture.height >= MTL_GPU_FAMILY_MAC_TXT_SIZE ||
|
|
||||||
texture.width == 0 || texture.height == 0) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: wrong texture size %d x %d",
|
|
||||||
texture.width, texture.height);
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (texture.pixelFormat != MTLPixelFormatBGRA8Unorm) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: unsupported pixel format: %d",
|
|
||||||
texture.pixelFormat);
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bmtlsdo->pTexture = texture;
|
|
||||||
bmtlsdo->pOutTexture = NULL;
|
|
||||||
|
|
||||||
MTLSDOps *mtlsdo = (MTLSDOps *)bmtlsdo->privOps;
|
|
||||||
if (mtlsdo == NULL) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: MTLSDOps are null");
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
if (mtlsdo->configInfo == NULL || mtlsdo->configInfo->context == NULL) {
|
|
||||||
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: MTLSDOps wasn't initialized (context is null)");
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
MTLContext* ctx = mtlsdo->configInfo->context;
|
|
||||||
MTLTextureDescriptor *stencilDataDescriptor =
|
|
||||||
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatR8Uint
|
|
||||||
width:texture.width
|
|
||||||
height:texture.height
|
|
||||||
mipmapped:NO];
|
|
||||||
stencilDataDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead;
|
|
||||||
stencilDataDescriptor.storageMode = MTLStorageModePrivate;
|
|
||||||
bmtlsdo->pStencilData = [ctx.device newTextureWithDescriptor:stencilDataDescriptor];
|
|
||||||
|
|
||||||
MTLTextureDescriptor *stencilTextureDescriptor =
|
|
||||||
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatStencil8
|
|
||||||
width:texture.width
|
|
||||||
height:texture.height
|
|
||||||
mipmapped:NO];
|
|
||||||
stencilTextureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite;
|
|
||||||
stencilTextureDescriptor.storageMode = MTLStorageModePrivate;
|
|
||||||
bmtlsdo->pStencilTexture = [ctx.device newTextureWithDescriptor:stencilTextureDescriptor];
|
|
||||||
|
|
||||||
bmtlsdo->isOpaque = isOpaque;
|
|
||||||
bmtlsdo->width = texture.width;
|
|
||||||
bmtlsdo->height = texture.height;
|
|
||||||
bmtlsdo->drawableType = MTLSD_RT_TEXTURE;
|
|
||||||
|
|
||||||
[texture retain];
|
|
||||||
|
|
||||||
J2dTraceLn(J2D_TRACE_VERBOSE, "MTLSurfaceData_initTexture: w=%d h=%d bp=%p [tex=%p] opaque=%d sfType=%d",
|
|
||||||
bmtlsdo->width, bmtlsdo->height, bmtlsdo, bmtlsdo->pTexture, isOpaque, bmtlsdo->drawableType);
|
|
||||||
return JNI_TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes an MTL texture, using the given width and height as
|
* Initializes an MTL texture, using the given width and height as
|
||||||
* a guide.
|
* a guide.
|
||||||
@@ -198,19 +123,6 @@ Java_sun_java2d_metal_MTLSurfaceData_initTexture(
|
|||||||
return JNI_TRUE;
|
return JNI_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL
|
|
||||||
Java_sun_java2d_metal_MTLSurfaceData_initWithTexture(
|
|
||||||
JNIEnv *env, jobject mtlds,
|
|
||||||
jlong pData, jboolean isOpaque,
|
|
||||||
jlong pTexture) {
|
|
||||||
BMTLSDOps *bmtlsdops = (BMTLSDOps *) pData;
|
|
||||||
if (!MTLSurfaceData_initWithTexture(bmtlsdops, isOpaque, jlong_to_ptr(pTexture))) {
|
|
||||||
return JNI_FALSE;
|
|
||||||
}
|
|
||||||
MTLSD_SetNativeDimensions(env, (BMTLSDOps *) pData, bmtlsdops->width, bmtlsdops->height);
|
|
||||||
return JNI_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a framebuffer object, using the given width and height as
|
* Initializes a framebuffer object, using the given width and height as
|
||||||
* a guide. See MTLSD_InitTextureObject() and MTLSD_initRTexture()
|
* a guide. See MTLSD_InitTextureObject() and MTLSD_initRTexture()
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
#import "MTLSurfaceData.h"
|
||||||
|
|
||||||
|
#import "jni_util.h"
|
||||||
|
|
||||||
|
// From MTLSurfaceData.m
|
||||||
|
extern void MTLSD_SetNativeDimensions(JNIEnv *env, BMTLSDOps *bmtlsdo, jint w, jint h);
|
||||||
|
|
||||||
|
static jboolean MTLSurfaceData_initWithTexture(
|
||||||
|
BMTLSDOps *bmtlsdo,
|
||||||
|
jboolean isOpaque,
|
||||||
|
void* pTexture
|
||||||
|
) {
|
||||||
|
@autoreleasepool {
|
||||||
|
if (bmtlsdo == NULL) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: ops are null");
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pTexture == NULL) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: texture is null");
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
id <MTLTexture> texture = (__bridge id <MTLTexture>) pTexture;
|
||||||
|
if (texture == NULL) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: failed to cast texture to MTLTexture");
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (texture.width >= MTL_GPU_FAMILY_MAC_TXT_SIZE || texture.height >= MTL_GPU_FAMILY_MAC_TXT_SIZE ||
|
||||||
|
texture.width == 0 || texture.height == 0) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: wrong texture size %d x %d",
|
||||||
|
texture.width, texture.height);
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (texture.pixelFormat != MTLPixelFormatBGRA8Unorm) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: unsupported pixel format: %d",
|
||||||
|
texture.pixelFormat);
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bmtlsdo->pTexture = texture;
|
||||||
|
bmtlsdo->pOutTexture = NULL;
|
||||||
|
|
||||||
|
MTLSDOps *mtlsdo = (MTLSDOps *)bmtlsdo->privOps;
|
||||||
|
if (mtlsdo == NULL) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: MTLSDOps are null");
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
if (mtlsdo->configInfo == NULL || mtlsdo->configInfo->context == NULL) {
|
||||||
|
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLSurfaceData_initWithTexture: MTLSDOps wasn't initialized (context is null)");
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
MTLContext* ctx = mtlsdo->configInfo->context;
|
||||||
|
MTLTextureDescriptor *stencilDataDescriptor =
|
||||||
|
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatR8Uint
|
||||||
|
width:texture.width
|
||||||
|
height:texture.height
|
||||||
|
mipmapped:NO];
|
||||||
|
stencilDataDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead;
|
||||||
|
stencilDataDescriptor.storageMode = MTLStorageModePrivate;
|
||||||
|
bmtlsdo->pStencilData = [ctx.device newTextureWithDescriptor:stencilDataDescriptor];
|
||||||
|
|
||||||
|
MTLTextureDescriptor *stencilTextureDescriptor =
|
||||||
|
[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatStencil8
|
||||||
|
width:texture.width
|
||||||
|
height:texture.height
|
||||||
|
mipmapped:NO];
|
||||||
|
stencilTextureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite;
|
||||||
|
stencilTextureDescriptor.storageMode = MTLStorageModePrivate;
|
||||||
|
bmtlsdo->pStencilTexture = [ctx.device newTextureWithDescriptor:stencilTextureDescriptor];
|
||||||
|
|
||||||
|
bmtlsdo->isOpaque = isOpaque;
|
||||||
|
bmtlsdo->width = texture.width;
|
||||||
|
bmtlsdo->height = texture.height;
|
||||||
|
bmtlsdo->drawableType = MTLSD_RT_TEXTURE;
|
||||||
|
|
||||||
|
[texture retain];
|
||||||
|
|
||||||
|
J2dTraceLn(J2D_TRACE_VERBOSE, "MTLSurfaceData_initTexture: w=%d h=%d bp=%p [tex=%p] opaque=%d sfType=%d",
|
||||||
|
bmtlsdo->width, bmtlsdo->height, bmtlsdo, bmtlsdo->pTexture, isOpaque, bmtlsdo->drawableType);
|
||||||
|
return JNI_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jboolean JNICALL
|
||||||
|
Java_sun_java2d_metal_MTLSurfaceDataExt_initWithTexture(
|
||||||
|
JNIEnv *env,
|
||||||
|
jclass cls,
|
||||||
|
jlong pData,
|
||||||
|
jboolean isOpaque,
|
||||||
|
jlong pTexture
|
||||||
|
) {
|
||||||
|
BMTLSDOps *bmtlsdops = (BMTLSDOps *) pData;
|
||||||
|
if (!MTLSurfaceData_initWithTexture(bmtlsdops, isOpaque, jlong_to_ptr(pTexture))) {
|
||||||
|
return JNI_FALSE;
|
||||||
|
}
|
||||||
|
MTLSD_SetNativeDimensions(env, (BMTLSDOps *) pData, bmtlsdops->width, bmtlsdops->height);
|
||||||
|
return JNI_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -26,52 +26,19 @@
|
|||||||
package com.jetbrains.desktop;
|
package com.jetbrains.desktop;
|
||||||
|
|
||||||
import com.jetbrains.desktop.image.TextureWrapperImage;
|
import com.jetbrains.desktop.image.TextureWrapperImage;
|
||||||
import com.jetbrains.exported.JBRApi;
|
import sun.awt.image.SurfaceManager;
|
||||||
import sun.awt.SunToolkit;
|
|
||||||
|
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.*;
|
||||||
import java.awt.GraphicsEnvironment;
|
|
||||||
import java.awt.Image;
|
|
||||||
|
|
||||||
@JBRApi.Service
|
public abstract class SharedTextures {
|
||||||
@JBRApi.Provides("SharedTextures")
|
public final static int UNDEFINED_TEXTURE_TYPE = 0;
|
||||||
public class SharedTextures {
|
|
||||||
public final static int METAL_TEXTURE_TYPE = 1;
|
public final static int METAL_TEXTURE_TYPE = 1;
|
||||||
|
|
||||||
private final int textureType;
|
public abstract int getTextureType();
|
||||||
|
|
||||||
public static SharedTextures create() {
|
public final Image wrapTexture(GraphicsConfiguration gc, long texture) {
|
||||||
return new SharedTextures();
|
return new TextureWrapperImage((img) -> createSurfaceManager(gc, img, texture));
|
||||||
}
|
}
|
||||||
|
|
||||||
private SharedTextures() {
|
protected abstract SurfaceManager createSurfaceManager(GraphicsConfiguration gc, Image image, long texture);
|
||||||
textureType = getTextureTypeImpl();
|
|
||||||
if (textureType == 0) {
|
|
||||||
throw new JBRApi.ServiceNotAvailableException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getTextureType() {
|
|
||||||
return textureType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Image wrapTexture(GraphicsConfiguration gc, long texture) {
|
|
||||||
return new TextureWrapperImage(gc, texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int getTextureTypeImpl() {
|
|
||||||
GraphicsConfiguration gc = GraphicsEnvironment
|
|
||||||
.getLocalGraphicsEnvironment()
|
|
||||||
.getDefaultScreenDevice()
|
|
||||||
.getDefaultConfiguration();
|
|
||||||
try {
|
|
||||||
if (SunToolkit.isInstanceOf(gc, "sun.java2d.metal.MTLGraphicsConfig")) {
|
|
||||||
return METAL_TEXTURE_TYPE;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new InternalError("Unexpected exception during reflection", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import java.awt.ImageCapabilities;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.awt.image.ImageObserver;
|
import java.awt.image.ImageObserver;
|
||||||
import java.awt.image.ImageProducer;
|
import java.awt.image.ImageProducer;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is a wrapper for a GPU texture-based image.
|
* This class is a wrapper for a GPU texture-based image.
|
||||||
@@ -51,31 +52,14 @@ import java.awt.image.ImageProducer;
|
|||||||
* the surface flushing.
|
* the surface flushing.
|
||||||
*/
|
*/
|
||||||
public class TextureWrapperImage extends Image {
|
public class TextureWrapperImage extends Image {
|
||||||
final GraphicsConfiguration gc;
|
|
||||||
final SurfaceData sd;
|
final SurfaceData sd;
|
||||||
final static ImageCapabilities capabilities = new ImageCapabilities(true);
|
final static ImageCapabilities capabilities = new ImageCapabilities(true);
|
||||||
|
|
||||||
/**
|
public TextureWrapperImage(Function<Image, SurfaceManager> surfaceManagerFactory)
|
||||||
* Constructs a TextureWrapperImage instance with the specified graphics configuration
|
|
||||||
* and a texture.
|
|
||||||
*
|
|
||||||
* @param gc the graphics configuration
|
|
||||||
* @param texture the texture that will be wrapped by this instance.
|
|
||||||
* Platform-specific details:
|
|
||||||
* macOS (with the Metal rendering pipeline) - a pointer to an MTLTexture object is expected
|
|
||||||
*
|
|
||||||
* @throws UnsupportedOperationException if the current pipeline is not supported
|
|
||||||
* @throws IllegalArgumentException if the texture cannot be wrapped
|
|
||||||
*/
|
|
||||||
public TextureWrapperImage(GraphicsConfiguration gc, long texture)
|
|
||||||
throws UnsupportedOperationException, IllegalArgumentException {
|
throws UnsupportedOperationException, IllegalArgumentException {
|
||||||
this.gc = gc;
|
SurfaceManager sm = surfaceManagerFactory.apply(this);
|
||||||
SurfaceManager surfaceManager;
|
sd = sm.getPrimarySurfaceData();
|
||||||
if (gc instanceof SurfaceManager.TextureWrapperFactory factory) {
|
SurfaceManager.setManager(this, sm);
|
||||||
surfaceManager = factory.createTextureWrapperSurfaceManager(gc, this, texture);
|
|
||||||
} else throw new UnsupportedOperationException();
|
|
||||||
sd = surfaceManager.getPrimarySurfaceData();
|
|
||||||
SurfaceManager.setManager(this, surfaceManager);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -23,8 +23,9 @@
|
|||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package sun.awt.image;
|
package com.jetbrains.desktop.image;
|
||||||
|
|
||||||
|
import sun.awt.image.SurfaceManager;
|
||||||
import sun.java2d.SurfaceData;
|
import sun.java2d.SurfaceData;
|
||||||
|
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.GraphicsConfiguration;
|
||||||
@@ -184,14 +184,6 @@ public abstract class SurfaceManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* See TextureWrapperImage.
|
|
||||||
*/
|
|
||||||
public interface TextureWrapperFactory {
|
|
||||||
SurfaceManager createTextureWrapperSurfaceManager(
|
|
||||||
GraphicsConfiguration gc, Image image, long texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An interface for GraphicsConfiguration objects to implement if
|
* An interface for GraphicsConfiguration objects to implement if
|
||||||
* they create their own VolatileSurfaceManager implementations.
|
* they create their own VolatileSurfaceManager implementations.
|
||||||
|
|||||||
@@ -147,8 +147,6 @@ import sun.awt.X11GraphicsDevice;
|
|||||||
import sun.awt.X11GraphicsEnvironment;
|
import sun.awt.X11GraphicsEnvironment;
|
||||||
import sun.awt.XSettings;
|
import sun.awt.XSettings;
|
||||||
import sun.awt.datatransfer.DataTransferer;
|
import sun.awt.datatransfer.DataTransferer;
|
||||||
import sun.awt.screencast.ScreencastHelper;
|
|
||||||
import sun.awt.screencast.XdgDesktopPortal;
|
|
||||||
import sun.awt.util.PerformanceLogger;
|
import sun.awt.util.PerformanceLogger;
|
||||||
import sun.awt.util.ThreadGroupUtils;
|
import sun.awt.util.ThreadGroupUtils;
|
||||||
import sun.font.FontConfigManager;
|
import sun.font.FontConfigManager;
|
||||||
@@ -1944,21 +1942,16 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
|||||||
awtLock();
|
awtLock();
|
||||||
try {
|
try {
|
||||||
if (numberOfButtons == 0) {
|
if (numberOfButtons == 0) {
|
||||||
if (XdgDesktopPortal.isRemoteDesktop()
|
numberOfButtons = getNumberOfButtonsImpl();
|
||||||
&& ScreencastHelper.isAvailable()) {
|
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 = 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Assume don't have to re-query the number again and again.
|
//Assume don't have to re-query the number again and again.
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ package sun.awt.wl;
|
|||||||
|
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Frame;
|
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
@@ -130,5 +129,7 @@ public abstract class FrameDecoration {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract void notifyNativeWindowCreated(long nativePtr);
|
||||||
|
public abstract void notifyNativeWindowToBeHidden(long nativePtr);
|
||||||
public abstract void dispose();
|
public abstract void dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint(Graphics g) {
|
public void paint(Graphics g) {
|
||||||
assert isRepaintNeeded();
|
assert isRepaintNeeded() : "paint() called when no repaint needed";
|
||||||
|
|
||||||
int width = peer.getWidth();
|
int width = peer.getWidth();
|
||||||
int height = peer.getHeight();
|
int height = peer.getHeight();
|
||||||
@@ -196,7 +196,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSignificantDrag(Point p) {
|
private boolean isSignificantDrag(Point p) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
Objects.requireNonNull(p);
|
Objects.requireNonNull(p);
|
||||||
return pressedLocation != null && isSignificantDragDistance(pressedLocation, p);
|
return pressedLocation != null && isSignificantDragDistance(pressedLocation, p);
|
||||||
@@ -208,7 +208,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean processMouseEvent(MouseEvent e) {
|
boolean processMouseEvent(MouseEvent e) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (super.processMouseEvent(e)) return true;
|
if (super.processMouseEvent(e)) return true;
|
||||||
|
|
||||||
@@ -294,6 +294,14 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyNativeWindowCreated(long nativePtr) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyNativeWindowToBeHidden(long nativePtr) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
WLToolkit.getDefaultToolkit().removePropertyChangeListener("awt.os.theme.isDark", pcl);
|
WLToolkit.getDefaultToolkit().removePropertyChangeListener("awt.os.theme.isDark", pcl);
|
||||||
@@ -318,7 +326,7 @@ public abstract class FullFrameDecorationHelper extends FrameDecoration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean processMouseEvent(MouseEvent e) {
|
private boolean processMouseEvent(MouseEvent e) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
Rectangle buttonBounds = bounds.get();
|
Rectangle buttonBounds = bounds.get();
|
||||||
boolean ourLocation = buttonBounds != null && e.getID() != MouseEvent.MOUSE_EXITED &&
|
boolean ourLocation = buttonBounds != null && e.getID() != MouseEvent.MOUSE_EXITED &&
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
|
|||||||
public GtkFrameDecoration(WLDecoratedPeer peer, boolean showMinimize, boolean showMaximize) {
|
public GtkFrameDecoration(WLDecoratedPeer peer, boolean showMinimize, boolean showMaximize) {
|
||||||
super(peer, showMinimize, showMaximize);
|
super(peer, showMinimize, showMaximize);
|
||||||
nativePtr = nativeCreateDecoration(showMinimize, showMaximize, isDarkTheme());
|
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");
|
int t = nativeGetIntProperty(nativePtr, "gtk-dnd-drag-threshold");
|
||||||
dndThreshold = t > 0 ? t : 4;
|
dndThreshold = t > 0 ? t : 4;
|
||||||
}
|
}
|
||||||
@@ -87,8 +87,8 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
|
|||||||
int width = peer.getWidth();
|
int width = peer.getWidth();
|
||||||
int height = titleBarHeight;
|
int height = titleBarHeight;
|
||||||
|
|
||||||
assert width >= titleBarMinWidth;
|
assert width >= titleBarMinWidth : "The frame width is too small to display the title bar";
|
||||||
assert peer.getHeight() >= titleBarHeight;
|
assert peer.getHeight() >= titleBarHeight : "The frame height is too small to display the title bar";
|
||||||
|
|
||||||
double scale = ((WLGraphicsConfig) peer.getGraphicsConfiguration()).getEffectiveScale();
|
double scale = ((WLGraphicsConfig) peer.getGraphicsConfiguration()).getEffectiveScale();
|
||||||
g2d.setBackground(new Color(0, true));
|
g2d.setBackground(new Color(0, true));
|
||||||
|
|||||||
@@ -74,6 +74,14 @@ public class MinimalFrameDecoration extends FrameDecoration {
|
|||||||
// Nothing to repaint
|
// Nothing to repaint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyNativeWindowCreated(long nativePtr) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyNativeWindowToBeHidden(long nativePtr) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
// Nothing to dispose
|
// Nothing to dispose
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2022-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. Oracle designates this
|
||||||
|
* particular file as subject to the "Classpath" exception as provided
|
||||||
|
* by Oracle in the LICENSE file that accompanied this code.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package sun.awt.wl;
|
||||||
|
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decorations based on the xdg-decoration-unstable-v1 protocol.
|
||||||
|
* Supported iff WLToolkit.isSSDAvailable().
|
||||||
|
*
|
||||||
|
* The decoration itself is added by the server on a surface separate from the window itself,
|
||||||
|
* so the window acts as if it is undecorated. For example, there are no insets, no special
|
||||||
|
* repainting is done, etc.
|
||||||
|
*/
|
||||||
|
public class ServerSideFrameDecoration extends FrameDecoration {
|
||||||
|
private long nativeDecorPtr;
|
||||||
|
|
||||||
|
public ServerSideFrameDecoration(WLDecoratedPeer peer) {
|
||||||
|
super(peer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Insets getContentInsets() {
|
||||||
|
return new Insets(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Rectangle getTitleBarBounds() {
|
||||||
|
return new Rectangle(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dimension getMinimumSize() {
|
||||||
|
return new Dimension(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void paint(Graphics g) {
|
||||||
|
// Nothing to paint here, the Wayland server provides all the painting
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyConfigured(boolean active, boolean maximized, boolean fullscreen) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRepaintNeeded() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void markRepaintNeeded(boolean value) {
|
||||||
|
// Nothing to repaint
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyNativeWindowCreated(long nativePtr) {
|
||||||
|
if (!peer.targetIsWlPopup()) {
|
||||||
|
nativeDecorPtr = createToplevelDecorationImpl(nativePtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyNativeWindowToBeHidden(long nativePtr) {
|
||||||
|
if (nativeDecorPtr != 0) {
|
||||||
|
disposeImpl(nativeDecorPtr);
|
||||||
|
nativeDecorPtr = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dispose() {
|
||||||
|
// Native resources must have been already disposed when the window was hidden
|
||||||
|
assert nativeDecorPtr == 0 : "Native resources must have been already disposed";
|
||||||
|
}
|
||||||
|
|
||||||
|
private native long createToplevelDecorationImpl(long nativeFramePtr);
|
||||||
|
private native void disposeImpl(long nativeDecorPtr);
|
||||||
|
}
|
||||||
@@ -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 focusLog = PlatformLogger.getLogger("sun.awt.wl.focus.WLComponentPeer");
|
||||||
private static final PlatformLogger popupLog = PlatformLogger.getLogger("sun.awt.wl.popup.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_WIDTH = 1;
|
||||||
protected static final int MINIMUM_HEIGHT = 1;
|
protected static final int MINIMUM_HEIGHT = 1;
|
||||||
|
|
||||||
@@ -113,6 +115,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
private boolean repositionPopup = false; // protected by stateLock
|
private boolean repositionPopup = false; // protected by stateLock
|
||||||
private boolean resizePending = false; // protected by stateLock
|
private boolean resizePending = false; // protected by stateLock
|
||||||
|
|
||||||
|
private static final boolean shadowEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.wl.Shadow", "true"));
|
||||||
|
|
||||||
static {
|
static {
|
||||||
initIDs();
|
initIDs();
|
||||||
}
|
}
|
||||||
@@ -121,6 +125,10 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
* Standard peer constructor, with corresponding Component
|
* Standard peer constructor, with corresponding Component
|
||||||
*/
|
*/
|
||||||
WLComponentPeer(Component target) {
|
WLComponentPeer(Component target) {
|
||||||
|
this(target, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected WLComponentPeer(Component target, boolean dropShadow) {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
this.background = target.getBackground();
|
this.background = target.getBackground();
|
||||||
Dimension size = constrainSize(target.getBounds().getSize());
|
Dimension size = constrainSize(target.getBounds().getSize());
|
||||||
@@ -135,14 +143,11 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
log.fine("WLComponentPeer: target=" + target + " with size=" + wlSize);
|
log.fine("WLComponentPeer: target=" + target + " with size=" + wlSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean shadowEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.wl.Shadow", "true"));
|
if (dropShadow && shadowEnabled) {
|
||||||
if (shadowEnabled) {
|
|
||||||
shadow = new ShadowImpl(targetIsWlPopup() ? ShadowImage.POPUP_SHADOW_SIZE : ShadowImage.WINDOW_SHADOW_SIZE);
|
shadow = new ShadowImpl(targetIsWlPopup() ? ShadowImage.POPUP_SHADOW_SIZE : ShadowImage.WINDOW_SHADOW_SIZE);
|
||||||
} else {
|
} else {
|
||||||
shadow = new NilShadow();
|
shadow = new NilShadow();
|
||||||
}
|
}
|
||||||
// TODO
|
|
||||||
// setup parent window for target
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int getDisplayScale() {
|
int getDisplayScale() {
|
||||||
@@ -304,18 +309,18 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
static void moveToOverlap(Rectangle what, Rectangle where) {
|
static void moveToOverlap(Rectangle what, Rectangle where) {
|
||||||
if (what.getMaxX() <= where.getMinX()) {
|
if (what.getMaxX() <= where.getMinX()) {
|
||||||
what.x += where.getMaxX() - what.getMaxX();
|
what.x += where.getMaxX() - what.getMaxX() + 1;
|
||||||
}
|
}
|
||||||
if (what.getMinX() >= where.getMaxX()) {
|
if (what.getMinX() >= where.getMaxX()) {
|
||||||
what.x -= what.getMinX() - where.getMaxX();
|
what.x -= what.getMinX() - where.getMaxX() + 1;
|
||||||
}
|
}
|
||||||
if (what.getMaxY() <= where.getMinY()) {
|
if (what.getMaxY() <= where.getMinY()) {
|
||||||
what.y += where.getMaxY() - what.getMaxY();
|
what.y += where.getMaxY() - what.getMaxY() + 1;
|
||||||
}
|
}
|
||||||
if (what.getMinY() >= where.getMaxY()) {
|
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) {
|
Point nativeLocationForPopup(Window popup, Component popupParent, Window toplevel) {
|
||||||
@@ -348,6 +353,18 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
return popupBounds.getLocation();
|
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) {
|
protected void wlSetVisible(boolean v) {
|
||||||
// TODO: this whole method should be moved to WLWindowPeer
|
// TODO: this whole method should be moved to WLWindowPeer
|
||||||
synchronized (getStateLock()) {
|
synchronized (getStateLock()) {
|
||||||
@@ -367,9 +384,10 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
: Frame.NORMAL;
|
: Frame.NORMAL;
|
||||||
boolean isMaximized = (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH;
|
boolean isMaximized = (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH;
|
||||||
boolean isMinimized = (state & Frame.ICONIFIED) == Frame.ICONIFIED;
|
boolean isMinimized = (state & Frame.ICONIFIED) == Frame.ICONIFIED;
|
||||||
|
boolean isUnconstrained = isPopupPositionUnconstrained();
|
||||||
|
|
||||||
performLocked(() -> {
|
performLocked(() -> {
|
||||||
assert wlSurface == null;
|
assert wlSurface == null : "Invisible window already has a Wayland surface attached";
|
||||||
wlSurface = new WLMainSurface((WLWindowPeer) this);
|
wlSurface = new WLMainSurface((WLWindowPeer) this);
|
||||||
long wlSurfacePtr = wlSurface.getWlSurfacePtr();
|
long wlSurfacePtr = wlSurface.getWlSurfacePtr();
|
||||||
if (isWlPopup) {
|
if (isWlPopup) {
|
||||||
@@ -378,7 +396,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
Window toplevel = getToplevelFor(popupParent);
|
Window toplevel = getToplevelFor(popupParent);
|
||||||
Point nativeLocation = nativeLocationForPopup(popup, popupParent, toplevel);
|
Point nativeLocation = nativeLocationForPopup(popup, popupParent, toplevel);
|
||||||
nativeCreatePopup(nativePtr, getNativePtrFor(toplevel), wlSurfacePtr,
|
nativeCreatePopup(nativePtr, getNativePtrFor(toplevel), wlSurfacePtr,
|
||||||
thisWidth, thisHeight, nativeLocation.x, nativeLocation.y);
|
thisWidth, thisHeight, nativeLocation.x, nativeLocation.y, isUnconstrained);
|
||||||
} else {
|
} else {
|
||||||
nativeCreateWindow(nativePtr, getParentNativePtr(target), wlSurfacePtr,
|
nativeCreateWindow(nativePtr, getParentNativePtr(target), wlSurfacePtr,
|
||||||
isModal, isMaximized, isMinimized, title, WLToolkit.getApplicationID());
|
isModal, isMaximized, isMinimized, title, WLToolkit.getApplicationID());
|
||||||
@@ -387,6 +405,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
WLRobotPeer.setLocationOfWLSurface(wlSurface, xNative, yNative);
|
WLRobotPeer.setLocationOfWLSurface(wlSurface, xNative, yNative);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notifyNativeWindowCreated(nativePtr);
|
||||||
|
|
||||||
shadow.createSurface();
|
shadow.createSurface();
|
||||||
|
|
||||||
// From xdg-shell.xml: "After creating a role-specific object and
|
// From xdg-shell.xml: "After creating a role-specific object and
|
||||||
@@ -394,6 +414,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
// without any buffer attached"
|
// without any buffer attached"
|
||||||
shadow.commitSurface();
|
shadow.commitSurface();
|
||||||
wlSurface.commit();
|
wlSurface.commit();
|
||||||
|
if (!isWlPopup && target.getParent() != null) activate();
|
||||||
|
|
||||||
((WLToolkit) Toolkit.getDefaultToolkit()).flush();
|
((WLToolkit) Toolkit.getDefaultToolkit()).flush();
|
||||||
});
|
});
|
||||||
@@ -404,6 +425,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
} else {
|
} else {
|
||||||
performLocked(() -> {
|
performLocked(() -> {
|
||||||
if (wlSurface != null) { // may get a "hide" request even though we were never shown
|
if (wlSurface != null) { // may get a "hide" request even though we were never shown
|
||||||
|
notifyNativeWindowToBeHidden(nativePtr);
|
||||||
|
|
||||||
nativeHideFrame(nativePtr);
|
nativeHideFrame(nativePtr);
|
||||||
|
|
||||||
shadow.hide();
|
shadow.hide();
|
||||||
@@ -414,6 +437,12 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void notifyNativeWindowCreated(long nativePtr) {
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void notifyNativeWindowToBeHidden(long nativePtr) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if our target should be treated as a popup in Wayland's sense,
|
* Returns true if our target should be treated as a popup in Wayland's sense,
|
||||||
* i.e. it has to have a parent to position relative to.
|
* i.e. it has to have a parent to position relative to.
|
||||||
@@ -434,15 +463,21 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateSurfaceData() {
|
void updateSurfaceData() {
|
||||||
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
|
performLocked(() -> {
|
||||||
getGraphicsConfiguration(), getBufferWidth(), getBufferHeight(), getDisplayScale());
|
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
|
||||||
|
getGraphicsConfiguration(), getBufferWidth(), getBufferHeight(), getDisplayScale());
|
||||||
|
|
||||||
shadow.updateSurfaceData();
|
shadow.updateSurfaceData();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isResizable() {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateSurfaceSize() {
|
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,
|
// 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,
|
// but the surface has not yet been committed. Otherwise, the sizes will get out of sync,
|
||||||
// which may result in visual artifacts.
|
// which may result in visual artifacts.
|
||||||
@@ -460,9 +495,15 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
wlSurface.updateSurfaceSize(surfaceWidth, surfaceHeight);
|
wlSurface.updateSurfaceSize(surfaceWidth, surfaceHeight);
|
||||||
nativeSetWindowGeometry(nativePtr, 0, 0, surfaceWidth, surfaceHeight);
|
nativeSetWindowGeometry(nativePtr, 0, 0, surfaceWidth, surfaceHeight);
|
||||||
nativeSetMinimumSize(nativePtr, surfaceMinSize.width, surfaceMinSize.height);
|
if (isResizable()) {
|
||||||
if (surfaceMaxSize != null) {
|
nativeSetMinimumSize(nativePtr, surfaceMinSize.width, surfaceMinSize.height);
|
||||||
nativeSetMaximumSize(nativePtr, surfaceMaxSize.width, surfaceMaxSize.height);
|
if (surfaceMaxSize != null) {
|
||||||
|
nativeSetMaximumSize(nativePtr, surfaceMaxSize.width, surfaceMaxSize.height);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Prevent SSD from resizing windows that are not meant to be resizeable
|
||||||
|
nativeSetMinimumSize(nativePtr, surfaceWidth, surfaceHeight);
|
||||||
|
nativeSetMaximumSize(nativePtr, surfaceWidth, surfaceHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (popupNeedsReposition()) {
|
if (popupNeedsReposition()) {
|
||||||
@@ -474,7 +515,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
final Component popupParent = AWTAccessor.getWindowAccessor().getPopupParent(popup);
|
final Component popupParent = AWTAccessor.getWindowAccessor().getPopupParent(popup);
|
||||||
final Window toplevel = getToplevelFor(popupParent);
|
final Window toplevel = getToplevelFor(popupParent);
|
||||||
Point nativeLocation = nativeLocationForPopup(popup, popupParent, toplevel);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -868,13 +910,17 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
// a button press, key press, or touch down event."
|
// a button press, key press, or touch down event."
|
||||||
// So 'serial' must appertain to such an 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 xNative = javaUnitsToSurfaceUnits(x);
|
||||||
int yNative = javaUnitsToSurfaceUnits(y);
|
int yNative = javaUnitsToSurfaceUnits(y);
|
||||||
performLocked(() -> nativeShowWindowMenu(serial, nativePtr, xNative, yNative));
|
performLocked(() -> nativeShowWindowMenu(serial, nativePtr, xNative, yNative));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setIcon(int size, int[] pixels) {
|
||||||
|
performLocked(() -> nativeSetIcon(nativePtr, size, pixels));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ColorModel getColorModel() {
|
public ColorModel getColorModel() {
|
||||||
GraphicsConfiguration graphicsConfig = target.getGraphicsConfiguration();
|
GraphicsConfiguration graphicsConfig = target.getGraphicsConfiguration();
|
||||||
@@ -924,7 +970,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
WLToolkit.targetDisposedPeer(target, this);
|
WLToolkit.targetDisposedPeer(target, this);
|
||||||
|
|
||||||
performLocked(() -> {
|
performLocked(() -> {
|
||||||
assert !isVisible();
|
assert !isVisible() : "Disposed window must have been already hidden";
|
||||||
|
|
||||||
nativeDisposeFrame(nativePtr);
|
nativeDisposeFrame(nativePtr);
|
||||||
nativePtr = 0;
|
nativePtr = 0;
|
||||||
@@ -1037,10 +1083,11 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
log.fine(String.format("%s is updating buffer to %dx%d pixels", this, getBufferWidth(), getBufferHeight()));
|
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
|
// 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.
|
// to warrant destroying the peer and creating a new one from scratch.
|
||||||
// So return "never recreate" here.
|
// So return "never recreate" here.
|
||||||
@@ -1092,15 +1139,20 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static long getSerialForActivation() {
|
private static long getSerialForActivation() {
|
||||||
long serial = WLToolkit.getInputState().keyboardEnterSerial(); // a focus event
|
long serial;
|
||||||
if (serial == 0) { // may have just left one surface and not yet entered another
|
if (WLToolkit.isKDE()) {
|
||||||
serial = WLToolkit.getInputState().keySerial(); // an input event
|
serial = WLToolkit.getInputState().latestInputSerial();
|
||||||
}
|
} else {
|
||||||
if (serial == 0) {
|
serial = WLToolkit.getInputState().keyboardEnterSerial(); // a focus event
|
||||||
// The pointer button serial seems to not work with Mutter, but may work
|
if (serial == 0) { // may have just left one surface and not yet entered another
|
||||||
// with other implementations, so let's keep it as an input event serial
|
serial = WLToolkit.getInputState().keySerial(); // an input event
|
||||||
// of the last resort.
|
}
|
||||||
serial = WLToolkit.getInputState().pointerButtonSerial();
|
if (serial == 0) {
|
||||||
|
// The pointer button serial seems to not work with Mutter but may work
|
||||||
|
// with other implementations, so let's keep it as an input event serial
|
||||||
|
// of the last resort.
|
||||||
|
serial = WLToolkit.getInputState().pointerButtonSerial();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return serial;
|
return serial;
|
||||||
}
|
}
|
||||||
@@ -1114,12 +1166,14 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
String title, String appID);
|
String title, String appID);
|
||||||
|
|
||||||
protected native void nativeCreatePopup(long ptr, long parentPtr, long wlSurfacePtr,
|
protected native void nativeCreatePopup(long ptr, long parentPtr, long wlSurfacePtr,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int offsetX, int offsetY);
|
int offsetX, int offsetY,
|
||||||
|
boolean isUnconstrained);
|
||||||
|
|
||||||
protected native void nativeRepositionWLPopup(long ptr,
|
protected native void nativeRepositionWLPopup(long ptr,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
int offsetX, int offsetY);
|
int offsetX, int offsetY,
|
||||||
|
boolean isUnconstrained);
|
||||||
protected native void nativeHideFrame(long ptr);
|
protected native void nativeHideFrame(long ptr);
|
||||||
|
|
||||||
protected native void nativeDisposeFrame(long ptr);
|
protected native void nativeDisposeFrame(long ptr);
|
||||||
@@ -1138,6 +1192,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
private native void nativeSetMinimumSize(long ptr, int width, int height);
|
private native void nativeSetMinimumSize(long ptr, int width, int height);
|
||||||
private native void nativeSetMaximumSize(long ptr, int width, int height);
|
private native void nativeSetMaximumSize(long ptr, int width, int height);
|
||||||
private native void nativeShowWindowMenu(long serial, long ptr, int x, int y);
|
private native void nativeShowWindowMenu(long serial, long ptr, int x, int y);
|
||||||
|
private native void nativeSetIcon(long ptr, int size, int[] pixels);
|
||||||
|
|
||||||
static long getNativePtrFor(Component component) {
|
static long getNativePtrFor(Component component) {
|
||||||
final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
|
final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
|
||||||
@@ -1318,7 +1373,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (verticalMWERoundRotations != 0 || verticalMWEPreciseRotations != 0) {
|
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(),
|
final MouseEvent mouseEvent = new MouseWheelEvent(getTarget(),
|
||||||
MouseEvent.MOUSE_WHEEL,
|
MouseEvent.MOUSE_WHEEL,
|
||||||
@@ -1337,7 +1393,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (horizontalMWERoundRotations != 0 || horizontalMWEPreciseRotations != 0) {
|
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(),
|
final MouseEvent mouseEvent = new MouseWheelEvent(getTarget(),
|
||||||
MouseEvent.MOUSE_WHEEL,
|
MouseEvent.MOUSE_WHEEL,
|
||||||
@@ -1548,7 +1605,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
// "This request must be used in response to some sort of user action like a button press,
|
// "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
|
// key press, or touch down event. The passed serial is used to determine the type
|
||||||
// of interactive move (touch, pointer, etc)."
|
// 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));
|
performLocked(() -> nativeStartDrag(serial, nativePtr));
|
||||||
}
|
}
|
||||||
@@ -1557,7 +1614,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
// "This request must be used in response to some sort of user action like a button press,
|
// "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
|
// key press, or touch down event. The passed serial is used to determine the type
|
||||||
// of interactive resize (touch, pointer, etc)."
|
// 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));
|
performLocked(() -> nativeStartResize(serial, nativePtr, edges));
|
||||||
}
|
}
|
||||||
@@ -1637,7 +1694,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
void notifyConfigured(int newSurfaceX, int newSurfaceY, int newSurfaceWidth, int newSurfaceHeight,
|
void notifyConfigured(int newSurfaceX, int newSurfaceY, int newSurfaceWidth, int newSurfaceHeight,
|
||||||
boolean active, boolean maximized, boolean fullscreen) {
|
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
|
// 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.
|
// of the window in surface-local coordinates.
|
||||||
@@ -1718,12 +1775,12 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void notifyPopupDone() {
|
void notifyPopupDone() {
|
||||||
assert(targetIsWlPopup());
|
assert targetIsWlPopup() : "This method must be invoked only for popups";
|
||||||
target.setVisible(false);
|
target.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkIfOnNewScreen() {
|
void checkIfOnNewScreen() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
if (wlSurface == null) return;
|
if (wlSurface == null) return;
|
||||||
final WLGraphicsDevice newDevice = wlSurface.getGraphicsDevice();
|
final WLGraphicsDevice newDevice = wlSurface.getGraphicsDevice();
|
||||||
@@ -1968,7 +2025,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateSurfaceSize() {
|
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());
|
shadowSurface.updateSurfaceSize(shadowWlSize.getSurfaceWidth(), shadowWlSize.getSurfaceHeight());
|
||||||
}
|
}
|
||||||
@@ -1980,8 +2037,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void createSurface() {
|
public void createSurface() {
|
||||||
assert shadowSurface == null;
|
assert shadowSurface == null : "The shadow surface must not be created twice";
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
int shadowOffset = -javaUnitsToSurfaceUnits(shadowSize);
|
int shadowOffset = -javaUnitsToSurfaceUnits(shadowSize);
|
||||||
shadowSurface = new WLSubSurface(wlSurface, shadowOffset, shadowOffset);
|
shadowSurface = new WLSubSurface(wlSurface, shadowOffset, shadowOffset);
|
||||||
@@ -1989,13 +2046,13 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
public void commitSurface() {
|
public void commitSurface() {
|
||||||
assert shadowSurface != null;
|
assert shadowSurface != null;
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
shadowSurface.commit();
|
shadowSurface.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
if (shadowSurface != null) {
|
if (shadowSurface != null) {
|
||||||
shadowSurface.dispose();
|
shadowSurface.dispose();
|
||||||
@@ -2010,7 +2067,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hide() {
|
public void hide() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
if (shadowSurface != null) {
|
if (shadowSurface != null) {
|
||||||
shadowSurface.dispose();
|
shadowSurface.dispose();
|
||||||
@@ -2019,7 +2076,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateSurfaceData() {
|
public void updateSurfaceData() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
needsRepaint = true;
|
needsRepaint = true;
|
||||||
SurfaceData.convertTo(WLSurfaceDataExt.class, shadowSurfaceData).revalidate(
|
SurfaceData.convertTo(WLSurfaceDataExt.class, shadowSurfaceData).revalidate(
|
||||||
@@ -2027,7 +2084,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void paint() {
|
public void paint() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
if (!needsRepaint) {
|
if (!needsRepaint) {
|
||||||
return;
|
return;
|
||||||
@@ -2053,7 +2110,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
|
|||||||
|
|
||||||
public void notifyConfigured(boolean active, boolean maximized, boolean fullscreen) {
|
public void notifyConfigured(boolean active, boolean maximized, boolean fullscreen) {
|
||||||
assert shadowSurface != null;
|
assert shadowSurface != null;
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
needsRepaint |= active ^ isActive;
|
needsRepaint |= active ^ isActive;
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class WLDataOffer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] receiveData(String mime) throws IOException {
|
public synchronized byte[] receiveData(String mime) throws IOException {
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (nativePtr == 0) {
|
if (nativePtr == 0) {
|
||||||
@@ -77,7 +77,8 @@ public class WLDataOffer {
|
|||||||
|
|
||||||
fd = openReceivePipe(nativePtr, mime);
|
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();
|
FileDescriptor javaFD = new FileDescriptor();
|
||||||
jdk.internal.access.SharedSecrets.getJavaIOFileDescriptorAccess().set(javaFD, fd);
|
jdk.internal.access.SharedSecrets.getJavaIOFileDescriptorAccess().set(javaFD, fd);
|
||||||
@@ -86,7 +87,7 @@ public class WLDataOffer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void accept(long serial, String mime) {
|
public synchronized void accept(long serial, String mime) {
|
||||||
if (nativePtr == 0) {
|
if (nativePtr == 0) {
|
||||||
throw new IllegalStateException("nativePtr is 0");
|
throw new IllegalStateException("nativePtr is 0");
|
||||||
}
|
}
|
||||||
@@ -94,15 +95,17 @@ public class WLDataOffer {
|
|||||||
acceptImpl(nativePtr, serial, mime);
|
acceptImpl(nativePtr, serial, mime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void finishDnD() {
|
public synchronized void finishDnD() {
|
||||||
if (nativePtr == 0) {
|
if (nativePtr == 0) {
|
||||||
throw new IllegalStateException("nativePtr is 0");
|
throw new IllegalStateException("nativePtr is 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
finishDnDImpl(nativePtr);
|
if (selectedAction != 0) {
|
||||||
|
finishDnDImpl(nativePtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDnDActions(int actions, int preferredAction) {
|
public synchronized void setDnDActions(int actions, int preferredAction) {
|
||||||
if (nativePtr == 0) {
|
if (nativePtr == 0) {
|
||||||
throw new IllegalStateException("nativePtr is 0");
|
throw new IllegalStateException("nativePtr is 0");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class WLDataSource {
|
|||||||
var wlDataTransferer = (WLDataTransferer) WLDataTransferer.getInstance();
|
var wlDataTransferer = (WLDataTransferer) WLDataTransferer.getInstance();
|
||||||
|
|
||||||
nativePtr = initNative(dataDevice.getNativePtr(), protocol);
|
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;
|
this.data = data;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -40,10 +40,37 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
|
|||||||
private final boolean showMaximize;
|
private final boolean showMaximize;
|
||||||
private final boolean showMinimize;
|
private final boolean showMinimize;
|
||||||
|
|
||||||
private final static String decorationPreference = System.getProperty("sun.awt.wl.WindowDecorationStyle");
|
private enum DecorationTypePreference {
|
||||||
|
DEFAULT, // The default decorations painted purely in Java
|
||||||
|
GTK, // Decorations are painted with the help of GTK (if available)
|
||||||
|
SERVER; // Wayland server-side decorations (if available)
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final DecorationTypePreference decorationType = determineDecorationPreferenceType();
|
||||||
|
|
||||||
|
private static DecorationTypePreference determineDecorationPreferenceType() {
|
||||||
|
String decorationPreference = System.getProperty("sun.awt.wl.WindowDecorationStyle");
|
||||||
|
if (decorationPreference != null) {
|
||||||
|
if ("builtin".equals(decorationPreference)) {
|
||||||
|
return DecorationTypePreference.DEFAULT;
|
||||||
|
} else if ("gtk".equals(decorationPreference) && isGTKAvailable()) {
|
||||||
|
return DecorationTypePreference.GTK;
|
||||||
|
} else if ("server".equals(decorationPreference) && WLToolkit.isSSDAvailable()) {
|
||||||
|
return DecorationTypePreference.SERVER;
|
||||||
|
} else {
|
||||||
|
return DecorationTypePreference.DEFAULT;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!WLToolkit.isKDE() && isGTKAvailable()) {
|
||||||
|
return DecorationTypePreference.GTK;
|
||||||
|
} else {
|
||||||
|
return DecorationTypePreference.DEFAULT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public WLDecoratedPeer(Window target, boolean isUndecorated, boolean showMinimize, boolean showMaximize) {
|
public WLDecoratedPeer(Window target, boolean isUndecorated, boolean showMinimize, boolean showMaximize) {
|
||||||
super(target);
|
super(target, decorationType != DecorationTypePreference.SERVER);
|
||||||
this.isUndecorated = isUndecorated;
|
this.isUndecorated = isUndecorated;
|
||||||
this.showMinimize = showMinimize;
|
this.showMinimize = showMinimize;
|
||||||
this.showMaximize = showMaximize;
|
this.showMaximize = showMaximize;
|
||||||
@@ -54,20 +81,12 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
|
|||||||
FrameDecoration d;
|
FrameDecoration d;
|
||||||
if (isUndecorated) {
|
if (isUndecorated) {
|
||||||
d = new MinimalFrameDecoration(this);
|
d = new MinimalFrameDecoration(this);
|
||||||
} else if (decorationPreference != null) {
|
|
||||||
if ("builtin".equals(decorationPreference)) {
|
|
||||||
d = new DefaultFrameDecoration(this, showMinimize, showMaximize);
|
|
||||||
} else if ("gtk".equals(decorationPreference) && isGTKAvailable()) {
|
|
||||||
d = new GtkFrameDecoration(this, showMinimize, showMaximize);
|
|
||||||
} else {
|
|
||||||
d = new DefaultFrameDecoration(this, showMinimize, showMaximize);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (!WLToolkit.isKDE() && isGTKAvailable()) {
|
d = switch (decorationType) {
|
||||||
d = new GtkFrameDecoration(this, showMinimize, showMaximize);
|
case DecorationTypePreference.DEFAULT -> new DefaultFrameDecoration(this, showMinimize, showMaximize);
|
||||||
} else {
|
case DecorationTypePreference.GTK -> new GtkFrameDecoration(this, showMinimize, showMaximize);
|
||||||
d = new DefaultFrameDecoration(this, showMinimize, showMaximize);
|
case DecorationTypePreference.SERVER -> new ServerSideFrameDecoration(this);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
@@ -84,9 +103,7 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract boolean isResizable();
|
|
||||||
public abstract boolean isInteractivelyResizable();
|
public abstract boolean isInteractivelyResizable();
|
||||||
|
|
||||||
public abstract boolean isFrameStateSupported(int state);
|
public abstract boolean isFrameStateSupported(int state);
|
||||||
public abstract void setState(int newState);
|
public abstract void setState(int newState);
|
||||||
public abstract int getState();
|
public abstract int getState();
|
||||||
@@ -230,4 +247,14 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
|
|||||||
getDecoration().dispose();
|
getDecoration().dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void notifyNativeWindowCreated(long nativePtr) {
|
||||||
|
decoration.notifyNativeWindowCreated(nativePtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void notifyNativeWindowToBeHidden(long nativePtr) {
|
||||||
|
decoration.notifyNativeWindowToBeHidden(nativePtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,14 @@ public class WLDragSourceContextPeer extends SunDragSourceContextPeer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected synchronized void handleDnDAction(int action) {
|
protected synchronized void handleDnDAction(int action) {
|
||||||
this.action = action;
|
// This if statement is a workaround for a KWin bug.
|
||||||
|
// KWin 6.5.1 may send an additional action(0) after dnd_drop_performed().
|
||||||
|
// Spec says that after dnd_drop_performed(), no further action() events will be sent,
|
||||||
|
// except for maybe action(dnd_ask), but since we do not announce support for dnd_ask,
|
||||||
|
// we don't need to worry about it.
|
||||||
|
if (!didSucceed) {
|
||||||
|
this.action = action;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class WLDropTargetContextPeer extends SunDropTargetContextPeer {
|
|||||||
int dropAction = 0;
|
int dropAction = 0;
|
||||||
|
|
||||||
if (hasTarget() && event != MouseEvent.MOUSE_EXITED) {
|
if (hasTarget() && event != MouseEvent.MOUSE_EXITED) {
|
||||||
dropAction = currentOffer.getSelectedAction();
|
dropAction = WLDataDevice.waylandActionsToJava(currentOffer.getSelectedAction());
|
||||||
}
|
}
|
||||||
|
|
||||||
postDropTargetEvent(
|
postDropTargetEvent(
|
||||||
@@ -106,7 +106,10 @@ public class WLDropTargetContextPeer extends SunDropTargetContextPeer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doDropDone(boolean success, int dropAction, boolean isLocal) {
|
protected synchronized void doDropDone(boolean success, int dropAction, boolean isLocal) {
|
||||||
|
if (success && currentOffer != null) {
|
||||||
|
currentOffer.finishDnD();
|
||||||
|
}
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,17 +118,20 @@ public class WLDropTargetContextPeer extends SunDropTargetContextPeer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int actions = 0;
|
int javaActions = 0;
|
||||||
if (hasTarget()) {
|
if (hasTarget()) {
|
||||||
actions = WLDataDevice.javaActionsToWayland(getTargetActions());
|
javaActions = getTargetActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
int preferredAction = SunDragSourceContextPeer.convertModifiersToDropAction(WLToolkit.getInputState().getModifiers(), actions);
|
int javaPreferredAction = SunDragSourceContextPeer.convertModifiersToDropAction(WLToolkit.getInputState().getModifiers(), javaActions);
|
||||||
|
|
||||||
if (actions != lastActions || preferredAction != lastPreferredAction) {
|
int waylandActions = WLDataDevice.javaActionsToWayland(javaActions);
|
||||||
currentOffer.setDnDActions(actions, preferredAction);
|
int waylandPreferredAction = WLDataDevice.javaActionsToWayland(javaPreferredAction);
|
||||||
lastActions = actions;
|
|
||||||
lastPreferredAction = preferredAction;
|
if (waylandActions != lastActions || waylandPreferredAction != lastPreferredAction) {
|
||||||
|
currentOffer.setDnDActions(waylandActions, waylandPreferredAction);
|
||||||
|
lastActions = waylandActions;
|
||||||
|
lastPreferredAction = waylandPreferredAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,10 +128,10 @@ public class WLGraphicsDevice extends GraphicsDevice {
|
|||||||
int widthLogical, int heightLogical,
|
int widthLogical, int heightLogical,
|
||||||
int widthMm, int heightMm,
|
int widthMm, int heightMm,
|
||||||
int displayScale) {
|
int displayScale) {
|
||||||
assert width > 0 && height > 0;
|
assert width > 0 && height > 0 : String.format("Invalid device size: %dx%d", width, height);
|
||||||
assert widthLogical > 0 && heightLogical > 0;
|
assert widthLogical > 0 && heightLogical > 0 : String.format("Invalid logical device size: %dx%d", widthLogical, heightLogical);
|
||||||
assert widthMm > 0 && heightMm > 0;
|
assert widthMm > 0 && heightMm > 0 : String.format("Invalid physical device size: %dx%d", widthMm, heightMm);
|
||||||
assert displayScale > 0;
|
assert displayScale > 0 : String.format("Invalid display scale: %d", displayScale);
|
||||||
|
|
||||||
this.wlID = id;
|
this.wlID = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@@ -176,10 +176,10 @@ public class WLGraphicsDevice extends GraphicsDevice {
|
|||||||
int widthLogical, int heightLogical,
|
int widthLogical, int heightLogical,
|
||||||
int widthMm, int heightMm,
|
int widthMm, int heightMm,
|
||||||
int scale) {
|
int scale) {
|
||||||
assert width > 0 && height > 0;
|
assert width > 0 && height > 0 : String.format("Invalid device size: %dx%d", width, height);
|
||||||
assert widthLogical > 0 && heightLogical > 0;
|
assert widthLogical > 0 && heightLogical > 0 : String.format("Invalid logical device size: %dx%d", widthLogical, heightLogical);
|
||||||
assert widthMm > 0 && heightMm > 0;
|
assert widthMm > 0 && heightMm > 0 : String.format("Invalid physical device size: %dx%d", widthMm, heightMm);
|
||||||
assert scale > 0;
|
assert scale > 0 : String.format("Invalid display scale: %d", scale);
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.x = x;
|
this.x = x;
|
||||||
|
|||||||
@@ -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
|
// Logical size comes from an optional protocol, so take the data from the main one, if absent
|
||||||
if (widthLogical == 0) widthLogical = width;
|
if (widthLogical <= 0) widthLogical = width;
|
||||||
if (heightLogical == 0) heightLogical = height;
|
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);
|
String humanID = deviceNameFrom(name, make, model);
|
||||||
|
|
||||||
WLGraphicsDevice gd = deviceWithID(wlID);
|
WLGraphicsDevice gd = deviceWithID(wlID);
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import java.awt.event.InputEvent;
|
|||||||
* @param pointerButtonPressedEvent null or the latest PointerButtonEvent such that getIsButtonPressed() == true
|
* @param pointerButtonPressedEvent null or the latest PointerButtonEvent such that getIsButtonPressed() == true
|
||||||
* @param modifiers a bit set of modifiers reflecting currently pressed keys (@see WLInputState.getNewModifiers())
|
* @param modifiers a bit set of modifiers reflecting currently pressed keys (@see WLInputState.getNewModifiers())
|
||||||
* @param surfaceForKeyboardInput represents 'struct wl_surface*' that keyboards events should go to
|
* @param surfaceForKeyboardInput represents 'struct wl_surface*' that keyboards events should go to
|
||||||
|
* @param isPointerOverSurface true if the mouse pointer has entered a surface and has not left yet
|
||||||
|
* @param latestInputSerial the serial of the latest input event (key or pointer button press)
|
||||||
*/
|
*/
|
||||||
record WLInputState(WLPointerEvent eventWithSurface,
|
record WLInputState(WLPointerEvent eventWithSurface,
|
||||||
long pointerEnterSerial,
|
long pointerEnterSerial,
|
||||||
@@ -54,7 +56,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
PointerButtonEvent pointerButtonPressedEvent,
|
PointerButtonEvent pointerButtonPressedEvent,
|
||||||
int modifiers,
|
int modifiers,
|
||||||
long surfaceForKeyboardInput,
|
long surfaceForKeyboardInput,
|
||||||
boolean isPointerOverSurface) {
|
boolean isPointerOverSurface,
|
||||||
|
long latestInputSerial) {
|
||||||
/**
|
/**
|
||||||
* Groups together information about a mouse pointer button event.
|
* Groups together information about a mouse pointer button event.
|
||||||
* @param surface 'struct wl_surface*' the button was pressed over
|
* @param surface 'struct wl_surface*' the button was pressed over
|
||||||
@@ -75,7 +78,7 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
|
|
||||||
static WLInputState initialState() {
|
static WLInputState initialState() {
|
||||||
return new WLInputState(null, 0, 0, 0, 0, null, null,
|
return new WLInputState(null, 0, 0, 0, 0, null, null,
|
||||||
null, 0, 0, false);
|
null, 0, 0, false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -101,6 +104,9 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
boolean newPointerOverSurface = (pointerEvent.hasEnterEvent() || isPointerOverSurface)
|
boolean newPointerOverSurface = (pointerEvent.hasEnterEvent() || isPointerOverSurface)
|
||||||
&& !pointerEvent.hasLeaveEvent();
|
&& !pointerEvent.hasLeaveEvent();
|
||||||
|
|
||||||
|
final long newLatestInputEventSerial = pointerEvent.hasButtonEvent()
|
||||||
|
? pointerEvent.getSerial() : latestInputSerial;
|
||||||
|
|
||||||
return new WLInputState(
|
return new WLInputState(
|
||||||
newEventWithSurface,
|
newEventWithSurface,
|
||||||
newPointerEnterSerial,
|
newPointerEnterSerial,
|
||||||
@@ -112,7 +118,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
newPointerButtonEvent,
|
newPointerButtonEvent,
|
||||||
newModifiers,
|
newModifiers,
|
||||||
surfaceForKeyboardInput,
|
surfaceForKeyboardInput,
|
||||||
newPointerOverSurface);
|
newPointerOverSurface,
|
||||||
|
newLatestInputEventSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WLInputState updatedFromKeyEvent(long serial) {
|
public WLInputState updatedFromKeyEvent(long serial) {
|
||||||
@@ -127,7 +134,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
pointerButtonPressedEvent,
|
pointerButtonPressedEvent,
|
||||||
modifiers,
|
modifiers,
|
||||||
surfaceForKeyboardInput,
|
surfaceForKeyboardInput,
|
||||||
isPointerOverSurface);
|
isPointerOverSurface,
|
||||||
|
serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WLInputState updatedFromKeyboardEnterEvent(long serial, long surfacePtr) {
|
public WLInputState updatedFromKeyboardEnterEvent(long serial, long surfacePtr) {
|
||||||
@@ -143,7 +151,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
pointerButtonPressedEvent,
|
pointerButtonPressedEvent,
|
||||||
modifiers,
|
modifiers,
|
||||||
surfacePtr,
|
surfacePtr,
|
||||||
isPointerOverSurface);
|
isPointerOverSurface,
|
||||||
|
latestInputSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WLInputState updatedFromKeyboardModifiersEvent(long serial, int keyboardModifiers) {
|
public WLInputState updatedFromKeyboardModifiersEvent(long serial, int keyboardModifiers) {
|
||||||
@@ -161,7 +170,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
pointerButtonPressedEvent,
|
pointerButtonPressedEvent,
|
||||||
newModifiers,
|
newModifiers,
|
||||||
surfaceForKeyboardInput,
|
surfaceForKeyboardInput,
|
||||||
isPointerOverSurface);
|
isPointerOverSurface,
|
||||||
|
latestInputSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WLInputState updatedFromKeyboardLeaveEvent(long serial, long surfacePtr) {
|
public WLInputState updatedFromKeyboardLeaveEvent(long serial, long surfacePtr) {
|
||||||
@@ -185,7 +195,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
pointerButtonPressedEvent,
|
pointerButtonPressedEvent,
|
||||||
newModifiers,
|
newModifiers,
|
||||||
0,
|
0,
|
||||||
isPointerOverSurface);
|
isPointerOverSurface,
|
||||||
|
latestInputSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WLInputState updatedFromUnregisteredSurface(long surfacePtr) {
|
public WLInputState updatedFromUnregisteredSurface(long surfacePtr) {
|
||||||
@@ -203,7 +214,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
pointerButtonPressedEvent,
|
pointerButtonPressedEvent,
|
||||||
modifiers,
|
modifiers,
|
||||||
0,
|
0,
|
||||||
isPointerOverSurface);
|
isPointerOverSurface,
|
||||||
|
latestInputSerial);
|
||||||
} else {
|
} else {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -221,7 +233,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
pointerButtonPressedEvent,
|
pointerButtonPressedEvent,
|
||||||
modifiers & ~WLPointerEvent.PointerButtonCodes.combinedMask(),
|
modifiers & ~WLPointerEvent.PointerButtonCodes.combinedMask(),
|
||||||
surfaceForKeyboardInput,
|
surfaceForKeyboardInput,
|
||||||
false);
|
false,
|
||||||
|
latestInputSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
private PointerButtonEvent getNewPointerButtonEvent(WLPointerEvent pointerEvent,
|
private PointerButtonEvent getNewPointerButtonEvent(WLPointerEvent pointerEvent,
|
||||||
@@ -229,7 +242,9 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
|||||||
WLPointerEvent newEventWithTimestamp,
|
WLPointerEvent newEventWithTimestamp,
|
||||||
WLPointerEvent newEventWithPosition) {
|
WLPointerEvent newEventWithPosition) {
|
||||||
if (pointerEvent.hasButtonEvent() && pointerEvent.getIsButtonPressed() && newEventWithSurface != null) {
|
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;
|
int clickCount = 1;
|
||||||
final boolean pressedSameButton = pointerButtonPressedEvent != null
|
final boolean pressedSameButton = pointerButtonPressedEvent != null
|
||||||
&& pointerEvent.getButtonCode() == pointerButtonPressedEvent.linuxCode;
|
&& pointerEvent.getButtonCode() == pointerButtonPressedEvent.linuxCode;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class WLKeyboard {
|
|||||||
// called from native code
|
// called from native code
|
||||||
void setRepeatInfo(int charsPerSecond, int delayMillis) {
|
void setRepeatInfo(int charsPerSecond, int delayMillis) {
|
||||||
// this function receives (0, 0) when key repeat is disabled
|
// 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;
|
this.delayBeforeRepeatMillis = delayMillis;
|
||||||
if (charsPerSecond > 0) {
|
if (charsPerSecond > 0) {
|
||||||
this.delayBetweenRepeatMillis = (int) (1000.0 / charsPerSecond);
|
this.delayBetweenRepeatMillis = (int) (1000.0 / charsPerSecond);
|
||||||
@@ -64,7 +64,7 @@ class WLKeyboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cancelRepeat() {
|
void cancelRepeat() {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
if (currentRepeatTask != null) {
|
if (currentRepeatTask != null) {
|
||||||
currentRepeatTask.cancel();
|
currentRepeatTask.cancel();
|
||||||
currentRepeatTask = null;
|
currentRepeatTask = null;
|
||||||
@@ -74,7 +74,7 @@ class WLKeyboard {
|
|||||||
|
|
||||||
// called from native code
|
// called from native code
|
||||||
void stopRepeat(int keycode) {
|
void stopRepeat(int keycode) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
if (currentRepeatKeycode == keycode) {
|
if (currentRepeatKeycode == keycode) {
|
||||||
cancelRepeat();
|
cancelRepeat();
|
||||||
}
|
}
|
||||||
@@ -82,7 +82,7 @@ class WLKeyboard {
|
|||||||
|
|
||||||
// called from native code
|
// called from native code
|
||||||
void startRepeat(long serial, long timestamp, int keycode) {
|
void startRepeat(long serial, long timestamp, int keycode) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
cancelRepeat();
|
cancelRepeat();
|
||||||
if (keycode == 0 || !isRepeatEnabled()) {
|
if (keycode == 0 || !isRepeatEnabled()) {
|
||||||
return;
|
return;
|
||||||
@@ -123,7 +123,7 @@ class WLKeyboard {
|
|||||||
public native boolean isNumLockPressed();
|
public native boolean isNumLockPressed();
|
||||||
|
|
||||||
public void onLostFocus() {
|
public void onLostFocus() {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
keyRepeatManager.cancelRepeat();
|
keyRepeatManager.cancelRepeat();
|
||||||
cancelCompose();
|
cancelCompose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class WLMainSurface extends WLSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void activateByAnotherSurface(long serial, long activatingSurfacePtr) {
|
public void activateByAnotherSurface(long serial, long activatingSurfacePtr) {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
nativeActivate(getNativePtr(), serial, activatingSurfacePtr);
|
nativeActivate(getNativePtr(), serial, activatingSurfacePtr);
|
||||||
|
|||||||
@@ -217,37 +217,37 @@ class WLPointerEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long getSurface() {
|
public long getSurface() {
|
||||||
assert hasSurface();
|
assert hasSurface() : "The event must have a valid surface";
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getSerial() {
|
public long getSerial() {
|
||||||
assert hasSerial();
|
assert hasSerial() : "The event must have a valid serial";
|
||||||
return serial;
|
return serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getTimestamp() {
|
public long getTimestamp() {
|
||||||
assert hasTimestamp();
|
assert hasTimestamp() : "The event must have a valid timestamp";
|
||||||
return timestamp;
|
return timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSurfaceX() {
|
public int getSurfaceX() {
|
||||||
assert hasCoordinates();
|
assert hasCoordinates() : "The event must have valid coordinates";
|
||||||
return surface_x;
|
return surface_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSurfaceY() {
|
public int getSurfaceY() {
|
||||||
assert hasCoordinates();
|
assert hasCoordinates() : "The event must have valid coordinates";
|
||||||
return surface_y;
|
return surface_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getButtonCode() {
|
public int getButtonCode() {
|
||||||
assert hasButtonEvent();
|
assert hasButtonEvent() : "Must have a button event to get the button code";
|
||||||
return buttonCode;
|
return buttonCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getIsButtonPressed() {
|
public boolean getIsButtonPressed() {
|
||||||
assert hasButtonEvent();
|
assert hasButtonEvent() : "Must have a button event to get the button state";
|
||||||
return isButtonPressed;
|
return isButtonPressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,12 +270,12 @@ class WLPointerEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double getXAxisVectorValue() {
|
public double getXAxisVectorValue() {
|
||||||
assert xAxisHasVectorValue();
|
assert xAxisHasVectorValue() : "Must have an X axis vector value";
|
||||||
return xAxis_vectorValue;
|
return xAxis_vectorValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getXAxisSteps120Value() {
|
public int getXAxisSteps120Value() {
|
||||||
assert xAxisHasSteps120Value();
|
assert xAxisHasSteps120Value() : "Must have an X axis steps120 value";
|
||||||
return xAxis_steps120Value;
|
return xAxis_steps120Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,12 +298,12 @@ class WLPointerEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double getYAxisVectorValue() {
|
public double getYAxisVectorValue() {
|
||||||
assert yAxisHasVectorValue();
|
assert yAxisHasVectorValue() : "Must have an Y axis vector value";
|
||||||
return yAxis_vectorValue;
|
return yAxis_vectorValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getYAxisSteps120Value() {
|
public int getYAxisSteps120Value() {
|
||||||
assert yAxisHasSteps120Value();
|
assert yAxisHasSteps120Value(): "Must have an Y axis steps120 value";
|
||||||
return yAxis_steps120Value;
|
return yAxis_steps120Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ public class WLRobotPeer implements RobotPeer {
|
|||||||
static Point getLocationOfWLSurface(WLSurface wlSurface) {
|
static Point getLocationOfWLSurface(WLSurface wlSurface) {
|
||||||
checkExtensionPresent();
|
checkExtensionPresent();
|
||||||
|
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
final long wlSurfacePtr = wlSurface.getWlSurfacePtr();
|
final long wlSurfacePtr = wlSurface.getWlSurfacePtr();
|
||||||
// The native implementation allows for just one such request at a time
|
// The native implementation allows for just one such request at a time
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class WLSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
|
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
hide();
|
hide();
|
||||||
@@ -67,7 +67,7 @@ public class WLSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hide() {
|
public void hide() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
if (surfaceData == null) return;
|
if (surfaceData == null) return;
|
||||||
@@ -85,14 +85,14 @@ public class WLSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasSurfaceData() {
|
public boolean hasSurfaceData() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
return surfaceData != null;
|
return surfaceData != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void associateWithSurfaceData(SurfaceData data) {
|
public void associateWithSurfaceData(SurfaceData data) {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
Objects.requireNonNull(data);
|
Objects.requireNonNull(data);
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ public class WLSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void commit() {
|
public void commit() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
nativeCommitWlSurface(nativePtr);
|
nativeCommitWlSurface(nativePtr);
|
||||||
@@ -115,28 +115,28 @@ public class WLSurface {
|
|||||||
* @return a pointer to wl_surface native object
|
* @return a pointer to wl_surface native object
|
||||||
*/
|
*/
|
||||||
public long getWlSurfacePtr() {
|
public long getWlSurfacePtr() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
return wlSurfacePtr;
|
return wlSurfacePtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected long getNativePtr() {
|
protected long getNativePtr() {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
return nativePtr;
|
return nativePtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSize(int width, int height) {
|
public void setSize(int width, int height) {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
nativeSetSize(nativePtr, width, height);
|
nativeSetSize(nativePtr, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOpaqueRegion(int x, int y, int width, int 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();
|
assertIsValid();
|
||||||
|
|
||||||
nativeSetOpaqueRegion(nativePtr, x, y, width, height);
|
nativeSetOpaqueRegion(nativePtr, x, y, width, height);
|
||||||
@@ -151,7 +151,7 @@ public class WLSurface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateSurfaceSize(int surfaceWidth, int surfaceHeight) {
|
public void updateSurfaceSize(int surfaceWidth, int surfaceHeight) {
|
||||||
assert SunToolkit.isAWTLockHeldByCurrentThread();
|
assert SunToolkit.isAWTLockHeldByCurrentThread() : "This method must be invoked while holding the AWT lock";
|
||||||
assertIsValid();
|
assertIsValid();
|
||||||
|
|
||||||
setSize(surfaceWidth, surfaceHeight);
|
setSize(surfaceWidth, surfaceHeight);
|
||||||
|
|||||||
@@ -143,6 +143,11 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
|
|
||||||
private static final boolean isKDE;
|
private static final boolean isKDE;
|
||||||
|
|
||||||
|
// NOTE: xdg_toplevel_icon_v1 is pretty much only supported on KDE, and KWin always sends 96px as the icon size,
|
||||||
|
// regardless of the display resolution, scale, or anything else.
|
||||||
|
// TODO: this is currently unused
|
||||||
|
private static final java.util.List<Integer> preferredIconSizes = new ArrayList<>();
|
||||||
|
|
||||||
private static native void initIDs(long displayPtr);
|
private static native void initIDs(long displayPtr);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -326,7 +331,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
|
|
||||||
private static void dispatchPointerEvent(WLPointerEvent e) {
|
private static void dispatchPointerEvent(WLPointerEvent e) {
|
||||||
// Invoked from the native code
|
// 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);
|
if (log.isLoggable(PlatformLogger.Level.FINE)) log.fine("dispatchPointerEvent: " + e);
|
||||||
|
|
||||||
@@ -357,7 +362,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
char keyChar,
|
char keyChar,
|
||||||
int modifiers) {
|
int modifiers) {
|
||||||
// Invoked from the native code
|
// Invoked from the native code
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
inputState = inputState.updatedFromKeyEvent(serial);
|
inputState = inputState.updatedFromKeyEvent(serial);
|
||||||
|
|
||||||
@@ -420,14 +425,14 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void dispatchKeyboardModifiersEvent(long serial) {
|
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());
|
inputState = inputState.updatedFromKeyboardModifiersEvent(serial, keyboard.getModifiers());
|
||||||
WLDropTargetContextPeer.getInstance().handleModifiersUpdate();
|
WLDropTargetContextPeer.getInstance().handleModifiersUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void dispatchKeyboardEnterEvent(long serial, long surfacePtr) {
|
private static void dispatchKeyboardEnterEvent(long serial, long surfacePtr) {
|
||||||
// Invoked from the native code
|
// Invoked from the native code
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
|
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
|
||||||
logKeys.fine("dispatchKeyboardEnterEvent: " + serial + ", surface 0x"
|
logKeys.fine("dispatchKeyboardEnterEvent: " + serial + ", surface 0x"
|
||||||
@@ -456,7 +461,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
|
|
||||||
private static void dispatchKeyboardLeaveEvent(long serial, long surfacePtr) {
|
private static void dispatchKeyboardLeaveEvent(long serial, long surfacePtr) {
|
||||||
// Invoked from the native code
|
// Invoked from the native code
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
|
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
|
||||||
logKeys.fine("dispatchKeyboardLeaveEvent: " + serial + ", surface 0x"
|
logKeys.fine("dispatchKeyboardLeaveEvent: " + serial + ", surface 0x"
|
||||||
@@ -1094,6 +1099,15 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if xdg-decoration-unstable-v1 is supported and false otherwise.
|
||||||
|
*/
|
||||||
|
public static boolean isSSDAvailable() {
|
||||||
|
return isSSDAvailableImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static native boolean isSSDAvailableImpl();
|
||||||
|
|
||||||
private native int readEvents();
|
private native int readEvents();
|
||||||
private native void dispatchEventsOnEDT();
|
private native void dispatchEventsOnEDT();
|
||||||
private native void flushImpl();
|
private native void flushImpl();
|
||||||
@@ -1132,4 +1146,9 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
|||||||
public static boolean isKDE() {
|
public static boolean isKDE() {
|
||||||
return isKDE;
|
return isKDE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// called from native
|
||||||
|
private static void handleToplevelIconSize(int size) {
|
||||||
|
preferredIconSizes.add(size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ import java.awt.Color;
|
|||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
import java.awt.Graphics2D;
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.GraphicsConfiguration;
|
||||||
|
import java.awt.Image;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.RenderingHints;
|
import java.awt.RenderingHints;
|
||||||
@@ -51,6 +53,7 @@ import java.awt.image.BufferedImage;
|
|||||||
import java.awt.peer.ComponentPeer;
|
import java.awt.peer.ComponentPeer;
|
||||||
import java.awt.peer.WindowPeer;
|
import java.awt.peer.WindowPeer;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class WLWindowPeer extends WLComponentPeer implements WindowPeer, SurfacePixelGrabber {
|
public class WLWindowPeer extends WLComponentPeer implements WindowPeer, SurfacePixelGrabber {
|
||||||
private static Font defaultFont;
|
private static Font defaultFont;
|
||||||
@@ -77,7 +80,11 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer, Surface
|
|||||||
}
|
}
|
||||||
|
|
||||||
public WLWindowPeer(Window target) {
|
public WLWindowPeer(Window target) {
|
||||||
super(target);
|
this(target, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WLWindowPeer(Window target, boolean dropShadow) {
|
||||||
|
super(target, dropShadow);
|
||||||
|
|
||||||
if (!target.isFontSet()) {
|
if (!target.isFontSet()) {
|
||||||
target.setFont(getDefaultFont());
|
target.setFont(getDefaultFont());
|
||||||
@@ -176,7 +183,38 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer, Surface
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateIconImages() {
|
public void updateIconImages() {
|
||||||
// No support for this from Wayland, icon is a desktop integration feature.
|
List<Image> iconImages = getWindow().getIconImages();
|
||||||
|
if (iconImages == null || iconImages.isEmpty()) {
|
||||||
|
setIcon(0, null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Image image = iconImages.stream()
|
||||||
|
.filter(x -> x.getWidth(null) > 0 && x.getHeight(null) > 0)
|
||||||
|
.filter(x -> x.getWidth(null) == x.getHeight(null))
|
||||||
|
.max((a, b) -> Integer.compare(a.getWidth(null), b.getWidth(null)))
|
||||||
|
.orElse(null);
|
||||||
|
if (image == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int width = image.getWidth(null);
|
||||||
|
int height = image.getHeight(null);
|
||||||
|
int size = width;
|
||||||
|
|
||||||
|
BufferedImage bufferedImage;
|
||||||
|
if (image instanceof BufferedImage && ((BufferedImage) image).getType() == BufferedImage.TYPE_INT_ARGB) {
|
||||||
|
bufferedImage = (BufferedImage) image;
|
||||||
|
} else {
|
||||||
|
bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D g = bufferedImage.createGraphics();
|
||||||
|
g.drawImage(image, 0, 0, null);
|
||||||
|
g.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
int[] pixels = new int[width * height];
|
||||||
|
bufferedImage.getRGB(0, 0, width, height, pixels, 0, width);
|
||||||
|
setIcon(size, pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
|
|||||||
|
|
||||||
|
|
||||||
public void startTracking(final Component component) {
|
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)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer(
|
log.finer(
|
||||||
@@ -108,7 +108,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void stopTrackingCurrentComponent() {
|
public void stopTrackingCurrentComponent() {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer(String.format("stopTrackingCurrentComponent(): this=%s.", this), new Throwable("Stacktrace"));
|
log.finer(String.format("stopTrackingCurrentComponent(): this=%s.", this), new Throwable("Stacktrace"));
|
||||||
@@ -160,7 +160,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Component getTrackedComponentIfTracking() {
|
public Component getTrackedComponentIfTracking() {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
final Component trackedComponentStrong;
|
final Component trackedComponentStrong;
|
||||||
if (trackedComponent == null) {
|
if (trackedComponent == null) {
|
||||||
@@ -188,7 +188,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
|
|||||||
|
|
||||||
|
|
||||||
public void deferUpdates() {
|
public void deferUpdates() {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer(String.format("deferUpdates(): this=%s.", this), new Throwable("Stacktrace"));
|
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) {
|
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)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer(String.format("resumeUpdates(%b): this=%s.", discardDeferredUpdates, this), new Throwable("Stacktrace"));
|
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() {
|
public boolean areUpdatesDeferred() {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
return updatesAreDeferred;
|
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)}. */
|
/** 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) {
|
public void onIMDispatchEvent(AWTEvent event) {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer("onIMDispatchEvent(event={0}): this={1}.", event, this);
|
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)}. */
|
/** 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) {
|
public void onIMNotifyClientWindowChange(Rectangle location) {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer("onIMNotifyClientWindowChange(location={0}): this={1}.", location, this);
|
log.finer("onIMNotifyClientWindowChange(location={0}): this={1}.", location, this);
|
||||||
@@ -333,7 +333,7 @@ class ClientComponentCaretPositionTracker implements ComponentListener, CaretLis
|
|||||||
|
|
||||||
|
|
||||||
private WLInputMethodZwpTextInputV3 getOwnerIm() {
|
private WLInputMethodZwpTextInputV3 getOwnerIm() {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
final WLInputMethodZwpTextInputV3 thisImStrong;
|
final WLInputMethodZwpTextInputV3 thisImStrong;
|
||||||
if (this.im == null) {
|
if (this.im == null) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ final class InputContextState {
|
|||||||
|
|
||||||
|
|
||||||
public InputContextState(long nativeContextPtr) {
|
public InputContextState(long nativeContextPtr) {
|
||||||
assert(nativeContextPtr != 0);
|
assert nativeContextPtr != 0 : "Cannot create an input context from a NULL pointer";
|
||||||
|
|
||||||
this.nativeContextPtr = nativeContextPtr;
|
this.nativeContextPtr = nativeContextPtr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ record JavaPreeditString(String text, int cursorBeginCodeUnit, int cursorEndCode
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (resultText == null) {
|
if (resultText == null) {
|
||||||
assert(fixedCursorBeginUtf8Byte == 0);
|
assert fixedCursorBeginUtf8Byte == 0 : "Cursor begin byte must be zero for an empty string";
|
||||||
assert(fixedCursorEndUtf8Byte == 0);
|
assert fixedCursorEndUtf8Byte == 0 : "Cursor end byte must be zero for an empty string";
|
||||||
|
|
||||||
return JavaPreeditString.EMPTY;
|
return JavaPreeditString.EMPTY;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public final class WLInputMethodDescriptorZwpTextInputV3 implements InputMethodD
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getInputMethodDisplayName(Locale inputLocale, Locale displayLanguage) {
|
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.
|
// This is how it's implemented in all other Toolkits.
|
||||||
//
|
//
|
||||||
@@ -183,7 +183,7 @@ public final class WLInputMethodDescriptorZwpTextInputV3 implements InputMethodD
|
|||||||
|
|
||||||
|
|
||||||
private WLInputMethodDescriptorZwpTextInputV3() {
|
private WLInputMethodDescriptorZwpTextInputV3() {
|
||||||
assert isAvailableOnPlatform();
|
assert isAvailableOnPlatform() : "IM must be available on the platform";
|
||||||
|
|
||||||
initAndGetToolkitStartupLocale();
|
initAndGetToolkitStartupLocale();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// "The method is only called when the input method is inactive."
|
// "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),
|
// 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.
|
// 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."
|
// "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();
|
wlDisableContextNow();
|
||||||
}
|
}
|
||||||
@@ -374,10 +374,10 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
/* AWT-side methods section */
|
/* AWT-side methods section */
|
||||||
|
|
||||||
private static void awtFillWlContentTypeOf(Component component, OutgoingChanges out) {
|
private static void awtFillWlContentTypeOf(Component component, OutgoingChanges out) {
|
||||||
assert(component != null);
|
assert component != null : "Component must not be null";
|
||||||
assert(out != 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.
|
// TODO: there's no dedicated AWT/Swing API for that, but we can make a few guesses, e.g.
|
||||||
// (component instanceof JPasswordField) ? ContentPurpose.PASSWORD
|
// (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;
|
* compatible with {@code zwp_text_input_v3::set_cursor_rectangle} API;
|
||||||
*/
|
*/
|
||||||
private static Rectangle awtGetWlCursorRectangleOf(Component component) {
|
private static Rectangle awtGetWlCursorRectangleOf(Component component) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
Rectangle result = null;
|
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.
|
* @throws IllegalArgumentException if {@code visibleComponent} is {@code null} or isn't showing on the screen.
|
||||||
*/
|
*/
|
||||||
private static Rectangle awtGetCaretOf(Component visibleComponent) {
|
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()) {
|
if (!Objects.requireNonNull(visibleComponent, "visibleComponent").isShowing()) {
|
||||||
throw new IllegalArgumentException("visibleComponent must be showing");
|
throw new IllegalArgumentException("visibleComponent must be showing");
|
||||||
@@ -474,7 +474,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Rectangle awtGetVisibleRectOf(final Component component) {
|
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) {
|
if (component instanceof javax.swing.JComponent jComponent) {
|
||||||
return jComponent.getVisibleRect();
|
return jComponent.getVisibleRect();
|
||||||
@@ -488,7 +488,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
* or {@code null} if the rectangle couldn't be determined.
|
* or {@code null} if the rectangle couldn't be determined.
|
||||||
*/
|
*/
|
||||||
private static Rectangle awtConvertRectOnComponentToRectOnWlSurface(Component component, Rectangle rectOnComponent) {
|
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");
|
Objects.requireNonNull(component, "component");
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
* or its closest ancestor meeting these requirements.
|
* or its closest ancestor meeting these requirements.
|
||||||
*/
|
*/
|
||||||
private static Window awtGetWlSurfaceComponentOf(Component component) {
|
private static Window awtGetWlSurfaceComponentOf(Component component) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
return WLComponentPeer.getToplevelFor(component);
|
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);
|
log.finer("awtPostIMESafely(preeditString={0}, commitString={1}): this={2}.", preeditString, commitString, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(preeditString != null);
|
assert preeditString != null : "Pre-edit string must be present";
|
||||||
assert(commitString != null);
|
assert commitString != null : "Commit string must be present";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (awtActivationStatus != AWTActivationStatus.ACTIVATED) {
|
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),
|
String.format("awtPostIMESafely(...): posting a new InputMethodEvent=%s. this=%s.", ime, this),
|
||||||
new Throwable("Stacktrace")
|
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);
|
SunToolkit.postEvent(SunToolkit.targetToAppContext(clientComponent), ime);
|
||||||
@@ -765,8 +769,8 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
specialPreeditHighlightingBegin = swapTemp;
|
specialPreeditHighlightingBegin = swapTemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(specialPreeditHighlightingBegin >= 0);
|
assert specialPreeditHighlightingBegin >= 0 : "specialPreeditHighlightingBegin is invalid";
|
||||||
assert(specialPreeditHighlightingEnd <= preeditTextLength);
|
assert specialPreeditHighlightingEnd <= preeditTextLength : "specialPreeditHighlightingEnd is out of range";
|
||||||
|
|
||||||
// v
|
// v
|
||||||
// |BASIC+SPECIAL...|
|
// |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.
|
// The methods in this section implement the core logic of working with the "text-input-unstable-v3" protocol.
|
||||||
|
|
||||||
private void wlInitializeContext() throws AWTException {
|
private void wlInitializeContext() throws AWTException {
|
||||||
assert(wlInputContextState == null);
|
assert wlInputContextState == null : "Must not initialize input context twice";
|
||||||
assert(wlPendingChanges == null);
|
assert wlPendingChanges == null : "Must not initialize pending changes twice";
|
||||||
assert(wlBeingCommittedChanges == null);
|
assert wlBeingCommittedChanges == null : "Must not initialize being-committed changes twice";
|
||||||
assert(wlIncomingChanges == null);
|
assert wlIncomingChanges == null : "Must not initialize incoming changes twice";
|
||||||
|
|
||||||
long nativeCtxPtr = 0;
|
long nativeCtxPtr = 0;
|
||||||
|
|
||||||
@@ -874,7 +878,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
* followed by a {@code zwp_text_input_v3::commit} request.
|
* followed by a {@code zwp_text_input_v3::commit} request.
|
||||||
*/
|
*/
|
||||||
private void wlSendPendingChangesNow() {
|
private void wlSendPendingChangesNow() {
|
||||||
assert(wlCanSendChangesNow());
|
assert wlCanSendChangesNow() : "Must be able to send pending changes now";
|
||||||
|
|
||||||
final OutgoingChanges changesToSend = wlPendingChanges;
|
final OutgoingChanges changesToSend = wlPendingChanges;
|
||||||
wlPendingChanges = null;
|
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");
|
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.
|
// 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
|
// 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);
|
awtFillWlContentTypeOf(getClientComponent(), changeSet);
|
||||||
|
|
||||||
wlScheduleContextNewChanges(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.
|
// 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
|
// 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 [...]"
|
// set_surrounding_text, set_text_change_cause, set_content_type, and set_cursor_rectangle requests [...]"
|
||||||
wlBeingCommittedChanges = null;
|
wlBeingCommittedChanges = null;
|
||||||
|
|
||||||
assert(wlCanSendChangesNow());
|
assert wlCanSendChangesNow() : "Must be able to send pending changes now";
|
||||||
wlSendPendingChangesNow();
|
wlSendPendingChangesNow();
|
||||||
|
|
||||||
// See the assumption #2 above.
|
// 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));
|
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.
|
// 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
|
// 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."
|
// "After an enter event or disable request all state information is invalidated and needs to be resent by the client."
|
||||||
wlBeingCommittedChanges = null;
|
wlBeingCommittedChanges = null;
|
||||||
|
|
||||||
assert(wlCanSendChangesNow());
|
assert wlCanSendChangesNow() : "Must be able to send pending changes now";
|
||||||
wlSendPendingChangesNow();
|
wlSendPendingChangesNow();
|
||||||
|
|
||||||
// See the assumption #2 above.
|
// See the assumption #2 above.
|
||||||
@@ -1202,7 +1206,7 @@ final class WLInputMethodZwpTextInputV3 extends InputMethodAdapter {
|
|||||||
|
|
||||||
/** Called by {@link ClientComponentCaretPositionTracker} */
|
/** Called by {@link ClientComponentCaretPositionTracker} */
|
||||||
boolean wlUpdateCursorRectangle(final boolean forceUpdate) {
|
boolean wlUpdateCursorRectangle(final boolean forceUpdate) {
|
||||||
assert(EventQueue.isDispatchThread());
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
if (log.isLoggable(PlatformLogger.Level.FINER)) {
|
||||||
log.finer("wlUpdateCursorRectangle(): forceUpdate={0}, this={1}.", forceUpdate, this);
|
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. */
|
/** Called in response to {@code zwp_text_input_v3::enter} events. */
|
||||||
private void zwp_text_input_v3_onEnter(long enteredWlSurfacePtr) {
|
private void zwp_text_input_v3_onEnter(long enteredWlSurfacePtr) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
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. */
|
/** Called in response to {@code zwp_text_input_v3::leave} events. */
|
||||||
private void zwp_text_input_v3_onLeave(long leftWlSurfacePtr) {
|
private void zwp_text_input_v3_onLeave(long leftWlSurfacePtr) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
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. */
|
/** 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) {
|
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 {
|
try {
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
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. */
|
/** Called in response to {@code zwp_text_input_v3::commit_string} events. */
|
||||||
private void zwp_text_input_v3_onCommitString(byte[] commitStrUtf8) {
|
private void zwp_text_input_v3_onCommitString(byte[] commitStrUtf8) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
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. */
|
/** Called in response to {@code zwp_text_input_v3::delete_surrounding_text} events. */
|
||||||
private void zwp_text_input_v3_onDeleteSurroundingText(long numberOfUtf8BytesBeforeToDelete, long numberOfUtf8BytesAfterToDelete) {
|
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)
|
// TODO: support the surrounding text API (set_surrounding_text + set_text_change_cause | delete_surrounding text)
|
||||||
// at least for particular cases.
|
// 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. */
|
/** Called in response to {@code zwp_text_input_v3::done} events. */
|
||||||
private void zwp_text_input_v3_onDone(long doneSerial) {
|
private void zwp_text_input_v3_onDone(long doneSerial) {
|
||||||
assert EventQueue.isDispatchThread();
|
assert EventQueue.isDispatchThread() : "Method must only be invoked on EDT";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||||
|
|||||||
@@ -35,6 +35,9 @@
|
|||||||
#include "WLRobotPeer.h"
|
#include "WLRobotPeer.h"
|
||||||
#include "WLGraphicsEnvironment.h"
|
#include "WLGraphicsEnvironment.h"
|
||||||
|
|
||||||
|
#include "xdg-decoration-unstable-v1.h"
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef WAKEFIELD_ROBOT
|
#ifdef WAKEFIELD_ROBOT
|
||||||
#include "wakefield.h"
|
#include "wakefield.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -66,6 +69,9 @@ struct WLFrame {
|
|||||||
jboolean configuredActive;
|
jboolean configuredActive;
|
||||||
jboolean configuredMaximized;
|
jboolean configuredMaximized;
|
||||||
jboolean configuredFullscreen;
|
jboolean configuredFullscreen;
|
||||||
|
|
||||||
|
struct wl_buffer* iconBuffer;
|
||||||
|
struct wl_shm_pool* iconPool;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -381,7 +387,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreateWindow
|
|||||||
|
|
||||||
static struct xdg_positioner *
|
static struct xdg_positioner *
|
||||||
newPositioner
|
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);
|
struct xdg_positioner *xdg_positioner = xdg_wm_base_create_positioner(xdg_wm_base);
|
||||||
CHECK_NULL_RETURN(xdg_positioner, NULL);
|
CHECK_NULL_RETURN(xdg_positioner, NULL);
|
||||||
@@ -394,10 +400,15 @@ newPositioner
|
|||||||
xdg_positioner_set_offset(xdg_positioner, 0, 0);
|
xdg_positioner_set_offset(xdg_positioner, 0, 0);
|
||||||
xdg_positioner_set_anchor(xdg_positioner, XDG_POSITIONER_ANCHOR_TOP_LEFT);
|
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_gravity(xdg_positioner, XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT);
|
||||||
xdg_positioner_set_constraint_adjustment(xdg_positioner,
|
if (isUnconstrained) {
|
||||||
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
|
xdg_positioner_set_constraint_adjustment(xdg_positioner,
|
||||||
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X
|
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE);
|
||||||
| XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y);
|
} 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;
|
return xdg_positioner;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,7 +416,8 @@ JNIEXPORT void JNICALL
|
|||||||
Java_sun_awt_wl_WLComponentPeer_nativeCreatePopup
|
Java_sun_awt_wl_WLComponentPeer_nativeCreatePopup
|
||||||
(JNIEnv *env, jobject obj, jlong ptr, jlong parentPtr, jlong wlSurfacePtr,
|
(JNIEnv *env, jobject obj, jlong ptr, jlong parentPtr, jlong wlSurfacePtr,
|
||||||
jint width, jint height,
|
jint width, jint height,
|
||||||
jint offsetX, jint offsetY)
|
jint offsetX, jint offsetY,
|
||||||
|
jboolean isUnconstrained)
|
||||||
{
|
{
|
||||||
struct WLFrame *frame = (struct WLFrame *) ptr;
|
struct WLFrame *frame = (struct WLFrame *) ptr;
|
||||||
struct WLFrame *parentFrame = (struct WLFrame*) parentPtr;
|
struct WLFrame *parentFrame = (struct WLFrame*) parentPtr;
|
||||||
@@ -417,7 +429,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreatePopup
|
|||||||
frame->toplevel = JNI_FALSE;
|
frame->toplevel = JNI_FALSE;
|
||||||
|
|
||||||
assert(parentFrame);
|
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);
|
CHECK_NULL(xdg_positioner);
|
||||||
JNU_RUNTIME_ASSERT(env, parentFrame->toplevel, "Popup's parent surface must be a toplevel");
|
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);
|
frame->xdg_popup = xdg_surface_get_popup(frame->xdg_surface, parentFrame->xdg_surface, xdg_positioner);
|
||||||
@@ -430,13 +442,14 @@ JNIEXPORT void JNICALL
|
|||||||
Java_sun_awt_wl_WLComponentPeer_nativeRepositionWLPopup
|
Java_sun_awt_wl_WLComponentPeer_nativeRepositionWLPopup
|
||||||
(JNIEnv *env, jobject obj, jlong ptr,
|
(JNIEnv *env, jobject obj, jlong ptr,
|
||||||
jint width, jint height,
|
jint width, jint height,
|
||||||
jint offsetX, jint offsetY)
|
jint offsetX, jint offsetY,
|
||||||
|
jboolean isUnconstrained)
|
||||||
{
|
{
|
||||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||||
assert (!frame->toplevel);
|
assert (!frame->toplevel);
|
||||||
|
|
||||||
if (wl_proxy_get_version((struct wl_proxy *)xdg_wm_base) >= 3) {
|
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);
|
CHECK_NULL(xdg_positioner);
|
||||||
static int token = 42; // This will be received by xdg_popup_repositioned(); unused for now.
|
static int token = 42; // This will be received by xdg_popup_repositioned(); unused for now.
|
||||||
xdg_popup_reposition(frame->xdg_popup, xdg_positioner, token++);
|
xdg_popup_reposition(frame->xdg_popup, xdg_positioner, token++);
|
||||||
@@ -547,3 +560,80 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeShowWindowMenu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jlong JNICALL Java_sun_awt_wl_ServerSideFrameDecoration_createToplevelDecorationImpl
|
||||||
|
(JNIEnv *env, jobject obj, jlong ptr)
|
||||||
|
{
|
||||||
|
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||||
|
if (frame->toplevel) {
|
||||||
|
struct zxdg_toplevel_decoration_v1 * decor = zxdg_decoration_manager_v1_get_toplevel_decoration(
|
||||||
|
xdg_decoration_manager, frame->xdg_toplevel);
|
||||||
|
zxdg_toplevel_decoration_v1_set_mode(decor, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE);
|
||||||
|
return ptr_to_jlong(decor);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_sun_awt_wl_ServerSideFrameDecoration_disposeImpl
|
||||||
|
(JNIEnv *env, jobject obj, jlong ptr)
|
||||||
|
{
|
||||||
|
struct zxdg_toplevel_decoration_v1 * decor = jlong_to_ptr(ptr);
|
||||||
|
if (decor) {
|
||||||
|
zxdg_toplevel_decoration_v1_destroy(decor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetIcon
|
||||||
|
(JNIEnv *env, jobject obj, jlong ptr, jint size, jobject pixelArray)
|
||||||
|
{
|
||||||
|
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||||
|
if (frame == NULL || !frame->toplevel || xdg_toplevel_icon_manager == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasIcon = frame->iconBuffer != NULL;
|
||||||
|
bool willHaveIcon = size > 0 && pixelArray != NULL;
|
||||||
|
size_t iconByteSize = size * size * 4;
|
||||||
|
|
||||||
|
if (!willHaveIcon) {
|
||||||
|
xdg_toplevel_icon_manager_v1_set_icon(xdg_toplevel_icon_manager, frame->xdg_toplevel, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasIcon) {
|
||||||
|
if (frame->iconBuffer != NULL) {
|
||||||
|
wl_buffer_destroy(frame->iconBuffer);
|
||||||
|
frame->iconBuffer = NULL;
|
||||||
|
}
|
||||||
|
if (frame->iconPool != NULL) {
|
||||||
|
wl_shm_pool_destroy(frame->iconPool);
|
||||||
|
frame->iconPool = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (willHaveIcon) {
|
||||||
|
void* poolData = NULL;
|
||||||
|
struct wl_shm_pool* pool = CreateShmPool(iconByteSize, "toplevel_icon", &poolData, NULL);
|
||||||
|
if (pool == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
(*env)->GetIntArrayRegion(env, pixelArray, 0, size * size, poolData);
|
||||||
|
struct wl_buffer* buffer = wl_shm_pool_create_buffer(pool, 0, size, size, size * 4, WL_SHM_FORMAT_ARGB8888);
|
||||||
|
if (buffer == NULL) {
|
||||||
|
wl_shm_pool_destroy(pool);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct xdg_toplevel_icon_v1* icon = xdg_toplevel_icon_manager_v1_create_icon(xdg_toplevel_icon_manager);
|
||||||
|
if (icon == NULL) {
|
||||||
|
wl_buffer_destroy(buffer);
|
||||||
|
wl_shm_pool_destroy(pool);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
xdg_toplevel_icon_v1_add_buffer(icon, buffer, 1);
|
||||||
|
xdg_toplevel_icon_manager_v1_set_icon(xdg_toplevel_icon_manager, frame->xdg_toplevel, icon);
|
||||||
|
xdg_toplevel_icon_v1_destroy(icon);
|
||||||
|
|
||||||
|
frame->iconPool = pool;
|
||||||
|
frame->iconBuffer = buffer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,17 +26,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "WLKeyboard.h"
|
#include "WLKeyboard.h"
|
||||||
|
|
||||||
#include "WLToolkit.h"
|
#include "WLToolkit.h"
|
||||||
#include "java_awt_event_InputEvent.h"
|
#include "java_awt_event_InputEvent.h"
|
||||||
|
#include "sun_awt_wl_WLKeyboard.h"
|
||||||
|
#include "java_awt_event_KeyEvent.h"
|
||||||
|
|
||||||
#include <sun_awt_wl_WLKeyboard.h>
|
#include <jni_util.h>
|
||||||
|
|
||||||
|
#include <xkbcommon/xkbcommon.h>
|
||||||
|
#include <xkbcommon/xkbcommon-compose.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <dlfcn.h>
|
|
||||||
|
|
||||||
#include <java_awt_event_KeyEvent.h>
|
|
||||||
#include <jni_util.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -50,6 +52,9 @@ extern JNIEnv *getEnv();
|
|||||||
#define XKB_MOD_NAME_ALT "Mod1"
|
#define XKB_MOD_NAME_ALT "Mod1"
|
||||||
#define XKB_MOD_NAME_NUM "Mod2"
|
#define XKB_MOD_NAME_NUM "Mod2"
|
||||||
#define XKB_MOD_NAME_LOGO "Mod4"
|
#define XKB_MOD_NAME_LOGO "Mod4"
|
||||||
|
#define XKB_LED_NAME_CAPS "Caps Lock"
|
||||||
|
#define XKB_LED_NAME_NUM "Num Lock"
|
||||||
|
#define XKB_LED_NAME_SCROLL "Scroll Lock"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
XKB_MOD_INDEX_SHIFT = 0, // Shift
|
XKB_MOD_INDEX_SHIFT = 0, // Shift
|
||||||
@@ -75,122 +80,8 @@ enum {
|
|||||||
XKB_LEVEL3_MASK = 1 << XKB_MOD_INDEX_LEVEL3,
|
XKB_LEVEL3_MASK = 1 << XKB_MOD_INDEX_LEVEL3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define XKB_LED_NAME_CAPS "Caps Lock"
|
|
||||||
#define XKB_LED_NAME_NUM "Num Lock"
|
|
||||||
#define XKB_LED_NAME_SCROLL "Scroll Lock"
|
|
||||||
|
|
||||||
#define MAX_COMPOSE_UTF8_LENGTH 256
|
#define MAX_COMPOSE_UTF8_LENGTH 256
|
||||||
|
|
||||||
typedef uint32_t xkb_keycode_t;
|
|
||||||
typedef uint32_t xkb_keysym_t;
|
|
||||||
typedef uint32_t xkb_layout_index_t;
|
|
||||||
typedef uint32_t xkb_layout_mask_t;
|
|
||||||
typedef uint32_t xkb_level_index_t;
|
|
||||||
typedef uint32_t xkb_mod_index_t;
|
|
||||||
typedef uint32_t xkb_mod_mask_t;
|
|
||||||
typedef uint32_t xkb_led_index_t;
|
|
||||||
typedef uint32_t xkb_led_mask_t;
|
|
||||||
|
|
||||||
enum xkb_keysym_flags {
|
|
||||||
XKB_KEYSYM_NO_FLAGS = 0,
|
|
||||||
XKB_KEYSYM_CASE_INSENSITIVE = (1 << 0)
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_context_flags {
|
|
||||||
XKB_CONTEXT_NO_FLAGS = 0,
|
|
||||||
XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0),
|
|
||||||
XKB_CONTEXT_NO_ENVIRONMENT_NAMES = (1 << 1),
|
|
||||||
XKB_CONTEXT_NO_SECURE_GETENV = (1 << 2)
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_log_level {
|
|
||||||
XKB_LOG_LEVEL_CRITICAL = 10,
|
|
||||||
XKB_LOG_LEVEL_ERROR = 20,
|
|
||||||
XKB_LOG_LEVEL_WARNING = 30,
|
|
||||||
XKB_LOG_LEVEL_INFO = 40,
|
|
||||||
XKB_LOG_LEVEL_DEBUG = 50
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_keymap_compile_flags {
|
|
||||||
XKB_KEYMAP_COMPILE_NO_FLAGS = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_keymap_format {
|
|
||||||
XKB_KEYMAP_FORMAT_TEXT_V1 = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_key_direction {
|
|
||||||
XKB_KEY_UP,
|
|
||||||
XKB_KEY_DOWN
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_state_component {
|
|
||||||
XKB_STATE_MODS_DEPRESSED = (1 << 0),
|
|
||||||
XKB_STATE_MODS_LATCHED = (1 << 1),
|
|
||||||
XKB_STATE_MODS_LOCKED = (1 << 2),
|
|
||||||
XKB_STATE_MODS_EFFECTIVE = (1 << 3),
|
|
||||||
XKB_STATE_LAYOUT_DEPRESSED = (1 << 4),
|
|
||||||
XKB_STATE_LAYOUT_LATCHED = (1 << 5),
|
|
||||||
XKB_STATE_LAYOUT_LOCKED = (1 << 6),
|
|
||||||
XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7),
|
|
||||||
XKB_STATE_LEDS = (1 << 8)
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_state_match {
|
|
||||||
XKB_STATE_MATCH_ANY = (1 << 0),
|
|
||||||
XKB_STATE_MATCH_ALL = (1 << 1),
|
|
||||||
XKB_STATE_MATCH_NON_EXCLUSIVE = (1 << 16)
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_consumed_mode {
|
|
||||||
XKB_CONSUMED_MODE_XKB,
|
|
||||||
XKB_CONSUMED_MODE_GTK
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_compose_compile_flags {
|
|
||||||
XKB_COMPOSE_COMPILE_NO_FLAGS = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_compose_format {
|
|
||||||
XKB_COMPOSE_FORMAT_TEXT_V1 = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_compose_state_flags {
|
|
||||||
XKB_COMPOSE_STATE_NO_FLAGS = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_compose_status {
|
|
||||||
XKB_COMPOSE_NOTHING,
|
|
||||||
XKB_COMPOSE_COMPOSING,
|
|
||||||
XKB_COMPOSE_COMPOSED,
|
|
||||||
XKB_COMPOSE_CANCELLED
|
|
||||||
};
|
|
||||||
|
|
||||||
enum xkb_compose_feed_result {
|
|
||||||
XKB_COMPOSE_FEED_IGNORED,
|
|
||||||
XKB_COMPOSE_FEED_ACCEPTED
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct xkb_context;
|
|
||||||
struct xkb_keymap;
|
|
||||||
struct xkb_state;
|
|
||||||
|
|
||||||
struct xkb_rule_names {
|
|
||||||
const char *rules;
|
|
||||||
const char *model;
|
|
||||||
const char *layout;
|
|
||||||
const char *variant;
|
|
||||||
const char *options;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct xkb_compose_table;
|
|
||||||
struct xkb_compose_state;
|
|
||||||
|
|
||||||
typedef void
|
|
||||||
(*xkb_keymap_key_iter_t)(struct xkb_keymap *keymap, xkb_keycode_t key, void *data);
|
|
||||||
|
|
||||||
static jclass keyRepeatManagerClass; // sun.awt.wl.WLKeyboard.KeyRepeatManager
|
static jclass keyRepeatManagerClass; // sun.awt.wl.WLKeyboard.KeyRepeatManager
|
||||||
static jmethodID setRepeatInfoMID; // sun.awt.wl.WLKeyboard.KeyRepeatManager.setRepeatInfo
|
static jmethodID setRepeatInfoMID; // sun.awt.wl.WLKeyboard.KeyRepeatManager.setRepeatInfo
|
||||||
static jmethodID startRepeatMID; // sun.awt.wl.WLKeyboard.KeyRepeatManager.startRepeat
|
static jmethodID startRepeatMID; // sun.awt.wl.WLKeyboard.KeyRepeatManager.startRepeat
|
||||||
@@ -241,394 +132,6 @@ static struct WLKeyboardState {
|
|||||||
bool reportJavaKeyCodeForActiveLayout;
|
bool reportJavaKeyCodeForActiveLayout;
|
||||||
} keyboard;
|
} keyboard;
|
||||||
|
|
||||||
// Symbols for runtime linking with libxkbcommon
|
|
||||||
static struct {
|
|
||||||
int (*keysym_get_name)(xkb_keysym_t keysym, char *buffer, size_t size);
|
|
||||||
|
|
||||||
xkb_keysym_t (*keysym_from_name)(const char *name, enum xkb_keysym_flags flags);
|
|
||||||
|
|
||||||
int (*keysym_to_utf8)(xkb_keysym_t keysym, char *buffer, size_t size);
|
|
||||||
|
|
||||||
uint32_t (*keysym_to_utf32)(xkb_keysym_t keysym);
|
|
||||||
|
|
||||||
xkb_keysym_t (*keysym_to_upper)(xkb_keysym_t ks);
|
|
||||||
|
|
||||||
xkb_keysym_t (*keysym_to_lower)(xkb_keysym_t ks);
|
|
||||||
|
|
||||||
struct xkb_context *(*context_new)(enum xkb_context_flags flags);
|
|
||||||
|
|
||||||
struct xkb_context *(*context_ref)(struct xkb_context *context);
|
|
||||||
|
|
||||||
void (*context_unref)(struct xkb_context *context);
|
|
||||||
|
|
||||||
void (*context_set_user_data)(struct xkb_context *context, void *user_data);
|
|
||||||
|
|
||||||
void *(*context_get_user_data)(struct xkb_context *context);
|
|
||||||
|
|
||||||
int (*context_include_path_append)(struct xkb_context *context, const char *path);
|
|
||||||
|
|
||||||
int (*context_include_path_append_default)(struct xkb_context *context);
|
|
||||||
|
|
||||||
int (*context_include_path_reset_defaults)(struct xkb_context *context);
|
|
||||||
|
|
||||||
void (*context_include_path_clear)(struct xkb_context *context);
|
|
||||||
|
|
||||||
unsigned int (*context_num_include_paths)(struct xkb_context *context);
|
|
||||||
|
|
||||||
const char *(*context_include_path_get)(struct xkb_context *context, unsigned int index);
|
|
||||||
|
|
||||||
void (*context_set_log_level)(struct xkb_context *context,
|
|
||||||
enum xkb_log_level level);
|
|
||||||
|
|
||||||
enum xkb_log_level (*context_get_log_level)(struct xkb_context *context);
|
|
||||||
|
|
||||||
void (*context_set_log_verbosity)(struct xkb_context *context, int verbosity);
|
|
||||||
|
|
||||||
int (*context_get_log_verbosity)(struct xkb_context *context);
|
|
||||||
|
|
||||||
void (*context_set_log_fn)(struct xkb_context *context,
|
|
||||||
void (*log_fn)(struct xkb_context *context,
|
|
||||||
enum xkb_log_level level,
|
|
||||||
const char *format, va_list args));
|
|
||||||
|
|
||||||
struct xkb_keymap *(*keymap_new_from_names)(struct xkb_context *context,
|
|
||||||
const struct xkb_rule_names *names,
|
|
||||||
enum xkb_keymap_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_keymap *(*keymap_new_from_file)(struct xkb_context *context, FILE *file,
|
|
||||||
enum xkb_keymap_format format,
|
|
||||||
enum xkb_keymap_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_keymap *(*keymap_new_from_string)(struct xkb_context *context, const char *string,
|
|
||||||
enum xkb_keymap_format format,
|
|
||||||
enum xkb_keymap_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_keymap *(*keymap_new_from_buffer)(struct xkb_context *context, const char *buffer,
|
|
||||||
size_t length, enum xkb_keymap_format format,
|
|
||||||
enum xkb_keymap_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_keymap *(*keymap_ref)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
void (*keymap_unref)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
char *(*keymap_get_as_string)(struct xkb_keymap *keymap,
|
|
||||||
enum xkb_keymap_format format);
|
|
||||||
|
|
||||||
xkb_keycode_t (*keymap_min_keycode)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
xkb_keycode_t (*keymap_max_keycode)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
void (*keymap_key_for_each)(struct xkb_keymap *keymap, xkb_keymap_key_iter_t iter,
|
|
||||||
void *data);
|
|
||||||
|
|
||||||
const char *(*keymap_key_get_name)(struct xkb_keymap *keymap, xkb_keycode_t key);
|
|
||||||
|
|
||||||
xkb_keycode_t (*keymap_key_by_name)(struct xkb_keymap *keymap, const char *name);
|
|
||||||
|
|
||||||
xkb_mod_index_t (*keymap_num_mods)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
const char *(*keymap_mod_get_name)(struct xkb_keymap *keymap, xkb_mod_index_t idx);
|
|
||||||
|
|
||||||
xkb_mod_index_t (*keymap_mod_get_index)(struct xkb_keymap *keymap, const char *name);
|
|
||||||
|
|
||||||
xkb_layout_index_t (*keymap_num_layouts)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
const char *(*keymap_layout_get_name)(struct xkb_keymap *keymap, xkb_layout_index_t idx);
|
|
||||||
|
|
||||||
xkb_layout_index_t (*keymap_layout_get_index)(struct xkb_keymap *keymap, const char *name);
|
|
||||||
|
|
||||||
xkb_led_index_t (*keymap_num_leds)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
const char *(*keymap_led_get_name)(struct xkb_keymap *keymap, xkb_led_index_t idx);
|
|
||||||
|
|
||||||
xkb_led_index_t (*keymap_led_get_index)(struct xkb_keymap *keymap, const char *name);
|
|
||||||
|
|
||||||
xkb_layout_index_t (*keymap_num_layouts_for_key)(struct xkb_keymap *keymap, xkb_keycode_t key);
|
|
||||||
|
|
||||||
xkb_level_index_t (*keymap_num_levels_for_key)(struct xkb_keymap *keymap, xkb_keycode_t key,
|
|
||||||
xkb_layout_index_t layout);
|
|
||||||
|
|
||||||
int
|
|
||||||
(*keymap_key_get_syms_by_level)(struct xkb_keymap *keymap,
|
|
||||||
xkb_keycode_t key,
|
|
||||||
xkb_layout_index_t layout,
|
|
||||||
xkb_level_index_t level,
|
|
||||||
const xkb_keysym_t **syms_out);
|
|
||||||
|
|
||||||
int (*keymap_key_repeats)(struct xkb_keymap *keymap, xkb_keycode_t key);
|
|
||||||
|
|
||||||
struct xkb_state *(*state_new)(struct xkb_keymap *keymap);
|
|
||||||
|
|
||||||
struct xkb_state *(*state_ref)(struct xkb_state *state);
|
|
||||||
|
|
||||||
void (*state_unref)(struct xkb_state *state);
|
|
||||||
|
|
||||||
struct xkb_keymap *(*state_get_keymap)(struct xkb_state *state);
|
|
||||||
|
|
||||||
enum xkb_state_component (*state_update_key)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
enum xkb_key_direction direction);
|
|
||||||
|
|
||||||
enum xkb_state_component (*state_update_mask)(struct xkb_state *state,
|
|
||||||
xkb_mod_mask_t depressed_mods,
|
|
||||||
xkb_mod_mask_t latched_mods,
|
|
||||||
xkb_mod_mask_t locked_mods,
|
|
||||||
xkb_layout_index_t depressed_layout,
|
|
||||||
xkb_layout_index_t latched_layout,
|
|
||||||
xkb_layout_index_t locked_layout);
|
|
||||||
|
|
||||||
int (*state_key_get_syms)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
const xkb_keysym_t **syms_out);
|
|
||||||
|
|
||||||
int (*state_key_get_utf8)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
char *buffer, size_t size);
|
|
||||||
|
|
||||||
uint32_t (*state_key_get_utf32)(struct xkb_state *state, xkb_keycode_t key);
|
|
||||||
|
|
||||||
xkb_keysym_t (*state_key_get_one_sym)(struct xkb_state *state, xkb_keycode_t key);
|
|
||||||
|
|
||||||
xkb_layout_index_t (*state_key_get_layout)(struct xkb_state *state, xkb_keycode_t key);
|
|
||||||
|
|
||||||
xkb_level_index_t (*state_key_get_level)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
xkb_layout_index_t layout);
|
|
||||||
|
|
||||||
xkb_mod_mask_t (*state_serialize_mods)(struct xkb_state *state,
|
|
||||||
enum xkb_state_component components);
|
|
||||||
|
|
||||||
xkb_layout_index_t (*state_serialize_layout)(struct xkb_state *state,
|
|
||||||
enum xkb_state_component components);
|
|
||||||
|
|
||||||
int (*state_mod_name_is_active)(struct xkb_state *state, const char *name,
|
|
||||||
enum xkb_state_component type);
|
|
||||||
|
|
||||||
int (*state_mod_names_are_active)(struct xkb_state *state,
|
|
||||||
enum xkb_state_component type,
|
|
||||||
enum xkb_state_match match,
|
|
||||||
...);
|
|
||||||
|
|
||||||
int (*state_mod_index_is_active)(struct xkb_state *state, xkb_mod_index_t idx,
|
|
||||||
enum xkb_state_component type);
|
|
||||||
|
|
||||||
int (*state_mod_indices_are_active)(struct xkb_state *state,
|
|
||||||
enum xkb_state_component type,
|
|
||||||
enum xkb_state_match match,
|
|
||||||
...);
|
|
||||||
|
|
||||||
xkb_mod_mask_t (*state_key_get_consumed_mods2)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
enum xkb_consumed_mode mode);
|
|
||||||
|
|
||||||
xkb_mod_mask_t (*state_key_get_consumed_mods)(struct xkb_state *state, xkb_keycode_t key);
|
|
||||||
|
|
||||||
int (*state_mod_index_is_consumed2)(struct xkb_state *state,
|
|
||||||
xkb_keycode_t key,
|
|
||||||
xkb_mod_index_t idx,
|
|
||||||
enum xkb_consumed_mode mode);
|
|
||||||
|
|
||||||
int (*state_mod_index_is_consumed)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
xkb_mod_index_t idx);
|
|
||||||
|
|
||||||
xkb_mod_mask_t
|
|
||||||
(*state_mod_mask_remove_consumed)(struct xkb_state *state, xkb_keycode_t key,
|
|
||||||
xkb_mod_mask_t mask);
|
|
||||||
|
|
||||||
int (*state_layout_name_is_active)(struct xkb_state *state, const char *name,
|
|
||||||
enum xkb_state_component type);
|
|
||||||
|
|
||||||
int (*state_layout_index_is_active)(struct xkb_state *state,
|
|
||||||
xkb_layout_index_t idx,
|
|
||||||
enum xkb_state_component type);
|
|
||||||
|
|
||||||
int (*state_led_name_is_active)(struct xkb_state *state, const char *name);
|
|
||||||
|
|
||||||
int (*state_led_index_is_active)(struct xkb_state *state, xkb_led_index_t idx);
|
|
||||||
|
|
||||||
struct xkb_compose_table *
|
|
||||||
(*compose_table_new_from_locale)(struct xkb_context *context,
|
|
||||||
const char *locale,
|
|
||||||
enum xkb_compose_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_compose_table *
|
|
||||||
(*compose_table_new_from_file)(struct xkb_context *context,
|
|
||||||
FILE *file,
|
|
||||||
const char *locale,
|
|
||||||
enum xkb_compose_format format,
|
|
||||||
enum xkb_compose_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_compose_table *
|
|
||||||
(*compose_table_new_from_buffer)(struct xkb_context *context,
|
|
||||||
const char *buffer, size_t length,
|
|
||||||
const char *locale,
|
|
||||||
enum xkb_compose_format format,
|
|
||||||
enum xkb_compose_compile_flags flags);
|
|
||||||
|
|
||||||
struct xkb_compose_table *
|
|
||||||
(*compose_table_ref)(struct xkb_compose_table *table);
|
|
||||||
|
|
||||||
void
|
|
||||||
(*compose_table_unref)(struct xkb_compose_table *table);
|
|
||||||
|
|
||||||
struct xkb_compose_state *
|
|
||||||
(*compose_state_new)(struct xkb_compose_table *table,
|
|
||||||
enum xkb_compose_state_flags flags);
|
|
||||||
|
|
||||||
struct xkb_compose_state *
|
|
||||||
(*compose_state_ref)(struct xkb_compose_state *state);
|
|
||||||
|
|
||||||
void
|
|
||||||
(*compose_state_unref)(struct xkb_compose_state *state);
|
|
||||||
|
|
||||||
struct xkb_compose_table *
|
|
||||||
(*compose_state_get_compose_table)(struct xkb_compose_state *state);
|
|
||||||
|
|
||||||
enum xkb_compose_feed_result
|
|
||||||
(*compose_state_feed)(struct xkb_compose_state *state,
|
|
||||||
xkb_keysym_t keysym);
|
|
||||||
|
|
||||||
void
|
|
||||||
(*compose_state_reset)(struct xkb_compose_state *state);
|
|
||||||
|
|
||||||
enum xkb_compose_status
|
|
||||||
(*compose_state_get_status)(struct xkb_compose_state *state);
|
|
||||||
|
|
||||||
int (*compose_state_get_utf8)(struct xkb_compose_state *state,
|
|
||||||
char *buffer, size_t size);
|
|
||||||
|
|
||||||
xkb_keysym_t
|
|
||||||
(*compose_state_get_one_sym)(struct xkb_compose_state *state);
|
|
||||||
} xkb;
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
clearDLError(void) {
|
|
||||||
(void) dlerror();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
xkbcommonBindSym(JNIEnv *env, void *handle, const char *sym_name) {
|
|
||||||
clearDLError();
|
|
||||||
void *addr = dlsym(handle, sym_name);
|
|
||||||
if (!addr) {
|
|
||||||
const char *errorMessage = dlerror();
|
|
||||||
JNU_ThrowByName(env, "java/lang/UnsatisfiedLinkError", errorMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
return addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define BIND_XKB_SYM(name) \
|
|
||||||
do { \
|
|
||||||
xkb.name = xkbcommonBindSym(env, handle, "xkb_" #name); \
|
|
||||||
if (!xkb.name) return false; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
static bool
|
|
||||||
xkbcommonLoad(JNIEnv *env) {
|
|
||||||
void *handle = dlopen(JNI_LIB_NAME("xkbcommon"), RTLD_LAZY | RTLD_LOCAL);
|
|
||||||
if (!handle) {
|
|
||||||
handle = dlopen(VERSIONED_JNI_LIB_NAME("xkbcommon", "0"), RTLD_LAZY | RTLD_LOCAL);
|
|
||||||
}
|
|
||||||
if (!handle) {
|
|
||||||
JNU_ThrowByNameWithMessageAndLastError(env, "java/lang/UnsatisfiedLinkError",
|
|
||||||
JNI_LIB_NAME("xkbcommon"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// These symbols are present in libxkbcommon 0.8.2, which is a version
|
|
||||||
// distributed with Debian 9, the oldest supported Debian release at the time of writing
|
|
||||||
// The following symbols are missing compared to libxkbcommon 1.5.0:
|
|
||||||
// - xkb_utf32_to_keysym
|
|
||||||
// - xkb_keymap_key_get_mods_for_level
|
|
||||||
|
|
||||||
BIND_XKB_SYM(keysym_get_name);
|
|
||||||
BIND_XKB_SYM(keysym_from_name);
|
|
||||||
BIND_XKB_SYM(keysym_to_utf8);
|
|
||||||
BIND_XKB_SYM(keysym_to_utf32);
|
|
||||||
BIND_XKB_SYM(keysym_to_upper);
|
|
||||||
BIND_XKB_SYM(keysym_to_lower);
|
|
||||||
BIND_XKB_SYM(context_new);
|
|
||||||
BIND_XKB_SYM(context_ref);
|
|
||||||
BIND_XKB_SYM(context_unref);
|
|
||||||
BIND_XKB_SYM(context_set_user_data);
|
|
||||||
BIND_XKB_SYM(context_get_user_data);
|
|
||||||
BIND_XKB_SYM(context_include_path_append);
|
|
||||||
BIND_XKB_SYM(context_include_path_append_default);
|
|
||||||
BIND_XKB_SYM(context_include_path_reset_defaults);
|
|
||||||
BIND_XKB_SYM(context_include_path_clear);
|
|
||||||
BIND_XKB_SYM(context_num_include_paths);
|
|
||||||
BIND_XKB_SYM(context_include_path_get);
|
|
||||||
BIND_XKB_SYM(context_set_log_level);
|
|
||||||
BIND_XKB_SYM(context_get_log_level);
|
|
||||||
BIND_XKB_SYM(context_set_log_verbosity);
|
|
||||||
BIND_XKB_SYM(context_get_log_verbosity);
|
|
||||||
BIND_XKB_SYM(context_set_log_fn);
|
|
||||||
BIND_XKB_SYM(keymap_new_from_names);
|
|
||||||
BIND_XKB_SYM(keymap_new_from_file);
|
|
||||||
BIND_XKB_SYM(keymap_new_from_string);
|
|
||||||
BIND_XKB_SYM(keymap_new_from_buffer);
|
|
||||||
BIND_XKB_SYM(keymap_ref);
|
|
||||||
BIND_XKB_SYM(keymap_unref);
|
|
||||||
BIND_XKB_SYM(keymap_get_as_string);
|
|
||||||
BIND_XKB_SYM(keymap_min_keycode);
|
|
||||||
BIND_XKB_SYM(keymap_max_keycode);
|
|
||||||
BIND_XKB_SYM(keymap_key_for_each);
|
|
||||||
BIND_XKB_SYM(keymap_key_get_name);
|
|
||||||
BIND_XKB_SYM(keymap_key_by_name);
|
|
||||||
BIND_XKB_SYM(keymap_num_mods);
|
|
||||||
BIND_XKB_SYM(keymap_mod_get_name);
|
|
||||||
BIND_XKB_SYM(keymap_mod_get_index);
|
|
||||||
BIND_XKB_SYM(keymap_num_layouts);
|
|
||||||
BIND_XKB_SYM(keymap_layout_get_name);
|
|
||||||
BIND_XKB_SYM(keymap_layout_get_index);
|
|
||||||
BIND_XKB_SYM(keymap_num_leds);
|
|
||||||
BIND_XKB_SYM(keymap_led_get_name);
|
|
||||||
BIND_XKB_SYM(keymap_led_get_index);
|
|
||||||
BIND_XKB_SYM(keymap_num_layouts_for_key);
|
|
||||||
BIND_XKB_SYM(keymap_num_levels_for_key);
|
|
||||||
BIND_XKB_SYM(keymap_key_get_syms_by_level);
|
|
||||||
BIND_XKB_SYM(keymap_key_repeats);
|
|
||||||
BIND_XKB_SYM(state_new);
|
|
||||||
BIND_XKB_SYM(state_ref);
|
|
||||||
BIND_XKB_SYM(state_unref);
|
|
||||||
BIND_XKB_SYM(state_get_keymap);
|
|
||||||
BIND_XKB_SYM(state_update_key);
|
|
||||||
BIND_XKB_SYM(state_update_mask);
|
|
||||||
BIND_XKB_SYM(state_key_get_syms);
|
|
||||||
BIND_XKB_SYM(state_key_get_utf8);
|
|
||||||
BIND_XKB_SYM(state_key_get_utf32);
|
|
||||||
BIND_XKB_SYM(state_key_get_one_sym);
|
|
||||||
BIND_XKB_SYM(state_key_get_layout);
|
|
||||||
BIND_XKB_SYM(state_key_get_level);
|
|
||||||
BIND_XKB_SYM(state_serialize_mods);
|
|
||||||
BIND_XKB_SYM(state_serialize_layout);
|
|
||||||
BIND_XKB_SYM(state_mod_name_is_active);
|
|
||||||
BIND_XKB_SYM(state_mod_names_are_active);
|
|
||||||
BIND_XKB_SYM(state_mod_index_is_active);
|
|
||||||
BIND_XKB_SYM(state_mod_indices_are_active);
|
|
||||||
BIND_XKB_SYM(state_key_get_consumed_mods2);
|
|
||||||
BIND_XKB_SYM(state_key_get_consumed_mods);
|
|
||||||
BIND_XKB_SYM(state_mod_index_is_consumed2);
|
|
||||||
BIND_XKB_SYM(state_mod_index_is_consumed);
|
|
||||||
BIND_XKB_SYM(state_mod_mask_remove_consumed);
|
|
||||||
BIND_XKB_SYM(state_layout_name_is_active);
|
|
||||||
BIND_XKB_SYM(state_layout_index_is_active);
|
|
||||||
BIND_XKB_SYM(state_led_name_is_active);
|
|
||||||
BIND_XKB_SYM(state_led_index_is_active);
|
|
||||||
BIND_XKB_SYM(compose_table_new_from_locale);
|
|
||||||
BIND_XKB_SYM(compose_table_new_from_file);
|
|
||||||
BIND_XKB_SYM(compose_table_new_from_buffer);
|
|
||||||
BIND_XKB_SYM(compose_table_ref);
|
|
||||||
BIND_XKB_SYM(compose_table_unref);
|
|
||||||
BIND_XKB_SYM(compose_state_new);
|
|
||||||
BIND_XKB_SYM(compose_state_ref);
|
|
||||||
BIND_XKB_SYM(compose_state_unref);
|
|
||||||
BIND_XKB_SYM(compose_state_get_compose_table);
|
|
||||||
BIND_XKB_SYM(compose_state_feed);
|
|
||||||
BIND_XKB_SYM(compose_state_reset);
|
|
||||||
BIND_XKB_SYM(compose_state_get_status);
|
|
||||||
BIND_XKB_SYM(compose_state_get_utf8);
|
|
||||||
BIND_XKB_SYM(compose_state_get_one_sym);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct KeysymToJavaKeycodeMapItem {
|
static const struct KeysymToJavaKeycodeMapItem {
|
||||||
xkb_keysym_t keysym;
|
xkb_keysym_t keysym;
|
||||||
int keycode;
|
int keycode;
|
||||||
@@ -970,9 +473,9 @@ static const struct ModifierKeysymsMapItem {
|
|||||||
|
|
||||||
static xkb_layout_index_t
|
static xkb_layout_index_t
|
||||||
getKeyboardLayoutIndex(void) {
|
getKeyboardLayoutIndex(void) {
|
||||||
xkb_layout_index_t num = xkb.keymap_num_layouts(keyboard.keymap);
|
xkb_layout_index_t num = xkb_keymap_num_layouts(keyboard.keymap);
|
||||||
for (xkb_layout_index_t i = 0; i < num; ++i) {
|
for (xkb_layout_index_t i = 0; i < num; ++i) {
|
||||||
if (xkb.state_layout_index_is_active(keyboard.state, i, XKB_STATE_LAYOUT_EFFECTIVE)) {
|
if (xkb_state_layout_index_is_active(keyboard.state, i, XKB_STATE_LAYOUT_EFFECTIVE)) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1010,14 +513,14 @@ onKeyboardLayoutChanged(void) {
|
|||||||
xkb_layout_index_t layoutIndex = getKeyboardLayoutIndex();
|
xkb_layout_index_t layoutIndex = getKeyboardLayoutIndex();
|
||||||
|
|
||||||
#ifdef WL_KEYBOARD_DEBUG
|
#ifdef WL_KEYBOARD_DEBUG
|
||||||
fprintf(stderr, "onKeyboardLayoutChanged: %s\n", xkb.keymap_layout_get_name(keyboard.keymap, layoutIndex));
|
fprintf(stderr, "onKeyboardLayoutChanged: %s\n", xkb_keymap_layout_get_name(keyboard.keymap, layoutIndex));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// bitmask of the latin letters encountered in the layout
|
// bitmask of the latin letters encountered in the layout
|
||||||
uint32_t latin_letters_seen = 0;
|
uint32_t latin_letters_seen = 0;
|
||||||
int latin_letters_seen_count = 0;
|
int latin_letters_seen_count = 0;
|
||||||
xkb_keycode_t min_keycode = xkb.keymap_min_keycode(keyboard.keymap);
|
xkb_keycode_t min_keycode = xkb_keymap_min_keycode(keyboard.keymap);
|
||||||
xkb_keycode_t max_keycode = xkb.keymap_max_keycode(keyboard.keymap);
|
xkb_keycode_t max_keycode = xkb_keymap_max_keycode(keyboard.keymap);
|
||||||
if (max_keycode > 255) {
|
if (max_keycode > 255) {
|
||||||
// All keys that we are interested in should lie within this range.
|
// All keys that we are interested in should lie within this range.
|
||||||
// The other keys are usually something like XFLaunch* or something of this sort.
|
// The other keys are usually something like XFLaunch* or something of this sort.
|
||||||
@@ -1027,11 +530,11 @@ onKeyboardLayoutChanged(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (xkb_keycode_t keycode = min_keycode; keycode <= max_keycode; ++keycode) {
|
for (xkb_keycode_t keycode = min_keycode; keycode <= max_keycode; ++keycode) {
|
||||||
uint32_t num_levels = xkb.keymap_num_levels_for_key(keyboard.keymap, keycode, layoutIndex);
|
uint32_t num_levels = xkb_keymap_num_levels_for_key(keyboard.keymap, keycode, layoutIndex);
|
||||||
|
|
||||||
for (uint32_t lvl = 0; lvl < num_levels; ++lvl) {
|
for (uint32_t lvl = 0; lvl < num_levels; ++lvl) {
|
||||||
const xkb_keysym_t *syms;
|
const xkb_keysym_t *syms;
|
||||||
int n_syms = xkb.keymap_key_get_syms_by_level(keyboard.keymap, keycode, layoutIndex, lvl, &syms);
|
int n_syms = xkb_keymap_key_get_syms_by_level(keyboard.keymap, keycode, layoutIndex, lvl, &syms);
|
||||||
if (n_syms == 1 && syms[0] >= 'a' && syms[0] <= 'z') {
|
if (n_syms == 1 && syms[0] >= 'a' && syms[0] <= 'z') {
|
||||||
int idx = (int) syms[0] - 'a';
|
int idx = (int) syms[0] - 'a';
|
||||||
if (!(latin_letters_seen & (1 << idx))) {
|
if (!(latin_letters_seen & (1 << idx))) {
|
||||||
@@ -1104,13 +607,13 @@ translateKeycodeToKeysym(uint32_t keycode, enum TranslateKeycodeType type) {
|
|||||||
} else {
|
} else {
|
||||||
state = keyboard.tmpState;
|
state = keyboard.tmpState;
|
||||||
group = getKeyboardLayoutIndex();
|
group = getKeyboardLayoutIndex();
|
||||||
numLock = xkb.state_mod_name_is_active(keyboard.state, XKB_MOD_NAME_NUM, XKB_STATE_MODS_EFFECTIVE) == 1;
|
numLock = xkb_state_mod_name_is_active(keyboard.state, XKB_MOD_NAME_NUM, XKB_STATE_MODS_EFFECTIVE) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
xkb.state_update_mask(state, 0, 0, numLock ? XKB_NUM_LOCK_MASK : 0, 0, 0, group);
|
xkb_state_update_mask(state, 0, 0, numLock ? XKB_NUM_LOCK_MASK : 0, 0, 0, group);
|
||||||
}
|
}
|
||||||
|
|
||||||
return xkb.state_key_get_one_sym(state, xkbKeycode);
|
return xkb_state_key_get_one_sym(state, xkbKeycode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
@@ -1123,7 +626,7 @@ isFunctionKeysym(xkb_keysym_t keysym) {
|
|||||||
|
|
||||||
static xkb_mod_mask_t
|
static xkb_mod_mask_t
|
||||||
getXKBModifiers(void) {
|
getXKBModifiers(void) {
|
||||||
return xkb.state_serialize_mods(keyboard.state, XKB_STATE_MODS_EFFECTIVE);
|
return xkb_state_serialize_mods(keyboard.state, XKB_STATE_MODS_EFFECTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1183,7 +686,7 @@ convertKeysymToJavaCode(xkb_keysym_t keysym, int *javaKeyCode, int *javaKeyLocat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t codepoint = xkb.keysym_to_utf32(keysym);
|
uint32_t codepoint = xkb_keysym_to_utf32(keysym);
|
||||||
if (codepoint != 0) {
|
if (codepoint != 0) {
|
||||||
if (javaKeyCode) {
|
if (javaKeyCode) {
|
||||||
// This might not be an actual Java extended key code,
|
// This might not be an actual Java extended key code,
|
||||||
@@ -1296,7 +799,7 @@ postKeyTypedEvents(long serial, long timestamp, const char *string) {
|
|||||||
|
|
||||||
static uint16_t
|
static uint16_t
|
||||||
getJavaKeyCharForKeycode(xkb_keycode_t xkbKeycode) {
|
getJavaKeyCharForKeycode(xkb_keycode_t xkbKeycode) {
|
||||||
uint32_t codepoint = xkb.state_key_get_utf32(keyboard.state, xkbKeycode);
|
uint32_t codepoint = xkb_state_key_get_utf32(keyboard.state, xkbKeycode);
|
||||||
if (codepoint == 0 || codepoint >= 0xffff) {
|
if (codepoint == 0 || codepoint >= 0xffff) {
|
||||||
return java_awt_event_KeyEvent_CHAR_UNDEFINED;
|
return java_awt_event_KeyEvent_CHAR_UNDEFINED;
|
||||||
}
|
}
|
||||||
@@ -1309,9 +812,9 @@ handleKeyTypeNoCompose(long serial, long timestamp, xkb_keycode_t xkbKeycode) {
|
|||||||
#ifdef WL_KEYBOARD_DEBUG
|
#ifdef WL_KEYBOARD_DEBUG
|
||||||
fprintf(stderr, "handleKeyTypeNoCompose: xkbKeycode = %d\n", xkbKeycode);
|
fprintf(stderr, "handleKeyTypeNoCompose: xkbKeycode = %d\n", xkbKeycode);
|
||||||
#endif
|
#endif
|
||||||
int bufSize = xkb.state_key_get_utf8(keyboard.state, xkbKeycode, NULL, 0) + 1;
|
int bufSize = xkb_state_key_get_utf8(keyboard.state, xkbKeycode, NULL, 0) + 1;
|
||||||
char buf[bufSize];
|
char buf[bufSize];
|
||||||
xkb.state_key_get_utf8(keyboard.state, xkbKeycode, buf, bufSize);
|
xkb_state_key_get_utf8(keyboard.state, xkbKeycode, buf, bufSize);
|
||||||
postKeyTypedEvents(serial, timestamp, buf);
|
postKeyTypedEvents(serial, timestamp, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1321,36 +824,36 @@ handleKeyType(long serial, long timestamp, xkb_keycode_t xkbKeycode) {
|
|||||||
#ifdef WL_KEYBOARD_DEBUG
|
#ifdef WL_KEYBOARD_DEBUG
|
||||||
fprintf(stderr, "handleKeyType(xkbKeycode = %d)\n", xkbKeycode);
|
fprintf(stderr, "handleKeyType(xkbKeycode = %d)\n", xkbKeycode);
|
||||||
#endif
|
#endif
|
||||||
xkb_keysym_t keysym = xkb.state_key_get_one_sym(keyboard.state, xkbKeycode);
|
xkb_keysym_t keysym = xkb_state_key_get_one_sym(keyboard.state, xkbKeycode);
|
||||||
|
|
||||||
#ifdef WL_KEYBOARD_DEBUG
|
#ifdef WL_KEYBOARD_DEBUG
|
||||||
char buf[256];
|
char buf[256];
|
||||||
xkb.keysym_get_name(keysym, buf, sizeof buf);
|
xkb_keysym_get_name(keysym, buf, sizeof buf);
|
||||||
fprintf(stderr, "handleKeyType: keysym = %d (%s)\n", keysym, buf);
|
fprintf(stderr, "handleKeyType: keysym = %d (%s)\n", keysym, buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!keyboard.composeState ||
|
if (!keyboard.composeState ||
|
||||||
(xkb.compose_state_feed(keyboard.composeState, keysym) == XKB_COMPOSE_FEED_IGNORED)) {
|
(xkb_compose_state_feed(keyboard.composeState, keysym) == XKB_COMPOSE_FEED_IGNORED)) {
|
||||||
handleKeyTypeNoCompose(serial, timestamp, xkbKeycode);
|
handleKeyTypeNoCompose(serial, timestamp, xkbKeycode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (xkb.compose_state_get_status(keyboard.composeState)) {
|
switch (xkb_compose_state_get_status(keyboard.composeState)) {
|
||||||
case XKB_COMPOSE_NOTHING:
|
case XKB_COMPOSE_NOTHING:
|
||||||
xkb.compose_state_reset(keyboard.composeState);
|
xkb_compose_state_reset(keyboard.composeState);
|
||||||
handleKeyTypeNoCompose(serial, timestamp, xkbKeycode);
|
handleKeyTypeNoCompose(serial, timestamp, xkbKeycode);
|
||||||
break;
|
break;
|
||||||
case XKB_COMPOSE_COMPOSING:
|
case XKB_COMPOSE_COMPOSING:
|
||||||
break;
|
break;
|
||||||
case XKB_COMPOSE_COMPOSED: {
|
case XKB_COMPOSE_COMPOSED: {
|
||||||
char buf[MAX_COMPOSE_UTF8_LENGTH];
|
char buf[MAX_COMPOSE_UTF8_LENGTH];
|
||||||
xkb.compose_state_get_utf8(keyboard.composeState, buf, sizeof buf);
|
xkb_compose_state_get_utf8(keyboard.composeState, buf, sizeof buf);
|
||||||
postKeyTypedEvents(serial, timestamp, buf);
|
postKeyTypedEvents(serial, timestamp, buf);
|
||||||
xkb.compose_state_reset(keyboard.composeState);
|
xkb_compose_state_reset(keyboard.composeState);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XKB_COMPOSE_CANCELLED:
|
case XKB_COMPOSE_CANCELLED:
|
||||||
xkb.compose_state_reset(keyboard.composeState);
|
xkb_compose_state_reset(keyboard.composeState);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1370,8 +873,8 @@ handleKey(long serial, long timestamp, uint32_t keycode, bool isPressed, bool is
|
|||||||
JNIEnv *env = getEnv();
|
JNIEnv *env = getEnv();
|
||||||
|
|
||||||
xkb_keycode_t xkbKeycode = keycode + 8;
|
xkb_keycode_t xkbKeycode = keycode + 8;
|
||||||
bool keyRepeats = xkb.keymap_key_repeats(keyboard.keymap, xkbKeycode);
|
bool keyRepeats = xkb_keymap_key_repeats(keyboard.keymap, xkbKeycode);
|
||||||
xkb_mod_mask_t consumedModifiers = xkb.state_key_get_consumed_mods2(keyboard.state, xkbKeycode, XKB_CONSUMED_MODE_GTK);
|
xkb_mod_mask_t consumedModifiers = xkb_state_key_get_consumed_mods2(keyboard.state, xkbKeycode, XKB_CONSUMED_MODE_GTK);
|
||||||
xkb_keysym_t actualKeysym = translateKeycodeToKeysym(keycode, TRANSLATE_USING_ACTIVE_STATE);
|
xkb_keysym_t actualKeysym = translateKeycodeToKeysym(keycode, TRANSLATE_USING_ACTIVE_STATE);
|
||||||
xkb_keysym_t noModsKeysym = translateKeycodeToKeysym(keycode, TRANSLATE_USING_ACTIVE_LAYOUT);
|
xkb_keysym_t noModsKeysym = translateKeycodeToKeysym(keycode, TRANSLATE_USING_ACTIVE_LAYOUT);
|
||||||
xkb_keysym_t qwertyKeysym = translateKeycodeToKeysym(keycode, TRANSLATE_USING_QWERTY);
|
xkb_keysym_t qwertyKeysym = translateKeycodeToKeysym(keycode, TRANSLATE_USING_QWERTY);
|
||||||
@@ -1386,11 +889,11 @@ handleKey(long serial, long timestamp, uint32_t keycode, bool isPressed, bool is
|
|||||||
|
|
||||||
#ifdef WL_KEYBOARD_DEBUG
|
#ifdef WL_KEYBOARD_DEBUG
|
||||||
char buf[256];
|
char buf[256];
|
||||||
xkb.keysym_get_name(actualKeysym, buf, sizeof buf);
|
xkb_keysym_get_name(actualKeysym, buf, sizeof buf);
|
||||||
fprintf(stderr, "handleKey: actualKeysym = %d (%s)\n", actualKeysym, buf);
|
fprintf(stderr, "handleKey: actualKeysym = %d (%s)\n", actualKeysym, buf);
|
||||||
xkb.keysym_get_name(noModsKeysym, buf, sizeof buf);
|
xkb_keysym_get_name(noModsKeysym, buf, sizeof buf);
|
||||||
fprintf(stderr, "handleKey: noModsKeysym = %d (%s)\n", noModsKeysym, buf);
|
fprintf(stderr, "handleKey: noModsKeysym = %d (%s)\n", noModsKeysym, buf);
|
||||||
xkb.keysym_get_name(qwertyKeysym, buf, sizeof buf);
|
xkb_keysym_get_name(qwertyKeysym, buf, sizeof buf);
|
||||||
fprintf(stderr, "handleKey: qwertyKeysym = %d (%s)\n", qwertyKeysym, buf);
|
fprintf(stderr, "handleKey: qwertyKeysym = %d (%s)\n", qwertyKeysym, buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1486,39 +989,34 @@ handleKey(long serial, long timestamp, uint32_t keycode, bool isPressed, bool is
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
freeXKB(void) {
|
freeXKB(void) {
|
||||||
xkb.compose_state_unref(keyboard.composeState);
|
xkb_compose_state_unref(keyboard.composeState);
|
||||||
keyboard.composeState = NULL;
|
keyboard.composeState = NULL;
|
||||||
|
|
||||||
xkb.compose_table_unref(keyboard.composeTable);
|
xkb_compose_table_unref(keyboard.composeTable);
|
||||||
keyboard.composeTable = NULL;
|
keyboard.composeTable = NULL;
|
||||||
|
|
||||||
xkb.state_unref(keyboard.tmpQwertyState);
|
xkb_state_unref(keyboard.tmpQwertyState);
|
||||||
keyboard.tmpQwertyState = NULL;
|
keyboard.tmpQwertyState = NULL;
|
||||||
|
|
||||||
xkb.keymap_unref(keyboard.qwertyKeymap);
|
xkb_keymap_unref(keyboard.qwertyKeymap);
|
||||||
keyboard.qwertyKeymap = NULL;
|
keyboard.qwertyKeymap = NULL;
|
||||||
|
|
||||||
xkb.state_unref(keyboard.tmpState);
|
xkb_state_unref(keyboard.tmpState);
|
||||||
keyboard.tmpState = NULL;
|
keyboard.tmpState = NULL;
|
||||||
|
|
||||||
xkb.state_unref(keyboard.state);
|
xkb_state_unref(keyboard.state);
|
||||||
keyboard.state = NULL;
|
keyboard.state = NULL;
|
||||||
|
|
||||||
xkb.keymap_unref(keyboard.keymap);
|
xkb_keymap_unref(keyboard.keymap);
|
||||||
keyboard.keymap = NULL;
|
keyboard.keymap = NULL;
|
||||||
|
|
||||||
xkb.context_unref(keyboard.context);
|
xkb_context_unref(keyboard.context);
|
||||||
keyboard.context = NULL;
|
keyboard.context = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
initXKB(JNIEnv *env) {
|
initXKB(JNIEnv *env) {
|
||||||
if (!xkbcommonLoad(env)) {
|
keyboard.context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||||
// xkbcommonLoad has thrown
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
keyboard.context = xkb.context_new(XKB_CONTEXT_NO_FLAGS);
|
|
||||||
|
|
||||||
if (!keyboard.context) {
|
if (!keyboard.context) {
|
||||||
JNU_ThrowInternalError(env, "Failed to create an XKB context");
|
JNU_ThrowInternalError(env, "Failed to create an XKB context");
|
||||||
@@ -1533,24 +1031,24 @@ initXKB(JNIEnv *env) {
|
|||||||
.options = ""
|
.options = ""
|
||||||
};
|
};
|
||||||
|
|
||||||
keyboard.qwertyKeymap = xkb.keymap_new_from_names(keyboard.context, &qwertyRuleNames, 0);
|
keyboard.qwertyKeymap = xkb_keymap_new_from_names(keyboard.context, &qwertyRuleNames, 0);
|
||||||
if (!keyboard.qwertyKeymap) {
|
if (!keyboard.qwertyKeymap) {
|
||||||
freeXKB();
|
freeXKB();
|
||||||
JNU_ThrowInternalError(getEnv(), "Failed to create XKB layout 'us'");
|
JNU_ThrowInternalError(getEnv(), "Failed to create XKB layout 'us'");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
keyboard.tmpQwertyState = xkb.state_new(keyboard.qwertyKeymap);
|
keyboard.tmpQwertyState = xkb_state_new(keyboard.qwertyKeymap);
|
||||||
if (!keyboard.tmpQwertyState) {
|
if (!keyboard.tmpQwertyState) {
|
||||||
freeXKB();
|
freeXKB();
|
||||||
JNU_ThrowInternalError(getEnv(), "Failed to create XKB state");
|
JNU_ThrowInternalError(getEnv(), "Failed to create XKB state");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
keyboard.composeTable = xkb.compose_table_new_from_locale(keyboard.context, getComposeLocale(),
|
keyboard.composeTable = xkb_compose_table_new_from_locale(keyboard.context, getComposeLocale(),
|
||||||
XKB_COMPOSE_COMPILE_NO_FLAGS);
|
XKB_COMPOSE_COMPILE_NO_FLAGS);
|
||||||
if (keyboard.composeTable) {
|
if (keyboard.composeTable) {
|
||||||
keyboard.composeState = xkb.compose_state_new(keyboard.composeTable, XKB_COMPOSE_STATE_NO_FLAGS);
|
keyboard.composeState = xkb_compose_state_new(keyboard.composeTable, XKB_COMPOSE_STATE_NO_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1599,7 +1097,7 @@ Java_sun_awt_wl_WLKeyboard_handleKeyRepeat(JNIEnv *env, jobject instance, jlong
|
|||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_sun_awt_wl_WLKeyboard_cancelCompose(JNIEnv *env, jobject instance) {
|
Java_sun_awt_wl_WLKeyboard_cancelCompose(JNIEnv *env, jobject instance) {
|
||||||
if (keyboard.composeState) {
|
if (keyboard.composeState) {
|
||||||
xkb.compose_state_reset(keyboard.composeState);
|
xkb_compose_state_reset(keyboard.composeState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1625,7 +1123,7 @@ wlHandleKeyboardLeave(void) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
wlSetKeymap(const char *serializedKeymap) {
|
wlSetKeymap(const char *serializedKeymap) {
|
||||||
struct xkb_keymap *newKeymap = xkb.keymap_new_from_string(
|
struct xkb_keymap *newKeymap = xkb_keymap_new_from_string(
|
||||||
keyboard.context, serializedKeymap, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
|
keyboard.context, serializedKeymap, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
|
||||||
|
|
||||||
if (!newKeymap) {
|
if (!newKeymap) {
|
||||||
@@ -1633,16 +1131,16 @@ wlSetKeymap(const char *serializedKeymap) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct xkb_state *newState = xkb.state_new(newKeymap);
|
struct xkb_state *newState = xkb_state_new(newKeymap);
|
||||||
struct xkb_state *newTmpState = xkb.state_new(newKeymap);
|
struct xkb_state *newTmpState = xkb_state_new(newKeymap);
|
||||||
if (!newState || !newTmpState) {
|
if (!newState || !newTmpState) {
|
||||||
JNU_ThrowInternalError(getEnv(), "Failed to create XKB state");
|
JNU_ThrowInternalError(getEnv(), "Failed to create XKB state");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
xkb.keymap_unref(keyboard.keymap);
|
xkb_keymap_unref(keyboard.keymap);
|
||||||
xkb.state_unref(keyboard.state);
|
xkb_state_unref(keyboard.state);
|
||||||
xkb.state_unref(keyboard.tmpState);
|
xkb_state_unref(keyboard.tmpState);
|
||||||
|
|
||||||
keyboard.state = newState;
|
keyboard.state = newState;
|
||||||
keyboard.tmpState = newTmpState;
|
keyboard.tmpState = newTmpState;
|
||||||
@@ -1667,7 +1165,7 @@ void
|
|||||||
wlSetModifiers(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group) {
|
wlSetModifiers(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group) {
|
||||||
xkb_layout_index_t oldLayoutIndex = getKeyboardLayoutIndex();
|
xkb_layout_index_t oldLayoutIndex = getKeyboardLayoutIndex();
|
||||||
|
|
||||||
xkb.state_update_mask(keyboard.state, depressed, latched, locked, 0, 0, group);
|
xkb_state_update_mask(keyboard.state, depressed, latched, locked, 0, 0, group);
|
||||||
|
|
||||||
if (group != oldLayoutIndex) {
|
if (group != oldLayoutIndex) {
|
||||||
onKeyboardLayoutChanged();
|
onKeyboardLayoutChanged();
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "relative-pointer-unstable-v1.h"
|
#include "relative-pointer-unstable-v1.h"
|
||||||
|
#include "xdg-decoration-unstable-v1.h"
|
||||||
#ifdef HEADLESS
|
#ifdef HEADLESS
|
||||||
#error This file should not be included in headless library
|
#error This file should not be included in headless library
|
||||||
#endif
|
#endif
|
||||||
@@ -82,6 +83,7 @@ struct gtk_shell1* gtk_shell1 = NULL;
|
|||||||
struct wl_keyboard *wl_keyboard; // optional, check for NULL before use
|
struct wl_keyboard *wl_keyboard; // optional, check for NULL before use
|
||||||
struct wl_pointer *wl_pointer; // optional, check for NULL before use
|
struct wl_pointer *wl_pointer; // optional, check for NULL before use
|
||||||
struct zwp_relative_pointer_manager_v1* relative_pointer_manager; // optional, check for NULL before use
|
struct zwp_relative_pointer_manager_v1* relative_pointer_manager; // optional, check for NULL before use
|
||||||
|
struct zxdg_decoration_manager_v1* xdg_decoration_manager; // optional, check for NULL before use
|
||||||
|
|
||||||
#define MAX_CURSOR_SCALE 100
|
#define MAX_CURSOR_SCALE 100
|
||||||
struct wl_cursor_theme *cursor_themes[MAX_CURSOR_SCALE] = {NULL};
|
struct wl_cursor_theme *cursor_themes[MAX_CURSOR_SCALE] = {NULL};
|
||||||
@@ -91,8 +93,10 @@ struct zwp_primary_selection_device_manager_v1 *zwp_selection_dm = NULL; // opti
|
|||||||
struct zxdg_output_manager_v1 *zxdg_output_manager_v1 = NULL; // optional, check for NULL before use
|
struct zxdg_output_manager_v1 *zxdg_output_manager_v1 = NULL; // optional, check for NULL before use
|
||||||
|
|
||||||
struct zwp_text_input_manager_v3 *zwp_text_input_manager = NULL; // optional, check for NULL before use
|
struct zwp_text_input_manager_v3 *zwp_text_input_manager = NULL; // optional, check for NULL before use
|
||||||
|
struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager; // optional, check for NULL before use
|
||||||
|
|
||||||
static uint32_t num_of_outstanding_sync = 0;
|
static uint32_t num_of_outstanding_sync = 0;
|
||||||
|
static bool waiting_for_xdg_toplevel_icon_manager_done = false;
|
||||||
|
|
||||||
// This group of definitions corresponds to declarations from awt.h
|
// This group of definitions corresponds to declarations from awt.h
|
||||||
jclass tkClass = NULL;
|
jclass tkClass = NULL;
|
||||||
@@ -133,6 +137,7 @@ static jmethodID dispatchKeyboardModifiersEventMID;
|
|||||||
static jmethodID dispatchKeyboardEnterEventMID;
|
static jmethodID dispatchKeyboardEnterEventMID;
|
||||||
static jmethodID dispatchKeyboardLeaveEventMID;
|
static jmethodID dispatchKeyboardLeaveEventMID;
|
||||||
static jmethodID dispatchRelativePointerEventMID;
|
static jmethodID dispatchRelativePointerEventMID;
|
||||||
|
static jmethodID handleToplevelIconSizeMID;
|
||||||
|
|
||||||
JNIEnv *getEnv() {
|
JNIEnv *getEnv() {
|
||||||
JNIEnv *env;
|
JNIEnv *env;
|
||||||
@@ -568,6 +573,36 @@ static const struct wl_seat_listener wl_seat_listener = {
|
|||||||
.name = wl_seat_name
|
.name = wl_seat_name
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
xdg_toplevel_icon_manager_icon_size(void *data,
|
||||||
|
struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1,
|
||||||
|
int32_t size)
|
||||||
|
{
|
||||||
|
(void)data;
|
||||||
|
(void)xdg_toplevel_icon_manager_v1;
|
||||||
|
JNIEnv* env = getEnv();
|
||||||
|
if (env == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*env)->CallStaticVoidMethod(env, tkClass, handleToplevelIconSizeMID, size);
|
||||||
|
JNU_CHECK_EXCEPTION(env);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xdg_toplevel_icon_manager_icon_size_done(void *data,
|
||||||
|
struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1)
|
||||||
|
{
|
||||||
|
(void)data;
|
||||||
|
(void)xdg_toplevel_icon_manager_v1;
|
||||||
|
waiting_for_xdg_toplevel_icon_manager_done = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct xdg_toplevel_icon_manager_v1_listener xdg_toplevel_icon_manager_v1_listener = {
|
||||||
|
.icon_size = xdg_toplevel_icon_manager_icon_size,
|
||||||
|
.done = xdg_toplevel_icon_manager_icon_size_done,
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
registry_global(void *data, struct wl_registry *wl_registry,
|
registry_global(void *data, struct wl_registry *wl_registry,
|
||||||
uint32_t name, const char *interface, uint32_t version)
|
uint32_t name, const char *interface, uint32_t version)
|
||||||
@@ -632,6 +667,14 @@ registry_global(void *data, struct wl_registry *wl_registry,
|
|||||||
if (versionToBind <= version) {
|
if (versionToBind <= version) {
|
||||||
zwp_text_input_manager = wl_registry_bind(wl_registry, name, &zwp_text_input_manager_v3_interface, versionToBind);
|
zwp_text_input_manager = wl_registry_bind(wl_registry, name, &zwp_text_input_manager_v3_interface, versionToBind);
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(interface, zxdg_decoration_manager_v1_interface.name) == 0) {
|
||||||
|
xdg_decoration_manager = wl_registry_bind(wl_registry, name, &zxdg_decoration_manager_v1_interface, 1);
|
||||||
|
} else if (strcmp(interface, xdg_toplevel_icon_manager_v1_interface.name) == 0) {
|
||||||
|
xdg_toplevel_icon_manager = wl_registry_bind(wl_registry, name, &xdg_toplevel_icon_manager_v1_interface, 1);
|
||||||
|
if (xdg_toplevel_icon_manager != NULL) {
|
||||||
|
waiting_for_xdg_toplevel_icon_manager_done = true;
|
||||||
|
xdg_toplevel_icon_manager_v1_add_listener(xdg_toplevel_icon_manager, &xdg_toplevel_icon_manager_v1_listener, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WAKEFIELD_ROBOT
|
#ifdef WAKEFIELD_ROBOT
|
||||||
@@ -706,6 +749,11 @@ initJavaRefs(JNIEnv *env, jclass clazz)
|
|||||||
"(Lsun/awt/wl/WLPointerEvent;)V"),
|
"(Lsun/awt/wl/WLPointerEvent;)V"),
|
||||||
JNI_FALSE);
|
JNI_FALSE);
|
||||||
|
|
||||||
|
CHECK_NULL_RETURN(handleToplevelIconSizeMID = (*env)->GetStaticMethodID(env, tkClass,
|
||||||
|
"handleToplevelIconSize",
|
||||||
|
"(I)V"),
|
||||||
|
JNI_FALSE);
|
||||||
|
|
||||||
CHECK_NULL_RETURN(pointerEventClass = (*env)->FindClass(env,
|
CHECK_NULL_RETURN(pointerEventClass = (*env)->FindClass(env,
|
||||||
"sun/awt/wl/WLPointerEvent"),
|
"sun/awt/wl/WLPointerEvent"),
|
||||||
JNI_FALSE);
|
JNI_FALSE);
|
||||||
@@ -840,7 +888,7 @@ getCursorTheme(int scale) {
|
|||||||
static void
|
static void
|
||||||
finalizeInit(JNIEnv *env) {
|
finalizeInit(JNIEnv *env) {
|
||||||
// NB: we are NOT on EDT here so shouldn't dispatch EDT-sensitive stuff
|
// NB: we are NOT on EDT here so shouldn't dispatch EDT-sensitive stuff
|
||||||
while (num_of_outstanding_sync > 0) {
|
while (num_of_outstanding_sync > 0 || waiting_for_xdg_toplevel_icon_manager_done) {
|
||||||
// There are outstanding events that carry information essential for the toolkit
|
// There are outstanding events that carry information essential for the toolkit
|
||||||
// to be fully operational, such as, for example, the number of outputs.
|
// to be fully operational, such as, for example, the number of outputs.
|
||||||
// Those events were subscribed to when handling globals in registry_global().
|
// Those events were subscribed to when handling globals in registry_global().
|
||||||
@@ -904,6 +952,13 @@ Java_sun_awt_wl_WLToolkit_initIDs(JNIEnv *env, jclass clazz, jlong displayPtr)
|
|||||||
checkInterfacesPresent(env);
|
checkInterfacesPresent(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jboolean JNICALL
|
||||||
|
Java_sun_awt_wl_WLToolkit_isSSDAvailableImpl
|
||||||
|
(JNIEnv *env, jobject cls)
|
||||||
|
{
|
||||||
|
return xdg_decoration_manager != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_sun_awt_wl_WLToolkit_dispatchEventsOnEDT
|
Java_sun_awt_wl_WLToolkit_dispatchEventsOnEDT
|
||||||
(JNIEnv *env, jobject obj)
|
(JNIEnv *env, jobject obj)
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
#include "viewporter.h"
|
#include "viewporter.h"
|
||||||
#include "relative-pointer-unstable-v1.h"
|
#include "relative-pointer-unstable-v1.h"
|
||||||
#include "text-input-unstable-v3.h"
|
#include "text-input-unstable-v3.h"
|
||||||
|
#include "xdg-decoration-unstable-v1.h"
|
||||||
|
#include "xdg-toplevel-icon-v1.h"
|
||||||
#include "jvm_md.h"
|
#include "jvm_md.h"
|
||||||
#include "jni_util.h"
|
#include "jni_util.h"
|
||||||
|
|
||||||
@@ -70,6 +72,8 @@ extern struct zwp_primary_selection_device_manager_v1 *zwp_selection_dm; // opti
|
|||||||
extern struct zxdg_output_manager_v1 *zxdg_output_manager_v1; // optional, check for NULL before use
|
extern struct zxdg_output_manager_v1 *zxdg_output_manager_v1; // optional, check for NULL before use
|
||||||
extern struct zwp_relative_pointer_manager_v1* relative_pointer_manager;
|
extern struct zwp_relative_pointer_manager_v1* relative_pointer_manager;
|
||||||
extern struct zwp_text_input_manager_v3 *zwp_text_input_manager; // optional, check for NULL before use
|
extern struct zwp_text_input_manager_v3 *zwp_text_input_manager; // optional, check for NULL before use
|
||||||
|
extern struct zxdg_decoration_manager_v1* xdg_decoration_manager; // optional, check for NULL before use
|
||||||
|
extern struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager; // optional, check for NULL before use
|
||||||
|
|
||||||
JNIEnv *getEnv();
|
JNIEnv *getEnv();
|
||||||
|
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded005
|
|||||||
vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java initial_run windows-all
|
vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java initial_run windows-all
|
||||||
|
|
||||||
vmTestbase/nsk/jdi/Event/_itself_/event001/TestDescription.java JBR-8550 windows-all
|
vmTestbase/nsk/jdi/Event/_itself_/event001/TestDescription.java JBR-8550 windows-all
|
||||||
|
vmTestbase/nsk/jdi/Event/_itself_/event002/TestDescription.java JBR-8550 windows-all
|
||||||
vmTestbase/nsk/jdi/LaunchingConnector/launch/launch001/TestDescription.java initial_run windows-all
|
vmTestbase/nsk/jdi/LaunchingConnector/launch/launch001/TestDescription.java initial_run windows-all
|
||||||
vmTestbase/nsk/jdi/LaunchingConnector/launch/launch003/TestDescription.java initial_run windows-all
|
vmTestbase/nsk/jdi/LaunchingConnector/launch/launch003/TestDescription.java initial_run windows-all
|
||||||
vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDescription.java initial_run windows-all
|
vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDescription.java initial_run windows-all
|
||||||
@@ -339,8 +340,7 @@ vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi001/Multi001.java J
|
|||||||
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002/TestDescription.java JBR-8927,JBR-8545 windows-all
|
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002/TestDescription.java JBR-8927,JBR-8545 windows-all
|
||||||
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003/TestDescription.java JBR-8927,JBR-8545 windows-all
|
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003/TestDescription.java JBR-8927,JBR-8545 windows-all
|
||||||
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi004/TestDescription.java JBR-8927 windows-all
|
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi004/TestDescription.java JBR-8927 windows-all
|
||||||
mTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java JBR-8927,JBR-8545 windows-all
|
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java JBR-8927,JBR-8545 windows-all
|
||||||
|
|
||||||
vmTestbase/nsk/monitoring/ThreadMXBean/findMonitorDeadlockedThreads/find006/TestDescription.java 8310144 macosx-aarch64
|
vmTestbase/nsk/monitoring/ThreadMXBean/findMonitorDeadlockedThreads/find006/TestDescription.java 8310144 macosx-aarch64
|
||||||
|
|
||||||
### initial_runs
|
### initial_runs
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generi
|
|||||||
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
|
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
|
||||||
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
|
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
|
||||||
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
|
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
|
||||||
|
java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java 8296972 macosx-all
|
||||||
java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java 8340374 macosx-all
|
java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java 8340374 macosx-all
|
||||||
java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all
|
java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all
|
||||||
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
|
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
|
||||||
|
|||||||
@@ -836,27 +836,18 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/Component/ComponentEventTest.java \
|
-java/awt/Component/ComponentEventTest.java \
|
||||||
-java/awt/Component/CompEventOnHiddenComponent \
|
-java/awt/Component/CompEventOnHiddenComponent \
|
||||||
-java/awt/Component/ComponentRedrawnTest.java \
|
-java/awt/Component/ComponentRedrawnTest.java \
|
||||||
-java/awt/Component/CreateImage \
|
|
||||||
-java/awt/Component/DimensionEncapsulation \
|
-java/awt/Component/DimensionEncapsulation \
|
||||||
-java/awt/Component/F10TopToplevel \
|
-java/awt/Component/F10TopToplevel \
|
||||||
-java/awt/Component/GetListenersTest.java \
|
-java/awt/Component/GetListenersTest.java \
|
||||||
-java/awt/Component/GetScreenLocTest \
|
-java/awt/Component/GetScreenLocTest/GetScreenLocTest.java \
|
||||||
-java/awt/Component/InsetsEncapsulation \
|
-java/awt/Component/InsetsEncapsulation \
|
||||||
-java/awt/Component/isLightweightCrash \
|
|
||||||
-java/awt/Component/NativeInLightShow \
|
-java/awt/Component/NativeInLightShow \
|
||||||
-java/awt/Component/NoUpdateUponShow \
|
|
||||||
-java/awt/Component/PaintAll \
|
-java/awt/Component/PaintAll \
|
||||||
-java/awt/Component/PrintAllXcheckJNI \
|
-java/awt/Component/PrintAllXcheckJNI \
|
||||||
-java/awt/Component/RepaintTest.java \
|
-java/awt/Component/RepaintTest.java \
|
||||||
-java/awt/Component/Revalidate \
|
|
||||||
-java/awt/Component/SetComponentsBounds \
|
|
||||||
-java/awt/Component/SetEnabledPerformance \
|
-java/awt/Component/SetEnabledPerformance \
|
||||||
-java/awt/Component/TreeLockDeadlock \
|
|
||||||
-java/awt/Component/UpdatingBootTime.java \
|
|
||||||
-java/awt/Component/Validate \
|
|
||||||
-java/awt/ComponentOrientation \
|
-java/awt/ComponentOrientation \
|
||||||
-java/awt/Container \
|
-java/awt/Container \
|
||||||
-java/awt/Cursor \
|
|
||||||
-java/awt/datatransfer/Clipboard/GetContentsInterruptedTest.java \
|
-java/awt/datatransfer/Clipboard/GetContentsInterruptedTest.java \
|
||||||
-java/awt/datatransfer/ClipboardInterVMTest/ClipboardInterVMTest.java \
|
-java/awt/datatransfer/ClipboardInterVMTest/ClipboardInterVMTest.java \
|
||||||
-java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java \
|
-java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java \
|
||||||
@@ -874,8 +865,70 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/Debug \
|
-java/awt/Debug \
|
||||||
-java/awt/Dialog \
|
-java/awt/Dialog \
|
||||||
-java/awt/dnd \
|
-java/awt/dnd \
|
||||||
-java/awt/EmbeddedFrame \
|
-java/awt/event/ClickEventsTest.java \
|
||||||
-java/awt/event \
|
-java/awt/event/ComponentEvent/ComponentItemEventTest.java \
|
||||||
|
-java/awt/event/ComponentEvent/ListItemEventsTest.java \
|
||||||
|
-java/awt/event/ComponentEvent/MovedResizedTardyEventTest/MovedResizedTardyEventTest.java \
|
||||||
|
-java/awt/event/ComponentEvent/MovedResizedTwiceTest/MovedResizedTwiceTest.java \
|
||||||
|
-java/awt/event/ComponentEvent/TextComponentTextEventTest.java \
|
||||||
|
-java/awt/event/HierarchyEvent/AncestorResized/AncestorResized.java \
|
||||||
|
-java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java \
|
||||||
|
-java/awt/event/InputEvent/InputEventTimeTest.java \
|
||||||
|
-java/awt/event/InputEvent/MouseModsTest.java \
|
||||||
|
-java/awt/event/KeyEvent/AltCharAcceleratorTest/AltCharAcceleratorTest.java \
|
||||||
|
-java/awt/event/KeyEvent/AltGraphModifier.java \
|
||||||
|
-java/awt/event/KeyEvent/CorrectTime/CorrectTime.java \
|
||||||
|
-java/awt/event/KeyEvent/DeadKey/DeadKeySystemAssertionDialog.java \
|
||||||
|
-java/awt/event/KeyEvent/DisabledTargetF10/DisabledTargetF10.java \
|
||||||
|
-java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java \
|
||||||
|
-java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java \
|
||||||
|
-java/awt/event/KeyEvent/FunctionKeyTest.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyDownCaptureTest.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyChar/KeyCharTest.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyEventLocationTest.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyEventToLightweight.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyPressedModifiers.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyTyped/CancelKeyTyped.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyTyped/CtrlSpace.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyTyped/DeleteKeyTyped.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyTyped/EscapeKeyTyped.java \
|
||||||
|
-java/awt/event/KeyEvent/KeyTyped/Numpad1KeyTyped.java \
|
||||||
|
-java/awt/event/KeyEvent/RobotCrash/RobotCrash.java \
|
||||||
|
-java/awt/event/KeyEvent/ShiftF10Test.java \
|
||||||
|
-java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java \
|
||||||
|
-java/awt/event/KeyEvent/TestDoubleKeyEvent.java \
|
||||||
|
-java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java \
|
||||||
|
-java/awt/event/MouseEvent/ClickDuringKeypress/ClickDuringKeypress.java \
|
||||||
|
-java/awt/event/MouseEvent/DisabledComponents/DisabledComponentsTest.java \
|
||||||
|
-java/awt/event/MouseEvent/DragMouseEventTest.java \
|
||||||
|
-java/awt/event/MouseEvent/DragToLightweightTest.java \
|
||||||
|
-java/awt/event/MouseEvent/EnterAsGrabbedEvent/EnterAsGrabbedEvent.java \
|
||||||
|
-java/awt/event/MouseEvent/EventTimeInFuture/EventTimeInFuture.java \
|
||||||
|
-java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseButtonsAndKeyMasksTest/MouseButtonsAndKeyMasksTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseButtonsTest/MouseButtonsTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseEnterExitTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseEnterTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseEventsDuringDrag.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseModifierTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MouseRButTest.java \
|
||||||
|
-java/awt/event/MouseEvent/MultipleMouseButtonsTest/MultipleMouseButtonsTest.java \
|
||||||
|
-java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java \
|
||||||
|
-java/awt/event/MouseEvent/SmoothWheel/SmoothWheel.java \
|
||||||
|
-java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter.java \
|
||||||
|
-java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_1.java \
|
||||||
|
-java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_2.java \
|
||||||
|
-java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter_3.java \
|
||||||
|
-java/awt/event/MouseWheelEvent \
|
||||||
|
-java/awt/event/OtherEvents/ContainerEventChildTest.java \
|
||||||
|
-java/awt/event/SequencedEvent/MultipleContextsFunctionalTest.java \
|
||||||
|
-java/awt/event/StressTest/MouseAndKeyEventStressTest.java \
|
||||||
|
-java/awt/event/TextEvent \
|
||||||
|
-java/awt/event/WindowActivatedEventTest.java \
|
||||||
-java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java \
|
-java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java \
|
||||||
-java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java \
|
-java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java \
|
||||||
-java/awt/EventQueue/6980209/bug6980209.java \
|
-java/awt/EventQueue/6980209/bug6980209.java \
|
||||||
@@ -928,6 +981,7 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/Focus/KeyEventForBadFocusOwnerTest \
|
-java/awt/Focus/KeyEventForBadFocusOwnerTest \
|
||||||
-java/awt/Focus/LabelScrollBarFocus.java \
|
-java/awt/Focus/LabelScrollBarFocus.java \
|
||||||
-java/awt/MenuShortcut/ActionCommandTest.java \
|
-java/awt/MenuShortcut/ActionCommandTest.java \
|
||||||
|
-java/awt/MenuShortcut/FunctionKeyShortcut.java \
|
||||||
-java/awt/Focus/ModalBlockedStealsFocusTest \
|
-java/awt/Focus/ModalBlockedStealsFocusTest \
|
||||||
-java/awt/Focus/ModalDialogActivationTest \
|
-java/awt/Focus/ModalDialogActivationTest \
|
||||||
-java/awt/Focus/ModalDialogInFocusEventTest.java \
|
-java/awt/Focus/ModalDialogInFocusEventTest.java \
|
||||||
@@ -999,8 +1053,6 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java \
|
-java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java \
|
||||||
-java/awt/GridBagLayout \
|
-java/awt/GridBagLayout \
|
||||||
-java/awt/GridLayout \
|
-java/awt/GridLayout \
|
||||||
-java/awt/hidpi \
|
|
||||||
-java/awt/Icon \
|
|
||||||
-java/awt/im \
|
-java/awt/im \
|
||||||
-java/awt/image/BufferStrategy/ExceptionAfterComponentDispose.java \
|
-java/awt/image/BufferStrategy/ExceptionAfterComponentDispose.java \
|
||||||
-java/awt/image/MemoryLeakTest/MemoryLeakTest.java \
|
-java/awt/image/MemoryLeakTest/MemoryLeakTest.java \
|
||||||
@@ -1015,7 +1067,7 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/Insets/RemoveMenuBarTest.java \
|
-java/awt/Insets/RemoveMenuBarTest.java \
|
||||||
-java/awt/InputMethods \
|
-java/awt/InputMethods \
|
||||||
-java/awt/JAWT \
|
-java/awt/JAWT \
|
||||||
-java/awt/keyboard \
|
-java/awt/keyboard/8218917/AltKeyBug.java \
|
||||||
-java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest \
|
-java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest \
|
||||||
-java/awt/KeyboardFocusmanager/TypeAhead \
|
-java/awt/KeyboardFocusmanager/TypeAhead \
|
||||||
-java/awt/Label \
|
-java/awt/Label \
|
||||||
@@ -1031,7 +1083,6 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/Mouse \
|
-java/awt/Mouse \
|
||||||
-java/awt/MouseAdapter \
|
-java/awt/MouseAdapter \
|
||||||
-java/awt/MouseInfo \
|
-java/awt/MouseInfo \
|
||||||
-java/awt/MultipleGradientPaint \
|
|
||||||
-java/awt/Multiscreen/MouseEventTest/MouseEventTest.java \
|
-java/awt/Multiscreen/MouseEventTest/MouseEventTest.java \
|
||||||
-java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java \
|
-java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java \
|
||||||
-java/awt/Multiscreen/MultiScreenCheckScreenIDTest.java \
|
-java/awt/Multiscreen/MultiScreenCheckScreenIDTest.java \
|
||||||
@@ -1045,7 +1096,6 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/Paint/ListRepaint.java \
|
-java/awt/Paint/ListRepaint.java \
|
||||||
-java/awt/Paint/PaintNativeOnUpdate.java \
|
-java/awt/Paint/PaintNativeOnUpdate.java \
|
||||||
-java/awt/Paint/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java \
|
-java/awt/Paint/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java \
|
||||||
-java/awt/Panel \
|
|
||||||
-java/awt/PopupMenu \
|
-java/awt/PopupMenu \
|
||||||
-java/awt/print \
|
-java/awt/print \
|
||||||
-java/awt/PrintJob \
|
-java/awt/PrintJob \
|
||||||
@@ -1068,7 +1118,6 @@ jdk_awt_wayland = \
|
|||||||
-java/awt/TrayIcon \
|
-java/awt/TrayIcon \
|
||||||
-java/awt/wakefield \
|
-java/awt/wakefield \
|
||||||
-java/awt/Window \
|
-java/awt/Window \
|
||||||
-java/awt/WMSpecificTests \
|
|
||||||
-java/awt/xembed
|
-java/awt/xembed
|
||||||
|
|
||||||
jdk_swing_wayland= \
|
jdk_swing_wayland= \
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import java.awt.event.WindowStateListener;
|
|||||||
|
|
||||||
public class MaximizedToIconified
|
public class MaximizedToIconified
|
||||||
{
|
{
|
||||||
static volatile int lastFrameState;
|
static volatile int lastFrameState = Frame.NORMAL;
|
||||||
static volatile boolean failed = false;
|
static volatile boolean failed = false;
|
||||||
static volatile Toolkit myKit;
|
static volatile Toolkit myKit;
|
||||||
private static Robot robot;
|
private static Robot robot;
|
||||||
@@ -77,8 +77,6 @@ public class MaximizedToIconified
|
|||||||
frame.setSize(200, 200);
|
frame.setSize(200, 200);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
lastFrameState = Frame.NORMAL;
|
|
||||||
|
|
||||||
robot.waitForIdle();
|
robot.waitForIdle();
|
||||||
|
|
||||||
frame.addWindowStateListener(new WindowStateListener() {
|
frame.addWindowStateListener(new WindowStateListener() {
|
||||||
@@ -116,12 +114,7 @@ public class MaximizedToIconified
|
|||||||
// because Toolkit.isFrameStateSupported() method reports these states
|
// because Toolkit.isFrameStateSupported() method reports these states
|
||||||
// as not supported. And such states will simply be skipped.
|
// as not supported. And such states will simply be skipped.
|
||||||
examineStates(new int[] {Frame.MAXIMIZED_BOTH, Frame.ICONIFIED, Frame.NORMAL});
|
examineStates(new int[] {Frame.MAXIMIZED_BOTH, Frame.ICONIFIED, Frame.NORMAL});
|
||||||
System.out.println("------");
|
|
||||||
examineStates(new int[] {Frame.ICONIFIED, Frame.MAXIMIZED_BOTH, Frame.NORMAL});
|
examineStates(new int[] {Frame.ICONIFIED, Frame.MAXIMIZED_BOTH, Frame.NORMAL});
|
||||||
System.out.println("------");
|
|
||||||
examineStates(new int[] {Frame.NORMAL, Frame.MAXIMIZED_BOTH, Frame.ICONIFIED});
|
|
||||||
System.out.println("------");
|
|
||||||
examineStates(new int[] {Frame.NORMAL, Frame.ICONIFIED, Frame.MAXIMIZED_BOTH});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import com.jetbrains.desktop.SharedTextures;
|
import com.jetbrains.desktop.SharedTextures;
|
||||||
|
import com.jetbrains.desktop.SharedTexturesService;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
@@ -31,8 +32,8 @@ public class SharedTexturesTest {
|
|||||||
BufferedImage originalImage = createImage();
|
BufferedImage originalImage = createImage();
|
||||||
byte[] bytes = getPixelData(originalImage);
|
byte[] bytes = getPixelData(originalImage);
|
||||||
|
|
||||||
SharedTextures sharedTexturesService = SharedTextures.create();
|
SharedTextures sharedTexturesService = new SharedTexturesService();
|
||||||
Asserts.assertEquals(sharedTexturesService.getTextureType(), SharedTextures.METAL_TEXTURE_TYPE);
|
Asserts.assertEquals(sharedTexturesService.getTextureType(), SharedTexturesService.METAL_TEXTURE_TYPE);
|
||||||
|
|
||||||
BufferedImage bufferedImageContent;
|
BufferedImage bufferedImageContent;
|
||||||
BufferedImage volatileImageContent;
|
BufferedImage volatileImageContent;
|
||||||
@@ -146,4 +147,4 @@ public class SharedTexturesTest {
|
|||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
99
test/jdk/jb/java/awt/Toolkit/AutoToolkit.java
Normal file
99
test/jdk/jb/java/awt/Toolkit/AutoToolkit.java
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* Copyright (c) 2025, JetBrains s.r.o.. 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.GraphicsEnvironment;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @test
|
||||||
|
* @summary Verifies that the program starts with the right toolkit
|
||||||
|
* @requires os.family == "linux"
|
||||||
|
* @run main/othervm -Dawt.toolkit.name=auto -Dtoolkit=auto AutoToolkit
|
||||||
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dtoolkit=WLToolkit AutoToolkit
|
||||||
|
* @run main/othervm -Dawt.toolkit.name=XToolkit -Dtoolkit=XToolkit AutoToolkit
|
||||||
|
* @run main/othervm -Dawt.toolkit.name=garbage -Dtoolkit=garbage AutoToolkit
|
||||||
|
* @run main/othervm -Dawt.toolkit.name= -Dtoolkit= AutoToolkit
|
||||||
|
* @run main/othervm AutoToolkit
|
||||||
|
*/
|
||||||
|
public class AutoToolkit {
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
String toolkitProp = System.getProperty("toolkit");
|
||||||
|
String toolkitReal = System.getProperty("awt.toolkit.name");
|
||||||
|
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||||
|
String tkName = tk.getClass().getName();
|
||||||
|
tkName = tkName.substring(tkName.lastIndexOf('.') + 1);
|
||||||
|
boolean expectWayland = System.getenv("WAYLAND_DISPLAY") != null;
|
||||||
|
boolean isHeadless = GraphicsEnvironment.isHeadless();
|
||||||
|
|
||||||
|
System.out.printf("Started with -Dawt.toolkit.name=%s, got %s; Toolkit.getDefaultToolkit() == %s%n",
|
||||||
|
toolkitProp, toolkitReal, tkName);
|
||||||
|
|
||||||
|
if (isHeadless) {
|
||||||
|
if (!tkName.equals("HeadlessToolkit")) {
|
||||||
|
throw new RuntimeException("Expected HeadlessToolkit because we are in the headless mode, got " + tkName);
|
||||||
|
}
|
||||||
|
System.out.println("Test PASSED");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (toolkitProp) {
|
||||||
|
case "auto" -> {
|
||||||
|
if (expectWayland) {
|
||||||
|
if (!tkName.equals("WLToolkit")) {
|
||||||
|
throw new RuntimeException("Expected WLToolkit, got " + tkName);
|
||||||
|
}
|
||||||
|
if (!toolkitReal.equals("WLToolkit")) {
|
||||||
|
throw new RuntimeException("Expected WLToolkit property value, got " + tkName);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!tkName.equals("XToolkit")) {
|
||||||
|
throw new RuntimeException("Expected XToolkit, got " + tkName);
|
||||||
|
}
|
||||||
|
if (!toolkitReal.equals("XToolkit")) {
|
||||||
|
throw new RuntimeException("Expected XToolkit property value, got " + tkName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case "WLToolkit" -> {
|
||||||
|
if (!tkName.equals("WLToolkit")) {
|
||||||
|
throw new RuntimeException("Expected WLToolkit, got " + tkName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case "XToolkit" -> {
|
||||||
|
if (!tkName.equals("XToolkit")) {
|
||||||
|
throw new RuntimeException("Expected XToolkit, got " + tkName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case null, default -> {
|
||||||
|
if (!tkName.equals("XToolkit")) {
|
||||||
|
throw new RuntimeException("Expected XToolkit, got " + tkName);
|
||||||
|
}
|
||||||
|
if (!toolkitReal.equals("XToolkit")) {
|
||||||
|
throw new RuntimeException("Expected XToolkit property value, got " + tkName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("Test PASSED");
|
||||||
|
}
|
||||||
|
}
|
||||||
178
test/jdk/jb/java/awt/mouse/MouseBackForwardButtonsTest.java
Normal file
178
test/jdk/jb/java/awt/mouse/MouseBackForwardButtonsTest.java
Normal 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;
|
||||||
|
}
|
||||||
@@ -38,10 +38,10 @@ import java.io.IOException;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that Vulkan blit works
|
* @summary Verifies that Vulkan blit works
|
||||||
* @modules java.desktop/sun.java2d.vulkan:+open
|
* @modules java.desktop/sun.java2d.vulkan:+open
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=true VulkanBlitTest TRANSLUCENT
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=true VulkanBlitTest TRANSLUCENT
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=true VulkanBlitTest OPAQUE
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=true VulkanBlitTest OPAQUE
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=false VulkanBlitTest TRANSLUCENT
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=false VulkanBlitTest TRANSLUCENT
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=false VulkanBlitTest OPAQUE
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=false VulkanBlitTest OPAQUE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -302,9 +302,6 @@ public class VulkanBlitTest {
|
|||||||
if (!VKEnv.isVulkanEnabled()) {
|
if (!VKEnv.isVulkanEnabled()) {
|
||||||
throw new Error("Vulkan not enabled");
|
throw new Error("Vulkan not enabled");
|
||||||
}
|
}
|
||||||
if (!VKEnv.isSurfaceDataAccelerated()) {
|
|
||||||
throw new Error("Accelerated surface data not enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean hasAlpha;
|
boolean hasAlpha;
|
||||||
if (args.length > 0 && args[0].equals("TRANSLUCENT")) hasAlpha = true;
|
if (args.length > 0 && args[0].equals("TRANSLUCENT")) hasAlpha = true;
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ import java.io.IOException;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies composites in opaque and translucent modes.
|
* @summary Verifies composites in opaque and translucent modes.
|
||||||
* @modules java.desktop/sun.java2d.vulkan:+open
|
* @modules java.desktop/sun.java2d.vulkan:+open
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=true VulkanCompositeTest TRANSLUCENT
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=true VulkanCompositeTest TRANSLUCENT
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=true VulkanCompositeTest OPAQUE
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=true VulkanCompositeTest OPAQUE
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=false VulkanCompositeTest TRANSLUCENT
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=false VulkanCompositeTest TRANSLUCENT
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=false VulkanCompositeTest OPAQUE
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=false VulkanCompositeTest OPAQUE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -105,9 +105,6 @@ public class VulkanCompositeTest {
|
|||||||
if (!VKEnv.isVulkanEnabled()) {
|
if (!VKEnv.isVulkanEnabled()) {
|
||||||
throw new Error("Vulkan not enabled");
|
throw new Error("Vulkan not enabled");
|
||||||
}
|
}
|
||||||
if (!VKEnv.isSurfaceDataAccelerated()) {
|
|
||||||
throw new Error("Accelerated surface data not enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean hasAlpha;
|
boolean hasAlpha;
|
||||||
if (args.length > 0 && args[0].equals("TRANSLUCENT")) hasAlpha = true;
|
if (args.length > 0 && args[0].equals("TRANSLUCENT")) hasAlpha = true;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import java.lang.ref.WeakReference;
|
|||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @summary Verifies that disposal of blit destination image doesn't crash the process.
|
* @summary Verifies that disposal of blit destination image doesn't crash the process.
|
||||||
* @modules java.desktop/sun.java2d.vulkan:+open java.desktop/sun.java2d:+open java.desktop/sun.awt.image:+open
|
* @modules java.desktop/sun.java2d.vulkan:+open java.desktop/sun.java2d:+open java.desktop/sun.awt.image:+open
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=true VulkanDisposeBlitDstTest
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=true VulkanDisposeBlitDstTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -49,9 +49,6 @@ public class VulkanDisposeBlitDstTest {
|
|||||||
if (!VKEnv.isVulkanEnabled()) {
|
if (!VKEnv.isVulkanEnabled()) {
|
||||||
throw new Error("Vulkan not enabled");
|
throw new Error("Vulkan not enabled");
|
||||||
}
|
}
|
||||||
if (!VKEnv.isSurfaceDataAccelerated()) {
|
|
||||||
throw new Error("Accelerated surface data not enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
VKGraphicsConfig gc = VKEnv.getDevices().findFirst().get().getOffscreenGraphicsConfigs().findFirst().get();
|
VKGraphicsConfig gc = VKEnv.getDevices().findFirst().get().getOffscreenGraphicsConfigs().findFirst().get();
|
||||||
VolatileImage a = gc.createCompatibleVolatileImage(100, 100, VolatileImage.TRANSLUCENT, VKSurfaceData.RT_TEXTURE);
|
VolatileImage a = gc.createCompatibleVolatileImage(100, 100, VolatileImage.TRANSLUCENT, VKSurfaceData.RT_TEXTURE);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import java.lang.ref.WeakReference;
|
|||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @summary Verifies that disposal of blit source image doesn't crash the process.
|
* @summary Verifies that disposal of blit source image doesn't crash the process.
|
||||||
* @modules java.desktop/sun.java2d.vulkan:+open java.desktop/sun.java2d:+open java.desktop/sun.awt.image:+open
|
* @modules java.desktop/sun.java2d.vulkan:+open java.desktop/sun.java2d:+open java.desktop/sun.awt.image:+open
|
||||||
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true -Dsun.java2d.vulkan.leOptimizations=true VulkanDisposeBlitSrcTest
|
* @run main/othervm -Djava.awt.headless=true -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.leOptimizations=true VulkanDisposeBlitSrcTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -49,9 +49,6 @@ public class VulkanDisposeBlitSrcTest {
|
|||||||
if (!VKEnv.isVulkanEnabled()) {
|
if (!VKEnv.isVulkanEnabled()) {
|
||||||
throw new Error("Vulkan not enabled");
|
throw new Error("Vulkan not enabled");
|
||||||
}
|
}
|
||||||
if (!VKEnv.isSurfaceDataAccelerated()) {
|
|
||||||
throw new Error("Accelerated surface data not enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
VKGraphicsConfig gc = VKEnv.getDevices().findFirst().get().getOffscreenGraphicsConfigs().findFirst().get();
|
VKGraphicsConfig gc = VKEnv.getDevices().findFirst().get().getOffscreenGraphicsConfigs().findFirst().get();
|
||||||
VolatileImage a = gc.createCompatibleVolatileImage(100, 100, VolatileImage.TRANSLUCENT, VKSurfaceData.RT_TEXTURE);
|
VolatileImage a = gc.createCompatibleVolatileImage(100, 100, VolatileImage.TRANSLUCENT, VKSurfaceData.RT_TEXTURE);
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
* @test
|
* @test
|
||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that robot correctly pick color
|
* @summary Verifies that robot correctly pick color
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true ClipRenderTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True ClipRenderTest
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=false ClipRenderTest
|
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False ClipRenderTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False ClipRenderTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ import javax.swing.SwingUtilities;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that robot correctly pick color
|
* @summary Verifies that robot correctly pick color
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True ImageTransformTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True ImageTransformTest
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true ImageTransformTest
|
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False ImageTransformTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False ImageTransformTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that robot correctly pick color
|
* @summary Verifies that robot correctly pick color
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True RobotGetOOBPixelsTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True RobotGetOOBPixelsTest
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true RobotGetOOBPixelsTest
|
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False RobotGetOOBPixelsTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False RobotGetOOBPixelsTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that robot correctly pick color
|
* @summary Verifies that robot correctly pick color
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True RobotGetPixelTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True RobotGetPixelTest
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true RobotGetPixelTest
|
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False RobotGetPixelTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False RobotGetPixelTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that robot correctly pick color
|
* @summary Verifies that robot correctly pick color
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True RobotGetPixelsTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True RobotGetPixelsTest
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true RobotGetPixelsTest
|
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False RobotGetPixelsTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=False RobotGetPixelsTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import java.io.IOException;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies Vulkan graphics config compatibility
|
* @summary Verifies Vulkan graphics config compatibility
|
||||||
* @modules java.desktop/sun.java2d.vulkan:+open
|
* @modules java.desktop/sun.java2d.vulkan:+open
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true VulkanGCCompatibilityTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True VulkanGCCompatibilityTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -85,9 +85,6 @@ public class VulkanGCCompatibilityTest {
|
|||||||
if (!VKEnv.isVulkanEnabled()) {
|
if (!VKEnv.isVulkanEnabled()) {
|
||||||
throw new Error("Vulkan not enabled");
|
throw new Error("Vulkan not enabled");
|
||||||
}
|
}
|
||||||
if (!VKEnv.isSurfaceDataAccelerated()) {
|
|
||||||
throw new Error("Accelerated surface data not enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
final GraphicsConfiguration[] configs =
|
final GraphicsConfiguration[] configs =
|
||||||
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getConfigurations();
|
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getConfigurations();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
* @requires os.family == "linux"
|
* @requires os.family == "linux"
|
||||||
* @summary Verifies that Vulkan mask fill works
|
* @summary Verifies that Vulkan mask fill works
|
||||||
* @modules java.desktop/sun.java2d.vulkan:+open
|
* @modules java.desktop/sun.java2d.vulkan:+open
|
||||||
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True -Dsun.java2d.vulkan.accelsd=true VulkanMaskFillTest
|
* @run main/othervm -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True VulkanMaskFillTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -59,9 +59,6 @@ public class VulkanMaskFillTest {
|
|||||||
if (!VKEnv.isVulkanEnabled()) {
|
if (!VKEnv.isVulkanEnabled()) {
|
||||||
throw new Error("Vulkan not enabled");
|
throw new Error("Vulkan not enabled");
|
||||||
}
|
}
|
||||||
if (!VKEnv.isSurfaceDataAccelerated()) {
|
|
||||||
throw new Error("Accelerated surface data not enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
final Robot robot = new Robot();
|
final Robot robot = new Robot();
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
|
|||||||
@@ -49,16 +49,19 @@ public class ManglingFileSystem extends FileSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
provider.defaultFs.close();
|
provider.defaultFs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
return provider.defaultFs.isOpen();
|
return provider.defaultFs.isOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isReadOnly() {
|
public boolean isReadOnly() {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
return provider.defaultFs.isReadOnly();
|
return provider.defaultFs.isReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +72,7 @@ public class ManglingFileSystem extends FileSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<Path> getRootDirectories() {
|
public Iterable<Path> getRootDirectories() {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
Iterable<Path> delegateRoots = provider.defaultFs.getRootDirectories();
|
Iterable<Path> delegateRoots = provider.defaultFs.getRootDirectories();
|
||||||
List<Path> result = new ArrayList<>();
|
List<Path> result = new ArrayList<>();
|
||||||
for (Path delegateRoot : delegateRoots) {
|
for (Path delegateRoot : delegateRoots) {
|
||||||
@@ -86,11 +90,13 @@ public class ManglingFileSystem extends FileSystem {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterable<FileStore> getFileStores() {
|
public Iterable<FileStore> getFileStores() {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
return provider.defaultFs.getFileStores();
|
return provider.defaultFs.getFileStores();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<String> supportedFileAttributeViews() {
|
public Set<String> supportedFileAttributeViews() {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
return provider.defaultFs.supportedFileAttributeViews();
|
return provider.defaultFs.supportedFileAttributeViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,19 +23,12 @@
|
|||||||
|
|
||||||
package testNio;
|
package testNio;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.nio.channels.FileChannel;
|
import java.nio.channels.FileChannel;
|
||||||
import java.nio.channels.SeekableByteChannel;
|
import java.nio.channels.SeekableByteChannel;
|
||||||
import java.nio.file.AccessDeniedException;
|
import java.nio.file.*;
|
||||||
import java.nio.file.AccessMode;
|
|
||||||
import java.nio.file.CopyOption;
|
|
||||||
import java.nio.file.DirectoryStream;
|
|
||||||
import java.nio.file.FileStore;
|
|
||||||
import java.nio.file.FileSystem;
|
|
||||||
import java.nio.file.LinkOption;
|
|
||||||
import java.nio.file.OpenOption;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.nio.file.attribute.BasicFileAttributeView;
|
import java.nio.file.attribute.BasicFileAttributeView;
|
||||||
import java.nio.file.attribute.BasicFileAttributes;
|
import java.nio.file.attribute.BasicFileAttributes;
|
||||||
import java.nio.file.attribute.DosFileAttributeView;
|
import java.nio.file.attribute.DosFileAttributeView;
|
||||||
@@ -48,6 +41,7 @@ import java.nio.file.spi.FileSystemProvider;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
public class ManglingFileSystemProvider extends FileSystemProvider {
|
public class ManglingFileSystemProvider extends FileSystemProvider {
|
||||||
public static final String extraContent = "3x7r4";
|
public static final String extraContent = "3x7r4";
|
||||||
@@ -168,6 +162,7 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
|
public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return new ManglingFileChannel(defaultProvider.newFileChannel(unwrap(path), options, attrs));
|
return new ManglingFileChannel(defaultProvider.newFileChannel(unwrap(path), options, attrs));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,11 +173,13 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException {
|
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return new ManglingDirectoryStream(manglingFs, (ManglingPath) dir, defaultProvider.newDirectoryStream(unwrap(dir), filter));
|
return new ManglingDirectoryStream(manglingFs, (ManglingPath) dir, defaultProvider.newDirectoryStream(unwrap(dir), filter));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException {
|
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
if (prohibitFileTreeModifications) {
|
if (prohibitFileTreeModifications) {
|
||||||
throw new AccessDeniedException(dir.toString(), null, "Test: All file tree modifications are prohibited");
|
throw new AccessDeniedException(dir.toString(), null, "Test: All file tree modifications are prohibited");
|
||||||
}
|
}
|
||||||
@@ -191,6 +188,7 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(Path path) throws IOException {
|
public void delete(Path path) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
if (prohibitFileTreeModifications) {
|
if (prohibitFileTreeModifications) {
|
||||||
throw new AccessDeniedException(path.toString(), null, "Test: All file tree modifications are prohibited");
|
throw new AccessDeniedException(path.toString(), null, "Test: All file tree modifications are prohibited");
|
||||||
}
|
}
|
||||||
@@ -199,6 +197,7 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void copy(Path source, Path target, CopyOption... options) throws IOException {
|
public void copy(Path source, Path target, CopyOption... options) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
if (prohibitFileTreeModifications) {
|
if (prohibitFileTreeModifications) {
|
||||||
throw new AccessDeniedException(source.toString(), null, "Test: All file tree modifications are prohibited");
|
throw new AccessDeniedException(source.toString(), null, "Test: All file tree modifications are prohibited");
|
||||||
}
|
}
|
||||||
@@ -209,6 +208,7 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void move(Path source, Path target, CopyOption... options) throws IOException {
|
public void move(Path source, Path target, CopyOption... options) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
if (prohibitFileTreeModifications) {
|
if (prohibitFileTreeModifications) {
|
||||||
throw new AccessDeniedException(source.toString(), null, "Test: All file tree modifications are prohibited");
|
throw new AccessDeniedException(source.toString(), null, "Test: All file tree modifications are prohibited");
|
||||||
}
|
}
|
||||||
@@ -219,6 +219,7 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSameFile(Path path, Path path2) throws IOException {
|
public boolean isSameFile(Path path, Path path2) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
Path source2 = unwrap(path);
|
Path source2 = unwrap(path);
|
||||||
Path target2 = unwrap(path2);
|
Path target2 = unwrap(path2);
|
||||||
return defaultProvider.isSameFile(source2, target2);
|
return defaultProvider.isSameFile(source2, target2);
|
||||||
@@ -226,16 +227,19 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isHidden(Path path) throws IOException {
|
public boolean isHidden(Path path) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return defaultProvider.isHidden(unwrap(path));
|
return defaultProvider.isHidden(unwrap(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileStore getFileStore(Path path) throws IOException {
|
public FileStore getFileStore(Path path) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return defaultProvider.getFileStore(unwrap(path));
|
return defaultProvider.getFileStore(unwrap(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void checkAccess(Path path, AccessMode... modes) throws IOException {
|
public void checkAccess(Path path, AccessMode... modes) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
defaultProvider.checkAccess(unwrap(path), modes);
|
defaultProvider.checkAccess(unwrap(path), modes);
|
||||||
if (denyAccessToEverything) {
|
if (denyAccessToEverything) {
|
||||||
throw new AccessDeniedException(path.toString(), null, "Test: No access rules to anything");
|
throw new AccessDeniedException(path.toString(), null, "Test: No access rules to anything");
|
||||||
@@ -244,11 +248,13 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options) {
|
public <V extends FileAttributeView> V getFileAttributeView(Path path, Class<V> type, LinkOption... options) {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return wrap(defaultProvider.getFileAttributeView(unwrap(path), type, options));
|
return wrap(defaultProvider.getFileAttributeView(unwrap(path), type, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException {
|
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return wrap(defaultProvider.readAttributes(unwrap(path), type, options));
|
return wrap(defaultProvider.readAttributes(unwrap(path), type, options));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,6 +265,7 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException {
|
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
if (prohibitFileTreeModifications) {
|
if (prohibitFileTreeModifications) {
|
||||||
throw new AccessDeniedException(path.toString(), null, "Test: All file tree modifications are prohibited");
|
throw new AccessDeniedException(path.toString(), null, "Test: All file tree modifications are prohibited");
|
||||||
}
|
}
|
||||||
@@ -267,11 +274,13 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean exists(Path path, LinkOption... options) {
|
public boolean exists(Path path, LinkOption... options) {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
return defaultProvider.exists(unwrap(path), options);
|
return defaultProvider.exists(unwrap(path), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws IOException {
|
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) throws IOException {
|
||||||
|
triggerSporadicFileAccess();
|
||||||
if (prohibitFileTreeModifications) {
|
if (prohibitFileTreeModifications) {
|
||||||
throw new AccessDeniedException(link.toString(), null, "Test: All file tree modifications are prohibited");
|
throw new AccessDeniedException(link.toString(), null, "Test: All file tree modifications are prohibited");
|
||||||
}
|
}
|
||||||
@@ -303,4 +312,26 @@ public class ManglingFileSystemProvider extends FileSystemProvider {
|
|||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final AtomicLong counter = new AtomicLong();
|
||||||
|
|
||||||
|
static void triggerSporadicFileAccess() {
|
||||||
|
if (FileSystems.getDefault() != null) {
|
||||||
|
try {
|
||||||
|
var tempFile = new File(System.getProperty("java.io.tmpdir"), "test.tmp." + counter.incrementAndGet());
|
||||||
|
try {
|
||||||
|
try (var out = new java.io.FileOutputStream(tempFile)) {
|
||||||
|
out.write(1);
|
||||||
|
}
|
||||||
|
try (var in = new java.io.FileInputStream(tempFile)) {
|
||||||
|
in.read();
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
tempFile.delete();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new Error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ public class ManglingPath implements Path {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Path toRealPath(LinkOption... options) throws IOException {
|
public Path toRealPath(LinkOption... options) throws IOException {
|
||||||
|
ManglingFileSystemProvider.triggerSporadicFileAccess();
|
||||||
return new ManglingPath(fileSystem, delegate.toRealPath(options));
|
return new ManglingPath(fileSystem, delegate.toRealPath(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
|||||||
@run main BugJBR9563
|
@run main BugJBR9563
|
||||||
*/
|
*/
|
||||||
public class BugJBR9563 {
|
public class BugJBR9563 {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
CountDownLatch windowOpened = new CountDownLatch(1);
|
CountDownLatch windowOpened = new CountDownLatch(1);
|
||||||
AtomicReference<JFrame> frameRef = new AtomicReference<>();
|
AtomicReference<JFrame> frameRef = new AtomicReference<>();
|
||||||
@@ -76,24 +77,31 @@ public class BugJBR9563 {
|
|||||||
Assert(f != null, "Frame is not captured");
|
Assert(f != null, "Frame is not captured");
|
||||||
|
|
||||||
|
|
||||||
Set<String> threadsAfterRendering = getCurrentThreads();
|
Set<String> threadsAfterRendering = getCurrentThreads()
|
||||||
|
.stream()
|
||||||
|
.map(t -> t.threadId() + " " + t.getName())
|
||||||
|
.collect(Collectors.toSet());
|
||||||
System.out.println("Threads after rendering: " + threadsAfterRendering);
|
System.out.println("Threads after rendering: " + threadsAfterRendering);
|
||||||
|
|
||||||
Callable<Boolean> task = () -> {
|
|
||||||
System.out.println("Check threads state...");
|
|
||||||
Set<String> threads = getCurrentThreads();
|
|
||||||
List<String> newThreads = threads.stream().filter(it -> !threadsAfterRendering.contains(it)).toList();
|
|
||||||
|
|
||||||
System.out.println("New threads list: " + newThreads);
|
|
||||||
return newThreads.isEmpty();
|
|
||||||
};
|
|
||||||
|
|
||||||
List<Boolean> results = Collections.synchronizedList(new ArrayList<>());
|
List<Boolean> results = Collections.synchronizedList(new ArrayList<>());
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
System.out.println("Check threads state...");
|
System.out.println("Check threads state...");
|
||||||
Set<String> threads = getCurrentThreads();
|
List<Thread> threads = getCurrentThreads();
|
||||||
List<String> newThreads = threads.stream().filter(it -> !threadsAfterRendering.contains(it)).toList();
|
List<Thread> threadsWoTimerQueue = threads
|
||||||
|
.stream().filter(it -> !it.getName().equals("TimerQueue")).toList();
|
||||||
|
|
||||||
|
Assert(threads.size() - threadsWoTimerQueue.size() <= 1, "More than 1 TimerQueue thread found");
|
||||||
|
|
||||||
|
Set<String> threadIdNames = threadsWoTimerQueue
|
||||||
|
.stream()
|
||||||
|
.map(t -> t.threadId() + " " + t.getName())
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
List<String> newThreads = threadIdNames
|
||||||
|
.stream()
|
||||||
|
.filter(it -> !threadsAfterRendering.contains(it))
|
||||||
|
.toList();
|
||||||
|
|
||||||
System.out.println("New threads list: " + newThreads);
|
System.out.println("New threads list: " + newThreads);
|
||||||
|
|
||||||
@@ -117,14 +125,9 @@ public class BugJBR9563 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Set<String> getCurrentThreads() {
|
private static List<Thread> getCurrentThreads() {
|
||||||
Map<Thread, StackTraceElement[]> allThreads = Thread.getAllStackTraces();
|
Map<Thread, StackTraceElement[]> threadsMap = Thread.getAllStackTraces();
|
||||||
|
return threadsMap.keySet().stream().toList();
|
||||||
return allThreads
|
|
||||||
.keySet()
|
|
||||||
.stream()
|
|
||||||
.map(t -> t.threadId() + " " + t.getName())
|
|
||||||
.collect(Collectors.toSet());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Assert(boolean condition, String str) {
|
private static void Assert(boolean condition, String str) {
|
||||||
|
|||||||
95
test/jdk/jb/javax/swing/wayland/WLPopupUnconstrained.java
Normal file
95
test/jdk/jb/javax/swing/wayland/WLPopupUnconstrained.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,9 @@ java/awt/PopupMenu/PopupMenuLocation.java JBR-5397,JBR-7375 macosx-all,windows-x
|
|||||||
java/awt/Robot/CheckCommonColors/CheckCommonColors.java JBR-5397,JBR-6092 macosx-all,windows-x64
|
java/awt/Robot/CheckCommonColors/CheckCommonColors.java JBR-5397,JBR-6092 macosx-all,windows-x64
|
||||||
java/awt/Robot/NonEmptyErrorStream.java JBR-7375 windows-x64
|
java/awt/Robot/NonEmptyErrorStream.java JBR-7375 windows-x64
|
||||||
java/awt/Robot/RobotWheelTest/RobotWheelTest.java JBR-5397,JBR-7377 macosx-all,windows-x64
|
java/awt/Robot/RobotWheelTest/RobotWheelTest.java JBR-5397,JBR-7377 macosx-all,windows-x64
|
||||||
|
java/awt/Scrollbar/ScrollbarCtrlClickTest.java JBR-9684 windows-x64
|
||||||
java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java JBR-5397,JBR-7531 macosx-all,windows-x64
|
java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java JBR-5397,JBR-7531 macosx-all,windows-x64
|
||||||
|
java/awt/Scrollbar/UnitIncrementTest.java JBR-9712 windows-x64
|
||||||
java/awt/ScrollPane/ScrollPaneLimitation.java JBR-8579 windows-x64
|
java/awt/ScrollPane/ScrollPaneLimitation.java JBR-8579 windows-x64
|
||||||
java/awt/ScrollPane/ScrollPaneRemoveAdd.java JBR-8580 windows-x64
|
java/awt/ScrollPane/ScrollPaneRemoveAdd.java JBR-8580 windows-x64
|
||||||
java/awt/TextArea/Mixing/TextAreaMixing.java JBR-8581 windows-x64
|
java/awt/TextArea/Mixing/TextAreaMixing.java JBR-8581 windows-x64
|
||||||
@@ -48,8 +50,10 @@ javax/swing/JComboBox/EditableComboBoxPopupPos.java JBR-7383 windows-x64
|
|||||||
javax/swing/JFileChooser/4150029/bug4150029.java JBR-9419 windows-x64
|
javax/swing/JFileChooser/4150029/bug4150029.java JBR-9419 windows-x64
|
||||||
javax/swing/JFileChooser/4847375/bug4847375.java JBR-8855 windows-x64
|
javax/swing/JFileChooser/4847375/bug4847375.java JBR-8855 windows-x64
|
||||||
javax/swing/JFileChooser/4966171/bug4966171.java JBR-8855 windows-x64
|
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/FileChooserListenerLeak.java JBR-8855 windows-x64
|
||||||
javax/swing/JFileChooser/JFileChooserFontReset.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/JInternalFrame/Test6505027.java nobug macosx-all,linux-all,windows-all
|
||||||
javax/swing/JMenuBar/MenuBarRTLBug.java JBR-7385 windows-x64
|
javax/swing/JMenuBar/MenuBarRTLBug.java JBR-7385 windows-x64
|
||||||
javax/swing/JPopupMenu/4634626/bug4634626.java nobug macosx-all,linux-all,windows-all
|
javax/swing/JPopupMenu/4634626/bug4634626.java nobug macosx-all,linux-all,windows-all
|
||||||
@@ -61,7 +65,9 @@ javax/swing/text/StyledEditorKit/4506788/bug4506788.java JBR-7386 windows-x64
|
|||||||
|
|
||||||
jb/java/awt/CustomTitleBar/DialogNativeControlsTest.java JBR-9083 windows-x64
|
jb/java/awt/CustomTitleBar/DialogNativeControlsTest.java JBR-9083 windows-x64
|
||||||
jb/java/awt/CustomTitleBar/MaximizedWindowFocusTest.java JBR-9519 windows-x64
|
jb/java/awt/CustomTitleBar/MaximizedWindowFocusTest.java JBR-9519 windows-x64
|
||||||
|
jb/java/awt/CustomTitleBar/MouseEventsOnClientArea.java JBR-9159 windows-x64
|
||||||
jb/java/awt/Desktop/AboutHandlerTest.java nobug macosx-all,linux-all,windows-all
|
jb/java/awt/Desktop/AboutHandlerTest.java nobug macosx-all,linux-all,windows-all
|
||||||
|
jb/java/awt/event/MouseEvent/ReleaseAndClickModifiers.java JBR-9687 windows-x64
|
||||||
jb/java/awt/Focus/ChainOfPopupsFocusTest.java JBR-8407 windows-x64
|
jb/java/awt/Focus/ChainOfPopupsFocusTest.java JBR-8407 windows-x64
|
||||||
jb/java/awt/Focus/FrameAfterPopup.java JBR-9161 windows-x64
|
jb/java/awt/Focus/FrameAfterPopup.java JBR-9161 windows-x64
|
||||||
jb/java/awt/Focus/MaximizedCustomDecorationsTest.java JBR-9346 windows-x64
|
jb/java/awt/Focus/MaximizedCustomDecorationsTest.java JBR-9346 windows-x64
|
||||||
@@ -98,11 +104,11 @@ javax/swing/JFileChooser/4524490/bug4524490.java JBR-5397,JBR-5846 macosx-all,wi
|
|||||||
javax/swing/JFileChooser/6520101/bug6520101.java JBR-5397,JBR-7413 macosx-all,windows-x64
|
javax/swing/JFileChooser/6520101/bug6520101.java JBR-5397,JBR-7413 macosx-all,windows-x64
|
||||||
javax/swing/JFileChooser/8002077/bug8002077.java JBR-4880,JBR-5397 windows-all,macosx-all
|
javax/swing/JFileChooser/8002077/bug8002077.java JBR-4880,JBR-5397 windows-all,macosx-all
|
||||||
javax/swing/JLabel/4138746/JLabelMnemonicsTest.java JBR-4949,JBR-5397 linux-all,windows-all,macosx-all
|
javax/swing/JLabel/4138746/JLabelMnemonicsTest.java JBR-4949,JBR-5397 linux-all,windows-all,macosx-all
|
||||||
javax/swing/JLabel/6596966/bug6596966.java JBR-5397 macosx-all
|
javax/swing/JLabel/6596966/bug6596966.java JBR-5397,JBR-9507 macosx-all,windows-10.0
|
||||||
javax/swing/JList/4618767/JListSelectedElementTest.java JBR-4955,JBR-5397 windows-all,macosx-all
|
javax/swing/JList/4618767/JListSelectedElementTest.java JBR-4955,JBR-5397 windows-all,macosx-all
|
||||||
javax/swing/JList/6462008/bug6462008.java JBR-5397,JBR-6773 macosx-all,windows-all
|
javax/swing/JList/6462008/bug6462008.java JBR-5397,JBR-6773 macosx-all,windows-all
|
||||||
javax/swing/JMenu/4213634/bug4213634.java JBR-5397 macosx-all
|
javax/swing/JMenu/4213634/bug4213634.java JBR-5397,JBR-8056 macosx-all,windows-all
|
||||||
javax/swing/JMenu/4515762/bug4515762.java JBR-5397 macosx-all
|
javax/swing/JMenu/4515762/bug4515762.java JBR-5397,JBR-9513 macosx-all,windows-10.0
|
||||||
javax/swing/JMenu/4692443/bug4692443.java JBR-5397,JBR-6093 macosx-all,windows-all
|
javax/swing/JMenu/4692443/bug4692443.java JBR-5397,JBR-6093 macosx-all,windows-all
|
||||||
javax/swing/JMenu/6470128/bug6470128.java 8253184,JBR-6307,JBR-5397 windows-all,linux-all,macosx-all
|
javax/swing/JMenu/6470128/bug6470128.java 8253184,JBR-6307,JBR-5397 windows-all,linux-all,macosx-all
|
||||||
javax/swing/JMenuBar/4750590/bug4750590.java JBR-5397,JBR-6094 macosx-all,windows-all
|
javax/swing/JMenuBar/4750590/bug4750590.java JBR-5397,JBR-6094 macosx-all,windows-all
|
||||||
|
|||||||
@@ -112,13 +112,13 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
java/awt/dnd/RemoveDropTargetCrashTest/RemoveDropTargetCrashTest.java JBR-8960 windows-x64
|
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
|
||||||
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-8542 windows-all timeout
|
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-8542 windows-all timeout
|
||||||
java/awt/Graphics2D/TextPerf.java JBR-8541 linux-all,windows-all
|
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/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/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogTest/EnqueueWithDialogTest.java JBR-7077 linux-all,windows-all
|
||||||
java/awt/MenuItem/EnableTest.java JBR-8543 windows-all timeout
|
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-6.16.7-200.fc42.x86_64
|
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/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
|
||||||
|
|
||||||
javax/swing/border/TestTitledBorderLeak.java JBR-9272 macosx-14.8
|
javax/swing/border/TestTitledBorderLeak.java JBR-9272 macosx-14.8
|
||||||
@@ -126,7 +126,7 @@ javax/swing/JButton/TestMnemonicAction.java JBR-6508 windows-all,linux-all,macos
|
|||||||
javax/swing/JComboBox/8072767/bug8072767.java JBR-5540 windows-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/PerPixelTranslucentCanvas.java JBR-7404 macosx-all
|
||||||
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentGradient.java JBR-9446 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
|
||||||
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-6274 windows-all,macosx-all
|
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-6274 windows-all,macosx-all
|
||||||
|
|
||||||
jb/build/ResolveSymbolsTest/ResolveSymbolsRealEnv.java JBR-8544 linux-all
|
jb/build/ResolveSymbolsTest/ResolveSymbolsRealEnv.java JBR-8544 linux-all
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ java/awt/event/MouseEvent/DragMouseEventTest.java JBR-8751 linux-all
|
|||||||
java/awt/FileDialog/MoveToTrashTest.java JBR-8752 linux-all
|
java/awt/FileDialog/MoveToTrashTest.java JBR-8752 linux-all
|
||||||
java/awt/Focus/6401036/InputVerifierTest2.java JBR-9142 linux-aarch64
|
java/awt/Focus/6401036/InputVerifierTest2.java JBR-9142 linux-aarch64
|
||||||
java/awt/Focus/TestWindowsLFFocus.java JBR-8759 linux-all
|
java/awt/Focus/TestWindowsLFFocus.java JBR-8759 linux-all
|
||||||
|
java/awt/font/Emoji/ComplexEmoji.java JBR-9661 linux-all
|
||||||
java/awt/font/Emoji/EmojiVariation.java JBR-8717 linux-all
|
java/awt/font/Emoji/EmojiVariation.java JBR-8717 linux-all
|
||||||
java/awt/font/Emoji/OutlineTextRendererEmoji.java JBR-8717 linux-all
|
java/awt/font/Emoji/OutlineTextRendererEmoji.java JBR-8717 linux-all
|
||||||
java/awt/font/FontScaling/RotatedScaledFontTest.java JBR-8760 linux-all
|
java/awt/font/FontScaling/RotatedScaledFontTest.java JBR-8760 linux-all
|
||||||
@@ -52,23 +53,37 @@ javax/swing/JCheckBox/ImageCheckboxFocus/ImageCheckboxTest.java JBR-8806 linux-a
|
|||||||
javax/swing/JColorChooser/Test6707406.java JBR-8748 linux-all
|
javax/swing/JColorChooser/Test6707406.java JBR-8748 linux-all
|
||||||
javax/swing/JColorChooser/TestDisabledColorChooser.java JBR-8748 linux-all
|
javax/swing/JColorChooser/TestDisabledColorChooser.java JBR-8748 linux-all
|
||||||
javax/swing/JComboBox/6559152/bug6559152.java JBR-8807 linux-all
|
javax/swing/JComboBox/6559152/bug6559152.java JBR-8807 linux-all
|
||||||
|
javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java JBR-8808 linux-all
|
||||||
javax/swing/JEditorPane/4666101/JEditorPaneNavigationTest.java JBR-8558 linux-all
|
javax/swing/JEditorPane/4666101/JEditorPaneNavigationTest.java JBR-8558 linux-all
|
||||||
|
javax/swing/JEditorPane/6917744/bug6917744.java JBR-9620 linux-all
|
||||||
|
javax/swing/JFileChooser/4400728/JFileChooserDefaultDirectoryTest.java JBR-6905 linux-all
|
||||||
javax/swing/JFileChooser/8013442/Test8013442.java JBR-8748 linux-all
|
javax/swing/JFileChooser/8013442/Test8013442.java JBR-8748 linux-all
|
||||||
|
javax/swing/JFileChooser/FileChooserDisableTest.java JBR-8809 linux-all
|
||||||
|
javax/swing/JFileChooser/FileViewNPETest.java JBR-6906 linux-all
|
||||||
|
javax/swing/JFileChooser/JFileChooserFontReset.java JBR-9621 linux-all
|
||||||
javax/swing/JFrame/JFrameBackgroundRefreshTest.java JBR-7471 linux-all
|
javax/swing/JFrame/JFrameBackgroundRefreshTest.java JBR-7471 linux-all
|
||||||
javax/swing/JInternalFrame/4769772/TestJInternalFrameIconify.java JBR-8748 linux-all
|
javax/swing/JInternalFrame/4769772/TestJInternalFrameIconify.java JBR-8748 linux-all
|
||||||
javax/swing/JInternalFrame/8075314/bug8075314.java JBR-8748 linux-all
|
javax/swing/JInternalFrame/8075314/bug8075314.java JBR-8748 linux-all
|
||||||
javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java JBR-8748 linux-all
|
javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java JBR-8748 linux-all
|
||||||
javax/swing/JInternalFrame/bug5009724.java JBR-8748 linux-all
|
javax/swing/JInternalFrame/bug5009724.java JBR-8748 linux-all
|
||||||
|
javax/swing/JInternalFrame/NormalBoundsTest.java JBR-9622 linux-all
|
||||||
javax/swing/JList/BasicListTest.java JBR-8748 linux-all
|
javax/swing/JList/BasicListTest.java JBR-8748 linux-all
|
||||||
javax/swing/JList/ListSelectionModelTest.java JBR-8748 linux-all
|
javax/swing/JList/ListSelectionModelTest.java JBR-8748 linux-all
|
||||||
|
javax/swing/JMenu/bug4146588.java JBR-9132 linux-all
|
||||||
javax/swing/JMenu/TestDisabledMenuForegroundColor.java JBR-8748 linux-all
|
javax/swing/JMenu/TestDisabledMenuForegroundColor.java JBR-8748 linux-all
|
||||||
javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java JBR-8748 linux-all
|
javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java JBR-8748 linux-all
|
||||||
javax/swing/JMenuBar/TestMenuMnemonicLinuxAndMac.java JBR-8748 linux-all
|
javax/swing/JMenuBar/TestMenuMnemonicLinuxAndMac.java JBR-8748 linux-all
|
||||||
|
javax/swing/JMenuItem/bug4327146.java JBR-9623 linux-all
|
||||||
javax/swing/JPasswordField/TestDisabledPasswordFieldForegroundColor.java JBR-8748 linux-all
|
javax/swing/JPasswordField/TestDisabledPasswordFieldForegroundColor.java JBR-8748 linux-all
|
||||||
|
javax/swing/JPopupMenu/bug4187004.java JBR-9625 linux-all
|
||||||
|
javax/swing/JPopupMenu/MouseDragPopupTest.java JBR-9624 linux-all
|
||||||
|
javax/swing/JRadioButton/4314194/bug4314194.java JBR-9626 linux-all
|
||||||
javax/swing/JRadioButton/8033699/bug8033699.java JBR-8748 linux-all
|
javax/swing/JRadioButton/8033699/bug8033699.java JBR-8748 linux-all
|
||||||
javax/swing/JRadioButton/bug4823809.java JBR-7788 linux-all
|
javax/swing/JRadioButton/bug4823809.java JBR-7788 linux-all
|
||||||
javax/swing/JRootPane/SilenceOfDeprecatedMenuBar/SilenceOfDeprecatedMenuBar.java JBR-8748 linux-all
|
javax/swing/JRootPane/SilenceOfDeprecatedMenuBar/SilenceOfDeprecatedMenuBar.java JBR-8748 linux-all
|
||||||
javax/swing/JScrollBar/7163696/Test7163696.java JBR-8748 linux-all
|
javax/swing/JScrollBar/7163696/Test7163696.java JBR-8748 linux-all
|
||||||
|
javax/swing/JScrollBar/bug4202954/bug4202954.java JBR-9627 linux-all
|
||||||
|
javax/swing/JScrollPane/HorizontalMouseWheelOnShiftPressed/HorizontalMouseWheelOnShiftPressed.java JBR-9628 linux-all
|
||||||
javax/swing/JSlider/6794831/bug6794831.java JBR-8748 linux-all
|
javax/swing/JSlider/6794831/bug6794831.java JBR-8748 linux-all
|
||||||
javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java JBR-8748 linux-all
|
javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java JBR-8748 linux-all
|
||||||
javax/swing/JSpinner/4670051/DateFieldUnderCursorTest.java JBR-8748 linux-all
|
javax/swing/JSpinner/4670051/DateFieldUnderCursorTest.java JBR-8748 linux-all
|
||||||
@@ -78,18 +93,43 @@ javax/swing/JSpinner/WrongEditorTextFieldFont/FontByDefault.java JBR-8748 linux-
|
|||||||
javax/swing/JSpinner/WrongEditorTextFieldFont/FontSetByUser.java JBR-8748 linux-all
|
javax/swing/JSpinner/WrongEditorTextFieldFont/FontSetByUser.java JBR-8748 linux-all
|
||||||
javax/swing/JSpinner/WrongEditorTextFieldFont/FontSetToNull.java JBR-8748 linux-all
|
javax/swing/JSpinner/WrongEditorTextFieldFont/FontSetToNull.java JBR-8748 linux-all
|
||||||
javax/swing/JTabbedPane/7024235/Test7024235.java JBR-8748 linux-all
|
javax/swing/JTabbedPane/7024235/Test7024235.java JBR-8748 linux-all
|
||||||
|
javax/swing/JTabbedPane/bug4273320.java JBR-9629 linux-all
|
||||||
javax/swing/JTabbedPane/TabProb.java JBR-8748 linux-all
|
javax/swing/JTabbedPane/TabProb.java JBR-8748 linux-all
|
||||||
|
javax/swing/JTable/6263446/bug6263446.java JBR-9630 linux-all
|
||||||
|
javax/swing/JTable/TestJTableGridReset.java JBR-9662 linux-all
|
||||||
javax/swing/JTextArea/4697612/bug4697612.java JBR-8748 linux-all
|
javax/swing/JTextArea/4697612/bug4697612.java JBR-8748 linux-all
|
||||||
|
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java JBR-9663 linux-all
|
||||||
|
javax/swing/JTextArea/JTextAreaOrientationTest.java JBR-9664 linux-all
|
||||||
|
javax/swing/JTextArea/JTextAreaWordWrapTest.java JBR-9665 linux-all
|
||||||
|
javax/swing/JTextField/4532513/DefaultCaretRequestsFocusTest.java JBR-9666 linux-all
|
||||||
|
javax/swing/JTextPane/JTextPaneDocumentWrapping.java JBR-9667 linux-all
|
||||||
|
javax/swing/JTree/4518432/JTreeNodeCopyPasteTest.java JBR-9668 linux-all
|
||||||
|
javax/swing/JTree/6263446/bug6263446.java JBR-9669 linux-all
|
||||||
javax/swing/JTree/8003400/Test8003400.java JBR-8748 linux-all
|
javax/swing/JTree/8003400/Test8003400.java JBR-8748 linux-all
|
||||||
javax/swing/JTree/TestTreeBackgroundColor.java JBR-8748 linux-all
|
javax/swing/JTree/TestTreeBackgroundColor.java JBR-8748 linux-all
|
||||||
javax/swing/LookAndFeel/8145547/DemandGTK.java JBR-8748 linux-all
|
javax/swing/LookAndFeel/8145547/DemandGTK.java JBR-8748 linux-all
|
||||||
|
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-9202 linux-all
|
||||||
javax/swing/LookAndFeel/8146276/NimbusGlueTest.java JBR-8748 linux-all
|
javax/swing/LookAndFeel/8146276/NimbusGlueTest.java JBR-8748 linux-all
|
||||||
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java JBR-8748 linux-all
|
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java JBR-8748 linux-all
|
||||||
|
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-9673 linux-all
|
||||||
|
javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java JBR-9675 linux-all
|
||||||
|
javax/swing/plaf/basic/BasicHTML/bug4248210.java JBR-9674 linux-all
|
||||||
javax/swing/plaf/gtk/JTableCtrlShiftRightLeftKeyTest.java JBR-8748 linux-all
|
javax/swing/plaf/gtk/JTableCtrlShiftRightLeftKeyTest.java JBR-8748 linux-all
|
||||||
|
javax/swing/plaf/nimbus/8057791/bug8057791.java JBR-9676 linux-all
|
||||||
javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java JBR-8748 linux-all
|
javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java JBR-8748 linux-all
|
||||||
javax/swing/plaf/synth/SynthToolBarUI/8136363/ComponentSetNameTest.java JBR-8748 linux-all
|
javax/swing/plaf/synth/SynthToolBarUI/8136363/ComponentSetNameTest.java JBR-8748 linux-all
|
||||||
|
javax/swing/text/FlowView/6318524/bug6318524.java JBR-9677 linux-all
|
||||||
|
javax/swing/text/html/CSS/4530474/bug4530474.java JBR-9681 linux-all
|
||||||
|
javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java JBR-9682 linux-all
|
||||||
|
javax/swing/text/html/parser/DTDTest.java JBR-8748 linux-all
|
||||||
javax/swing/text/html/StyleSheet/bug4476002.java JBR-7498 linux-aarch64
|
javax/swing/text/html/StyleSheet/bug4476002.java JBR-7498 linux-aarch64
|
||||||
javax/swing/text/JTextComponent/6361367/bug6361367.java JBR-8748 linux-all
|
javax/swing/text/JTextComponent/6361367/bug6361367.java JBR-8748 linux-all
|
||||||
|
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-9678 linux-all
|
||||||
|
javax/swing/text/StyledEditorKit/8016833/bug8016833.java JBR-9679 linux-all
|
||||||
|
javax/swing/text/Utilities/bug7045593.java JBR-9680 linux-all
|
||||||
|
javax/swing/tree/DefaultTreeCellEditor/bug4480602.java JBR-9683 linux-all
|
||||||
|
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-9670 linux-all
|
||||||
|
javax/swing/UIDefaults/6302464/bug6302464.java JBR-9671 linux-all
|
||||||
|
|
||||||
jb/build/ResolveSymbolsTest/ResolveSymbolsRealEnv.java JBR-8544 linux-all
|
jb/build/ResolveSymbolsTest/ResolveSymbolsRealEnv.java JBR-8544 linux-all
|
||||||
jb/java/awt/Toolkit/DetectingOSThemeTest.java JBR-9088 linux-all
|
jb/java/awt/Toolkit/DetectingOSThemeTest.java JBR-9088 linux-all
|
||||||
|
|||||||
@@ -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/FileDialog/8003399/bug8003399.java JBR-6930 windows-all
|
||||||
java/awt/FlowLayout/PreferredLayoutSize.java JBR-6349 linux-all
|
java/awt/FlowLayout/PreferredLayoutSize.java JBR-6349 linux-all
|
||||||
java/awt/Focus/EmptyWindowKeyTest.java JBR-7913 windows-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
|
||||||
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
|
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
|
||||||
java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java JBR-5178 windows-all
|
java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java JBR-5178 windows-all
|
||||||
java/awt/Focus/FocusTransitionTest/FocusTransitionTest.java JBR-5809 linux-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/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-all
|
||||||
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-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/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
|
||||||
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
|
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
|
||||||
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
|
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
|
||||||
java/awt/Focus/LabelScrollBarFocus.java JBR-8027 linux-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/grab/GrabOnUnfocusableToplevel/GrabOnUnfocusableToplevel.java JBR-4880 windows-all
|
||||||
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
|
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
|
||||||
java/awt/MenuBar/8007006/bug8007006.java JBR-9213 macosx-26.0
|
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-6.16.7-200.fc42.x86_64
|
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/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405,8253184 generic-all
|
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/MixingFrameResizing.java 8049405,8253184 generic-all
|
||||||
java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8294264 windows-x64
|
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/TranslucentChoice.java 8253184 windows-all
|
||||||
java/awt/Window/ShapedAndTranslucentWindows/TranslucentWindowClick.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/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-6.16.7-200.fc42.x86_64
|
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/MultiWindowAppTest.java 8253184,JBR-6463 windows-all,linux-all
|
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/FocusAWTTest.java 8222328 windows-all,linux-all,macosx-all
|
||||||
java/awt/Window/ShapedAndTranslucentWindows/Shaped.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/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184 windows-all
|
||||||
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
|
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
|
||||||
sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-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-6.16.7-200.fc42.x86_64
|
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/shell/ShellFolderMemoryLeak.java 8197794 windows-all
|
sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
|
||||||
sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8301177 generic-all
|
sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java 8301177 generic-all
|
||||||
sun/java2d/DirectX/OpaqueImageToSurfaceBlitTest/OpaqueImageToSurfaceBlitTest.java JBR-5393 windows-aarch64
|
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/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/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#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-6.16.7-200.fc42.x86_64
|
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-6.16.7-200.fc42.x86_64
|
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/Graphics2D/DrawString/DisposerTest.java JBR-5010 linux-aarch64
|
java/awt/Graphics2D/DrawString/DisposerTest.java JBR-5010 linux-aarch64
|
||||||
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
|
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
|
||||||
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8297175 linux-all
|
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8297175 linux-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/FocusTransferWDFNonModal2Test.java 8253184,8196432 windows-all,linux-all
|
||||||
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal3Test.java 8253184 windows-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/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-6.16.7-200.fc42.x86_64
|
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,linux-6.17.8-200.fc42.aarch64
|
||||||
java/awt/Modal/MultipleDialogs/MultipleDialogs1Test.java 8198665,8253184 macosx-all,windows-all
|
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/MultipleDialogs2Test.java 8198665,8253184 macosx-all,windows-all
|
||||||
java/awt/Modal/MultipleDialogs/MultipleDialogs3Test.java 8198665,8253184 macosx-all,windows-all,linux-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/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/DragWindowTest.java 8253184 windows-all
|
||||||
java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java 8253184,JBR-5811 windows-all,linux-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-6.16.7-200.fc42.x86_64
|
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/FullscreenEnterEventTest.java 8051455 macosx-all
|
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/ExtraMouseClick/ExtraMouseClick.java 8253184,JBR-5709 windows-all,linux-all
|
||||||
java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java 8253184,JBR-6752 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/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 linux-all,windows-all
|
||||||
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
|
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
|
||||||
java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java 8164473 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-6.16.7-200.fc42.x86_64
|
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-6.16.7-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/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223,8274106 macosx-all,linux-all,windows-all
|
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223,8274106 macosx-all,linux-all,windows-all
|
||||||
java/awt/GraphicsDevice/DisplayModes/ExtraAllocationTest.java JBR-6384 macosx-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/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/ListRepaint.java JBR-5060 linux-all
|
||||||
java/awt/Paint/PaintNativeOnUpdate.java 8253184 windows-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-6.16.7-200.fc42.x86_64
|
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/GridBagLayout/ComponentShortage.java 8355280 windows-all,linux-all
|
java/awt/GridBagLayout/ComponentShortage.java 8355280 windows-all,linux-all
|
||||||
java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java 8253184 windows-all
|
java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java 8253184 windows-all
|
||||||
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720,8322653 windows-all,macosx-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
|
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-6.16.7-200.fc42.x86_64
|
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-6.16.7-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-6.16.7-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/jmxremote/bootstrap/RmiSslNoKeyStoreTest.java JBR-8707 windows-all
|
sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.java JBR-8707 windows-all
|
||||||
sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id0 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/AsyncCloseAndInterrupt.java 8368290 macosx-26.0
|
||||||
java/nio/channels/AsynchronousSocketChannel/StressLoopback.java JBR-8817 windows-aarch64
|
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-6.16.7-200.fc42.x86_64
|
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/BasicMulticastTests.java 8144003 macosx-all
|
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-6.16.7-200.fc42.x86_64
|
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/ManySourcesAndTargets.java 8264385 macosx-aarch64
|
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-6.16.7-200.fc42.x86_64
|
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-6.16.7-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-6.16.7-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/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
|
||||||
java/nio/channels/DatagramChannel/Unref.java 8233437 generic-all
|
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-6.16.7-200.fc42.x86_64
|
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/Selector/LotsOfInterrupts.java#virtual JBR-8940 windows-aarch64
|
java/nio/channels/Selector/LotsOfInterrupts.java#virtual JBR-8940 windows-aarch64
|
||||||
java/nio/channels/Selector/Wakeup.java 6963118 windows-all
|
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/DefaultButtonModel/DefaultButtonModelCrashTest.java JBR-5210,JBR-5799 windows-all
|
||||||
javax/swing/dnd/7171812/bug7171812.java 8253184 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/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-6.16.7-200.fc42.x86_64
|
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/JButton/4368790/bug4368790.java JBR-5210 windows-all
|
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/4659800/SpaceKeyActivatesButton.java JBR-4949 linux-all,windows-all
|
||||||
javax/swing/JButton/8151303/PressedIconTest.java JBR-5210 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/MaximizeWindowTest.java 8321289,JBR-8292 linux-all
|
||||||
javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java JBR-8837 macosx-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/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-6.16.7-200.fc42.x86_64,windows-10.0
|
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/7004134/bug7004134.java JBR-5437 linux-all
|
javax/swing/JLabel/7004134/bug7004134.java JBR-5437 linux-all
|
||||||
javax/swing/JLabel/bug4822331.java JBR-7422 windows-all
|
javax/swing/JLabel/bug4822331.java JBR-7422 windows-all
|
||||||
javax/swing/JList/6462008/bug6462008.java JBR-8063 windows-all
|
javax/swing/JList/6462008/bug6462008.java JBR-8063 windows-all
|
||||||
@@ -1091,7 +1091,7 @@ javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java JBR-5799,JBR-6306 windo
|
|||||||
javax/swing/JMenu/bug4140643.java JBR-8489 windows-all
|
javax/swing/JMenu/bug4140643.java JBR-8489 windows-all
|
||||||
javax/swing/JMenu/PopupReferenceMemoryLeak.java JBR-5890,JBR-6056 windows-aarch64,windows-x64
|
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/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-6.16.7-200.fc42.x86_64
|
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/JMenuBar/4750590/bug4750590.java JBR-6094 windows-all
|
||||||
javax/swing/JMenuItem/4171437/bug4171437.java JBR-6112 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
|
javax/swing/JMenuItem/4654927/bug4654927.java JBR-164,JBR-4337 windows-all,linux-all
|
||||||
@@ -1147,7 +1147,7 @@ javax/swing/JFormattedTextField/bug4863121.java JBR-7424 windows-all
|
|||||||
javax/swing/JFrame/8016356/bug8016356.java JBR-108 windows-all
|
javax/swing/JFrame/8016356/bug8016356.java JBR-108 windows-all
|
||||||
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8274106 macosx-aarch64
|
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8274106 macosx-aarch64
|
||||||
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956,JBR-6533 macosx-all,linux-all,windows-all
|
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956,JBR-6533 macosx-all,linux-all,windows-all
|
||||||
javax/swing/JSlider/bug4382876.java JBR-8666 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.16.7-100.fc41.x86_64
|
javax/swing/JSlider/bug4382876.java JBR-8666 linux-all
|
||||||
javax/swing/JScrollBar/4708809/bug4708809.java 8169957 windows-x64
|
javax/swing/JScrollBar/4708809/bug4708809.java 8169957 windows-x64
|
||||||
javax/swing/JTabbedPane/4361477/bug4361477.java JBR-5932 linux-all
|
javax/swing/JTabbedPane/4361477/bug4361477.java JBR-5932 linux-all
|
||||||
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922,JBR-6235,JBR-9518 macosx-all,linux-all,windows-all
|
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922,JBR-6235,JBR-9518 macosx-all,linux-all,windows-all
|
||||||
@@ -1156,9 +1156,10 @@ javax/swing/JTabbedPane/TestJTabbedPaneBackgroundColor.java JBR-8493 macosx-15.4
|
|||||||
javax/swing/JToggleButton/TestSelectedKey.java JBR-5846 windows-all
|
javax/swing/JToggleButton/TestSelectedKey.java JBR-5846 windows-all
|
||||||
javax/swing/JToolBar/4529206/bug4529206.java JBR-5387 linux-all
|
javax/swing/JToolBar/4529206/bug4529206.java JBR-5387 linux-all
|
||||||
javax/swing/JToolTip/6219960/bug6219960.java 8253184 windows-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-6.16.7-200.fc42.x86_64
|
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/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/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/TableView/TableViewLayoutTest.java 8194936,JBR-4316 linux-all
|
javax/swing/text/TableView/TableViewLayoutTest.java 8194936,JBR-4316 linux-all
|
||||||
javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
|
javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
|
||||||
javax/swing/JComboBox/4515752/DefaultButtonTest.java JBR-5799 windows-all
|
javax/swing/JComboBox/4515752/DefaultButtonTest.java JBR-5799 windows-all
|
||||||
@@ -1171,8 +1172,9 @@ javax/swing/JInternalFrame/6288609/TestJInternalFrameDispose.java JBR-788 window
|
|||||||
javax/swing/JInternalFrame/6647340/bug6647340.java 8253184 windows-all
|
javax/swing/JInternalFrame/6647340/bug6647340.java 8253184 windows-all
|
||||||
javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java JBR-788 windows-all,linux-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/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-6.16.7-200.fc42.x86_64
|
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/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-6.16.7-200.fc42.x86_64
|
|
||||||
|
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/Test6505027.java JBR-5954 linux-all,macosx-all
|
javax/swing/JInternalFrame/Test6505027.java JBR-5954 linux-all,macosx-all
|
||||||
javax/swing/JInternalFrame/Test6802868.java 8253184 windows-all
|
javax/swing/JInternalFrame/Test6802868.java 8253184 windows-all
|
||||||
javax/swing/JPopupMenu/4634626/bug4634626.java 8253184 windows-all
|
javax/swing/JPopupMenu/4634626/bug4634626.java 8253184 windows-all
|
||||||
@@ -1208,7 +1210,7 @@ java/awt/Robot/CheckCommonColors/CheckCommonColors.java 8253184 windows-all
|
|||||||
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.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/HiDPIScreenCapture/ScreenCaptureTest.java 8253184 windows-all
|
||||||
java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java JBR-5802 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-6.16.7-200.fc42.x86_64
|
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
|
||||||
|
|
||||||
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
|
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
|
||||||
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312 windows-all,macosx-all
|
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312 windows-all,macosx-all
|
||||||
@@ -1347,7 +1349,7 @@ javax/swing/JFileChooser/6698013/bug6698013.java 8024419 macosx-all
|
|||||||
javax/swing/JColorChooser/8065098/bug8065098.java 8065647 macosx-all
|
javax/swing/JColorChooser/8065098/bug8065098.java 8065647 macosx-all
|
||||||
java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all
|
java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all
|
||||||
javax/swing/JTabbedPane/4666224/bug4666224.html 8144124 macosx-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-6.16.7-200.fc42.x86_64
|
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/7049024/bug7049024.java JBR-5836 linux-all
|
||||||
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java 8253184 windows-all
|
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java 8253184 windows-all
|
||||||
java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 8162380,JBR-4207 generic-all,windows-all
|
java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 8162380,JBR-4207 generic-all,windows-all
|
||||||
@@ -1475,7 +1477,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/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/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/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-6.16.7-200.fc42.x86_64
|
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
|
||||||
javax/swing/text/StyledEditorKit/bug4329418.java
|
javax/swing/text/StyledEditorKit/bug4329418.java
|
||||||
jb/java/jcef/HandleJSQueryTest3314.sh JBR-4866 linux-all
|
jb/java/jcef/HandleJSQueryTest3314.sh JBR-4866 linux-all
|
||||||
jb/java/jcef/HwFacadeWindowNoFrontTest.java JBR-6556 windows-all
|
jb/java/jcef/HwFacadeWindowNoFrontTest.java JBR-6556 windows-all
|
||||||
@@ -1498,7 +1500,7 @@ jb/javax/swing/JDialog/JDialog392.java JBR-4941 macosx-all,linux-all
|
|||||||
jb/javax/swing/JDialog/JDialog705.java JBR-4934 generic-all
|
jb/javax/swing/JDialog/JDialog705.java JBR-4934 generic-all
|
||||||
jb/javax/swing/JDialog/JDialog1054.java JBR-5004 macosx-all
|
jb/javax/swing/JDialog/JDialog1054.java JBR-5004 macosx-all
|
||||||
jb/javax/swing/JEditorPane/ZeroMargin.java JBR-2256 generic-all
|
jb/javax/swing/JEditorPane/ZeroMargin.java JBR-2256 generic-all
|
||||||
jb/javax/swing/JPopupMenu/JPopupMenuOutOfWindowTest.java JBR-6682 windows-all,linux-all
|
jb/javax/swing/JPopupMenu/JPopupMenuOutOfWindowTest.java JBR-6682 linux-all
|
||||||
|
|
||||||
jb/java/awt/Window/ModalDialogAndPopup.java JBR-4984 macosx-all
|
jb/java/awt/Window/ModalDialogAndPopup.java JBR-4984 macosx-all
|
||||||
|
|
||||||
@@ -1535,7 +1537,7 @@ javax/swing/JSpinner/4670051/DateFieldUnderCursorTest.java JBR-6684 generic-all
|
|||||||
jb/java/awt/Focus/BrokenTraversalAWT.java JBR-5799 windows-all
|
jb/java/awt/Focus/BrokenTraversalAWT.java JBR-5799 windows-all
|
||||||
jb/java/awt/Focus/ComplexFocusSequence.java JBR-6728 linux-all,windows-x64
|
jb/java/awt/Focus/ComplexFocusSequence.java JBR-6728 linux-all,windows-x64
|
||||||
jb/java/awt/Focus/ContextMenuAfterPopup.java JBR-5799 windows-all
|
jb/java/awt/Focus/ContextMenuAfterPopup.java JBR-5799 windows-all
|
||||||
jb/java/awt/Focus/FileDialogClosing.java JBR-5799,JBR-8309 windows-all,macosx-x64
|
jb/java/awt/Focus/FileDialogClosing.java JBR-5799,JBR-8309 windows-all,macosx-x64,linux-all
|
||||||
jb/java/awt/Focus/FocusTraversalOrderTest.java JBR-6060 generic-all
|
jb/java/awt/Focus/FocusTraversalOrderTest.java JBR-6060 generic-all
|
||||||
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-5799 windows-all
|
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-5799 windows-all
|
||||||
jb/java/awt/Focus/TitleBarClickTest.java JBR-6394 linux-5.18.2-arch1-1
|
jb/java/awt/Focus/TitleBarClickTest.java JBR-6394 linux-5.18.2-arch1-1
|
||||||
@@ -1543,7 +1545,7 @@ 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/bug6492108.java JBR-8021 linux-all
|
||||||
com/sun/java/swing/plaf/gtk/TestBackSpaceAction.java JBR-8570 linux-all
|
com/sun/java/swing/plaf/gtk/TestBackSpaceAction.java JBR-8570 linux-all
|
||||||
java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java JBR-5765 macosx-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-6.16.7-200.fc42.x86_64
|
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/font/DoubleAntialiasTest.java JBR-6760 linux-i386
|
||||||
java/awt/Paint/RepaintOnAWTShutdown.java JBR-6760 linux-i386
|
java/awt/Paint/RepaintOnAWTShutdown.java JBR-6760 linux-i386
|
||||||
|
|||||||
@@ -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/DragOverDropTargetPerformanceTest.java JBR-5799 windows-all
|
||||||
java/awt/dnd/DragSourceGCrashTest.java JBR-8745 linux-all
|
java/awt/dnd/DragSourceGCrashTest.java JBR-8745 linux-all
|
||||||
java/awt/dnd/InterJVMGetDropSuccessTest/InterJVMGetDropSuccessTest.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-6.16.7-200.fc42.x86_64
|
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,linux-6.17.8-200.fc42.aarch64
|
||||||
java/awt/Dialog/ChoiceModalDialogTest.java JBR-8724 windows-all
|
java/awt/Dialog/ChoiceModalDialogTest.java JBR-8724 windows-all
|
||||||
java/awt/dnd/MozillaDnDTest.java JBR-6442 linux-all
|
java/awt/dnd/MozillaDnDTest.java JBR-6442 linux-all
|
||||||
java/awt/event/ComponentEvent/TextComponentTextEventTest.java JBR-6287 windows-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/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/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/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-6.16.7-200.fc42.x86_64
|
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/NativeWin32Clear.java JBR-8730 windows-all
|
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/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
|
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/List/TriggerActionEventTest.java JBR-6234 windows-all
|
||||||
java/awt/MenuItem/SetLabelTest.java JBR-8731 windows-all
|
java/awt/MenuItem/SetLabelTest.java JBR-8731 windows-all
|
||||||
java/awt/MenuShortcut/ActionCommandTest.java JBR-8822 windows-10.0
|
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-6.16.7-200.fc42.x86_64
|
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/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405,JBR-6134 macosx-all,windows-all
|
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/JGlassPaneInternalFrameOverlapping.java JBR-6234 windows-all
|
||||||
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-6134 windows-all
|
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-6134 windows-all
|
||||||
java/awt/Mixing/MixingOnDialog.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/Modal/BlockedMouseInputTest2.java JBR-6090 windows-all
|
||||||
java/awt/Mouse/MouseEnterExitTest.java JBR-8096 linux-all,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-6.16.7-200.fc42.x86_64
|
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/MouseInfo/ContainerResizeMousePositionTest.java JBR-7881,JBR-7915,JBR-8746 macosx-all,linux-all
|
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/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/Robot/ScreenCaptureRobotTest.java#id0 JBR-8784 macosx-all
|
||||||
java/awt/Scrollbar/UnitIncrementTest.java JBR-8733 windows-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-6.16.7-200.fc42.x86_64
|
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/TextField/GetTextTest/GetTextTest.java JBR-8734 windows-all
|
java/awt/TextField/GetTextTest/GetTextTest.java JBR-8734 windows-all
|
||||||
java/awt/Window/AlwaysOnTop/SyncAlwaysOnTopFieldTest.java JBR-6845 linux-all
|
java/awt/Window/AlwaysOnTop/SyncAlwaysOnTopFieldTest.java JBR-6845 linux-all
|
||||||
java/awt/Window/TopLevelLocation/TopLevelLocation.java JBR-5799 windows-all
|
java/awt/Window/TopLevelLocation/TopLevelLocation.java JBR-5799 windows-all
|
||||||
@@ -70,13 +70,12 @@ javax/swing/JButton/bug4490179.java JBR-8925 windows-all
|
|||||||
javax/swing/JFileChooser/JFileChooserSetLocationTest.java JBR-8098 linux-all,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/JInternalFrame/4202966/IntFrameCoord.java JBR-9006 window-all
|
||||||
javax/swing/JMenu/bug4342646.java JBR-8727 linux-all,windows-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.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
|
||||||
javax/swing/JTable/JTableRightOrientationTest.java JBR-8102 linux-all,windows-all
|
javax/swing/JTable/JTableRightOrientationTest.java JBR-8102 linux-all,windows-all
|
||||||
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8747 linux-all
|
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8747 linux-all
|
||||||
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
|
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
|
||||||
|
|
||||||
jb/java/awt/event/MouseEvent/ReleaseAndClickModifiers.java JBR-6589 windows-all
|
jb/java/awt/event/MouseEvent/ReleaseAndClickModifiers.java JBR-6589 windows-all
|
||||||
jb/java/awt/Focus/FileDialogClosing.java JBR-5799,JBR-8309 windows-all,macosx-x64
|
|
||||||
jb/java/awt/Focus/ModalDialogOverSiblingTest.java JBR-5716 windows-all
|
jb/java/awt/Focus/ModalDialogOverSiblingTest.java JBR-5716 windows-all
|
||||||
jb/java/awt/Focus/PopupFromMenuTest.java JBR-5799 windows-all
|
jb/java/awt/Focus/PopupFromMenuTest.java JBR-5799 windows-all
|
||||||
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-2651 generic-all
|
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-2651 generic-all
|
||||||
@@ -138,7 +137,7 @@ java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java nobug generic
|
|||||||
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java nobug generic-all
|
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java nobug generic-all
|
||||||
java/awt/Robot/ScreenCaptureRobotTest.java#id1 nobug generic-all
|
java/awt/Robot/ScreenCaptureRobotTest.java#id1 nobug generic-all
|
||||||
java/awt/Toolkit/ScreenInsetsDPIVariation/ScreenInsetsDPIVariation.java 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-6.16.7-200.fc42.x86_64
|
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/Window/8159168/SetShapeTest.java nobug generic-all
|
java/awt/Window/8159168/SetShapeTest.java nobug generic-all
|
||||||
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java nobug generic-all
|
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java nobug generic-all
|
||||||
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java nobug generic-all
|
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java nobug generic-all
|
||||||
@@ -182,8 +181,8 @@ javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7965,JBR-8345 w
|
|||||||
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-8345 linux-all
|
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-8345 linux-all
|
||||||
javax/swing/JButton/TestGlyphBreak.java nobug generic-all
|
javax/swing/JButton/TestGlyphBreak.java nobug generic-all
|
||||||
javax/swing/JComboBox/6559152/bug6559152.java JBR-8964 windows-all
|
javax/swing/JComboBox/6559152/bug6559152.java JBR-8964 windows-all
|
||||||
javax/swing/JComboBox/8033069/bug8033069ScrollBar.java JBR-9583 windows-x64
|
javax/swing/JComboBox/8033069/bug8033069ScrollBar.java JBR-9583 windows-all
|
||||||
javax/swing/JComboBox/8033069/bug8033069NoScrollBar.java JBR-9342 windows-x64
|
javax/swing/JComboBox/8033069/bug8033069NoScrollBar.java JBR-9583 windows-all
|
||||||
javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java nobug generic-all
|
javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java nobug generic-all
|
||||||
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java nobug generic-all
|
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java nobug generic-all
|
||||||
javax/swing/JInternalFrame/8069348/bug8069348.java nobug generic-all
|
javax/swing/JInternalFrame/8069348/bug8069348.java nobug generic-all
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ java/awt/image/DrawImage/BlitRotateClippedArea.java JBR-9026 linux-all
|
|||||||
java/awt/image/DrawImage/EABlitTest.java JBR-9027 linux-all
|
java/awt/image/DrawImage/EABlitTest.java JBR-9027 linux-all
|
||||||
javax/swing/GraphicsConfigNotifier/StalePreferredSize.java JBR-9031 linux-all
|
javax/swing/GraphicsConfigNotifier/StalePreferredSize.java JBR-9031 linux-all
|
||||||
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-8266 linux-x64
|
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#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.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#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
|
||||||
javax/swing/JEditorPane/JEditorPaneFontFallback.java JBR-8305 linux-all
|
javax/swing/JEditorPane/JEditorPaneFontFallback.java JBR-8305 linux-all
|
||||||
javax/swing/JFormattedTextField/bug4741926.java JBR-9321 linux-6.14.9-arch1-1
|
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
|
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ java/awt/font/GlyphVector/LayoutCompatTest.java JBR-8262 linux-all
|
|||||||
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-7932 linux-all
|
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-7932 linux-all
|
||||||
java/awt/Multiscreen/MultiScreenCheckScreenIDTest.java JBR-8263 linux-x64
|
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
|
||||||
javax/swing/JDesktopPane/TestDesktopManagerNPE.java JBR-8449 linux-x64
|
javax/swing/JDesktopPane/TestDesktopManagerNPE.java JBR-8449 linux-x64
|
||||||
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-8266 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/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.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#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.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/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.14.9-arch1-1
|
||||||
javax/swing/JEditorPane/JEditorPaneFontFallback.java JBR-8305 linux-all
|
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/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/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-8790 linux-all
|
||||||
|
|||||||
Reference in New Issue
Block a user