Commit Graph

78653 Commits

Author SHA1 Message Date
Maxim Kartashev
7c9047bc6a JBR-9730 Wayland: to add a secondary expression in assertions jb21.0.9-b1244 2025-12-03 12:58:03 +04:00
Maxim Kartashev
dba8f4b205 JBR-9733 Wayland: enable unconstrained popup positioning
Use getRootPane()
.putClientProperty("wlawt.popup_position_unconstrained", Boolean.TRUE)
to enable unconstrained popup positioning.
2025-12-03 12:54:55 +04:00
Maxim Kartashev
e15aa58463 JBR-9728 Wayland: AssertionError in WLGraphicsDevice. 2025-12-03 12:50:27 +04:00
Maxim Kartashev
25e1e78313 JBR-9727 Wayland: assertion error in ShadowImpl.updateSurfaceData jb21.0.9-b1243 2025-12-02 12:46:20 +04:00
Vitaly Provodin
6efade4ca2 fixup! JBR-9713: Mouse back and forth (Button4 / Button 5) no longer works on Linux in the 2025.2.5 version
JBR-9714: Horizontal scroll stopped working after 2025.2.5 update
       JBR-9715: Horizontal touchpad scroll stopped working after 2025.2.5 updateSome adjustments of the test after the code review.

Adding a manual test for mouse back and forth buttons.

(cherry picked from commit 5c375c4984)
(cherry picked from commit 39f3fb5d7c)
jb21.0.9-b1242
2025-12-01 15:22:52 +01:00
Nikita Provotorov
3355214b43 JBR-9719: Wayland: input methods in Speed search don't work if WLInputMethodZwpTextInputV3 logger is enabled
Resetting the text iterator of each InputMethodEvent after it gets logged.
jb21.0.9-b1241 jb21.0.9-b1241.41 jb21.0.9-b1241.11 jb21.0.9-b1241.10 jb21.0.9-b1241.14 jb21.0.9-b1241.13
2025-11-28 18:49:43 +01:00
Nikita Provotorov
caf64eeea4 JBR-9713: Mouse back and forth (Button4 / Button 5) no longer works on Linux in the 2025.2.5 version
JBR-9714: Horizontal scroll stopped working after 2025.2.5 update
JBR-9715: Horizontal touchpad scroll stopped working after 2025.2.5 update

Disabling the part of JDK-8351907 that disables all mouse extra buttons for XWayland GNOME of version >= 47.
jb21.0.9-b1239 jb21.0.9-b1240
2025-11-27 15:48:11 +01:00
Maxim Kartashev
012fce5a52 JBR-9672 Wayland: popup focus broken in Plasma 6.5.2, with Focus Stealing prevention >= Medium 2025-11-27 17:35:50 +04:00
Nikita Tsarev
99c7cca858 JBR-9483 Wayland: Support toplevel icons
This patch implements support for the xdg_toplevel_icon_v1 protocol.
The image choosing logic is just to pick the largest square image for
now. The image scale factor is also not set, since it's unclear if it's
needed and how it interacts with multi-monitor setups.

NOTE: this patch introduces a dependency on wayland-protocols 1.37+.
2025-11-27 11:38:17 +01:00
Vladimir Lagunov
032ef727d6 JBR-9531 Prevent unexpected recursive usage of java.io over nio wrappers
Shortly said, we don't need to handle recursive invocations of the `java.io` to nio adapters, while this recursion leads to problems.

# Problem

Since we're not allowed to modify public API of Java classes, an unreliable workaround `IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL` had been introduced. This trick lets us pass some object into a called function without adding a new function argument.

The trick backfired at the following code:

```java
// at java.base/java.io.IoOverNioFileSystem.initializeStreamUsingNio (simplified code)
IoOverNio.PARENT_FOR_FILE_CHANNEL_IMPL.set(owner);
return initializeStreamsUsingNio0(owner, nioFs, file, nioPath, optionsForChannel, channelCleanable);

// at java.base/java.io.IoOverNioFileSystem.initializeStreamsUsingNio0
channel = nioFs.provider().newFileChannel(nioPath, optionsForChannel);
```

The intention of setting `PARENT_FOR_FILE_CHANNEL_IMPL` is to path `owner` inside a constructor of `sun.nio.ch.FileChannelImpl` which may be called by `newFileChannel(nioPath, optionsForChannel)`.

The implementation of `newFileChannel` in IntelliJ triggered class loading. The classloader of IntelliJ triggered the call `java.nio.file.Files.readAllBytes`. The latter code also invoked the constructor of `FileChannelImpl`, and the constructor got from the thread-local variable the value for the field `parent`. That value was supposed to be passed to a different invocation of the constructor.

The observable result of this bug was a `NullPointerExceptions` from `java.io.FileOutputStream.close`. Hypothetically, this bug could also lead to closing file descriptors earlier as expected in other unpredictable places.

# Rejected approaches

* The cleanest solution could be passing specific function arguments through function arguments.

  However, we may neither create a new public function in the module `java.base`, nor add an argument to an existing one. Thus, we have to keep dealing with thread-local variables.
* To hold several values in the thread-local variable.

  In this case, the constructor of `FileChannelImpl` should somehow choose the right value from the list. The only possible way for filtering values is by the provided path. It doesn't look like a performant and reliable solution.

# Chosen solution

This commit disables recursive invocations of `java.io` from `java.nio` adapters.

The chosen solution is tied to specifics of IntelliJ. The reason for introducing java.io over java.nio adapter was to be able to access files from remote machines without rewriting old code. It is not expected that an implementation of `java.nio.file.spi.FileSystemProvider` accesses the file system using `java.io`. The only imaginable way to get a `java.io` call from `java.nio` is class loading. In case of IntelliJ, it's assumed that the class loader never accesses classes and jars from a remote machine.
jb21.0.9-b1238
2025-11-26 10:10:37 +00:00
Vitaly Provodin
8c39fda3b3 update exclude list on results of 21.0.9_b1236.39 test runs jb21.0.9-b1237 2025-11-25 12:22:14 +04:00
Maxim Kartashev
02fce8b388 JBR-9656 Wayland: toFront() does not work on KDE Plasma 6.5.2
KWin does not accept the serial number from a "keyboard enter" event in
a window activation request, while a recent input event serial is OK.
Gnome, however, requires the "keyboard enter" event serial.
jb21.0.9-b1236 jb21.0.9-b1236.39
2025-11-21 12:24:24 +04:00
Maxim Kartashev
873cf24118 JBR-6187 Wayland: implement server-side decoration support
Use -Dsun.awt.wl.WindowDecorationStyle=server to activate
2025-11-20 14:42:38 +04:00
Vitaly Provodin
eeff7d8c3e update exclude list on results of 21.0.9_b1224.17 test runs 2025-11-20 12:37:50 +04:00
Nikita Tsarev
9af54a39a2 JBR-9642 Wayland: Call wl_data_offer.finish()
This patch adds a call to wl_data_offer.finish() upon a successful
completion of a drag-and-drop operation, as well as more synchronized
annotations in WLDataOffer, to match the existing ones.

Calling finish() doesn't seem to be required by most compositors when
performing drag-and-drop, at least within the same window. Other
toolkits, such as Qt, only call it when dealing with cross-application
drag-and-drop. In the interest of maximal compatibility, this patch
implements calling finish() always when a drag-and-drop operation
succeeds.
2025-11-18 10:14:02 +01:00
Nikita Gubarkov
b74c107e24 JBR-9640 Add CHECK_EXCEPTION to CGraphicsDevice.nativeGetDisplayConfiguration 2025-11-17 16:13:36 +01:00
Nikita Tsarev
90272b1185 JBR-9581 Wayland: Find xkbcommon at configure time
This commit changes how WLToolkit loads libxkbcommon. It will now be
linked as a normal dynamic library at build time, instead of being
loaded via dlopen. This commit also introduces dependency on
libxkbcommon headers and removes the corresponding declarations from
WLKeyboard.c.
2025-11-17 10:24:09 +01:00
Nikita Provotorov
14f1fa27f7 JBR-9616: JBR can't be built on Windows: "LAUNCHER_ARGS must be defined".
fixup! JRE-681 [windows] direct drawing into frame graphics may have wrong translate

Using LIBAWT_EXTRA_HEADER_DIRS instead of LIBAWT_EXTRA_SRC to get src/java.base/windows/native/launcher/java_rc.h discoverable by src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp.
jb21.0.9-b1224 jb21.0.9-b1224.17
2025-11-14 16:50:46 +01:00
Nikita Tsarev
ead08a5ac7 JBR-9591 Wayland: Fix wrong DnD action on KWin
This patch implements a workaround for a bug that exists on KWin 6.5. For
some reason, KWin sends a wl_data_source.action(0) event immediately
after wl_data_source.dnd_drop_finished(). This makes the drag source
think that the DnD operation failed, even though it succeeded.
The workaround it to ignore the wl_data_source.action() events
after a successful wl_data_source.dnd_drop_finished()

In addition to this, this patch also fixes some inconsistency with
translating between AWT and Wayland DnD operation masks. This doesn't
have any visible effect though, since the mask values happen to be the
same.
2025-11-14 16:16:02 +01:00
Maxim Kartashev
bd00d5004a JBR-9598 Wayland: auto-detect Wayland session at startup
Adds -Dawt.toolkit.name=auto to prefer WLToolkit over XToolkit when
available. The default is still XToolkit.
2025-11-14 14:13:44 +04:00
Maxim Kartashev
f76be2029b JBR-9608 Correct README.md to suggest contributing through OpenJDK jb21.0.9-b1223 2025-11-13 15:01:51 +04:00
Maxim Kartashev
94136bc6c0 JBR-9577 Extra info on JVM crash to the terminal jb21.0.9-b1221 2025-11-13 12:29:21 +04:00
Nikita Gubarkov
68e3130f27 JBR-9505 Vulkan: Remove sun.java2d.vulkan.accelsd from tests
(cherry picked from commit 3fb012e9dd)
jb21.0.9-b1220
2025-11-12 17:42:29 +01:00
Vitaly Provodin
9482bde921 update exclude list on results of 21.0.9_b1210.16 test runs 2025-11-12 12:49:39 +04:00
Vladimir Dvorak
4181d4a2ed JBR-9548 DCEVM: Ensure updated class versions in dictionary in doit() jb21.0.9-b1217 2025-11-11 20:31:15 +01:00
Dmitry Drobotov
96fcd9e591 JBR-9580 Fix crash in [MenuAccessibility accessibilityChildren]
* Add null checks for variables that can have null values to prevent hard crash
* Add missing CHECK_EXCEPTION after JNI call
* Add missing DeleteLocalRef for axComponent
2025-11-11 20:22:27 +01:00
Sergey Shelomentsev
51486e5db9 JBR-9610 Set TimerQueue thread exclusion for BugJBR9563.java jb21.0.9-b1215 2025-11-11 11:37:55 +02:00
bourgesl
f82524264f JBR-9609 JBR Metal compilation error on Intel MacBooks
Wrapped MTLDrawable.drawableID usages in getDrawableId to check macOS version
2025-11-11 09:53:52 +01:00
Nikita Gubarkov
a2f1f770b0 JBR-9595 privilegedExecuteOnAppKit in CGraphicsDevice.DisplayConfiguration.get jb21.0.9-b1213 2025-11-10 10:38:41 +01:00
Nikita Gubarkov
cf54467435 JBR-5594 Pass display configuration from outside on full display update jb21.0.9-b1212 jb21.0.9-b1210.14 2025-11-06 13:32:17 +01:00
Nikita Gubarkov
f8a16fceeb JBR-5594 Pass display configuration info from AppKit to EDT 2025-11-06 13:32:17 +01:00
bourgesl
5d6b828de2 JBR-8651 Pycharm Crashing after lock/sleep: SIGABRT at # C [libsystem_kernel.dylib+0x9388] __pthread_kill / __displaycb_handle_block_invoke
Minimal changes for JBR-21: added @try/&@catch(nsexception) in ThreadUtilities.processQueuedCallbacks() to handle any native or java exception and avoid crashing the main run loop
jb21.0.9-b1208
2025-11-05 22:40:03 +01:00
bourgesl
7d624276d9 Revert "JBR-8651 Pycharm Crashing after lock/sleep: SIGABRT at # C [libsystem_kernel.dylib+0x9388] __pthread_kill / __displaycb_handle_block_invoke"
This reverts commit 59a257c03c.
2025-11-05 22:39:41 +01:00
bourgesl
cf0376f5d4 Revert "JBR-8651 remove logging producing warnings in stderr"
This reverts commit 0a9db6d343.
2025-11-05 22:39:41 +01:00
Nikita Tsarev
0ada9922df JBR-9542 Wayland: Fix modifier mask on modifier key press/release
When pressing a modifier key such as Shift or Alt, other toolkits
include the corresponding bit in the modifier mask. Similiarly, when
releasing a modifier key, other toolkits will not include this bit if
the just released modifier key was the last key producing this bit.

When pressing such a key, Wayland compositors first send the
wl_keyboard.key event, and only then the wl_keyboard.modifiers event.
This causes the reported AWT modifier mask to be inconsistent with
XToolkit. This patch fixes this.
2025-11-05 17:15:45 +01:00
Sergey Shelomentsev
9661606608 JBR-9563 Add test to verify that new threads aren't spawned infinitely 2025-11-05 13:15:18 +02:00
Vitaly Provodin
0a9db6d343 JBR-8651 remove logging producing warnings in stderr jb21.0.9-b1204 jb21.0.9-b1202 jb21.0.9-b1203 2025-11-01 16:08:51 +01:00
bourgesl
59a257c03c JBR-8651 Pycharm Crashing after lock/sleep: SIGABRT at # C [libsystem_kernel.dylib+0x9388] __pthread_kill / __displaycb_handle_block_invoke
Rewritten exception handling to adopt the improved NSApplicationAWT exception handler (log all exceptions, avoid crash GUI)
Fixed JNI_COCOA_EXIT(env) usages to test also pending JNI exceptions
Added JNI_COCOA_EXIT_FATAL(message) used by NSApplicationAWT.sendEvent to report a crash with full details
Unified logException to report both crash and exceptions
Added isAWTCrashOnException() using the system property 'apple.awt.crashOnException' to crash on any exception occuring in NSApplication level
Added missing CHECK_EXCEPTION after (*env)->Call...Method()
Intercept all exception in NSApplicationAWT as NSExceptionHandlerDelegate + added tests in LWCToolkit (native) and Java code to test all exceptions are reported in logs and caught properly

(cherry picked from commit 8664158b6d)

# Conflicts:
#	src/java.desktop/macosx/native/libawt_lwawt/awt/ApplicationDelegate.m
#	src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLContext.m
#	src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m
jb21.0.9-b1201
2025-10-31 17:16:42 +01:00
Vitaly Provodin
33fc6d2e2b JBR-9535 add doPrivileged for isXrandrExtensionSupported jb21.0.9-b1200 2025-10-31 01:21:47 +04:00
Vitaly Provodin
3a54d187ad JBR-9388 add the test in regular runs on macOS26 to collect statistic jb21.0.9-b1198 2025-10-29 14:29:56 +04:00
Nikita Tsarev
f18eb03bde JBR-9547: Fix macOS build failure with Xcode 26.0.1 jb21.0.9-b1194 2025-10-28 12:48:35 +01:00
Vitaly Provodin
8dabe0cda1 fixup! update exclude list on results of 21.0.9 test runs 2025-10-28 14:58:28 +04:00
Vitaly Provodin
27ab434aea update exclude list on results of 21.0.9_b1191.7 test runs 2025-10-28 14:58:28 +04:00
Matthias Baesken
d5c69797e2 8350103: Test containers/systemd/SystemdMemoryAwarenessTest.java fails on Linux ppc64le SLES15 SP6
Co-authored-by: Severin Gehwolf <sgehwolf@openjdk.org>
Reviewed-by: sgehwolf, asteiner
2025-10-28 14:58:28 +04:00
Damon Nguyen
86e42a6e0b 8354873: javax/swing/plaf/metal/MetalIconFactory/bug4952462.java failing on CI
Reviewed-by: honkar
2025-10-28 14:58:28 +04:00
Vitaly Provodin
9e5e2d3803 fixup! update exclude list on results of 21.0.9_b1173.6 test runs 2025-10-28 14:58:28 +04:00
Vitaly Provodin
0a1353f3e8 update exclude list on results of 21.0.9_b1173.6 test runs jb21.0.9-b1191 jb21.0.9-b1192 2025-10-25 02:53:17 +04:00
Vitaly Provodin
d8481406c3 update exclude list on results of 21.0.9 test runs 2025-10-25 02:53:16 +04:00
Nibedita Jena
9cebcc95b5 8360937: Enhance certificate handling jbr-21.0.9+10 2025-10-25 02:53:16 +04:00
Aleksei Voitylov
c0cc9e60c0 8359454: Enhance String handling 2025-10-25 02:53:16 +04:00