3742 Commits

Author SHA1 Message Date
Anton Shangareev
2a88cbe4cf JBR-8947 Reimplement CArrayUtils in a MSVC-compatible way 2025-12-06 01:03:49 +01:00
Nikita Tsarev
5f3db1e190 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-12-06 01:03:49 +01:00
Maxim Kartashev
dcec46b442 JBR-6187 Wayland: implement server-side decoration support
Use -Dsun.awt.wl.WindowDecorationStyle=server to activate
2025-12-06 01:03:48 +01:00
Dmitrii Morskii
47a88f7a01 JBR-5844: fixed other part of issue. Added missing implementation of native methods in fontconfigmanager
(cherry picked from commit dbd70b4401)
2025-12-06 01:03:46 +01:00
Nikita Tsarev
197cf3ff56 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-12-06 01:03:46 +01:00
Nikita Tsarev
b831a14938 JBR-9547: Fix macOS build failure with Xcode 26.0.1 2025-12-06 01:03:45 +01:00
Nikita Gubarkov
2fcb775017 JBR-9477 JBR API: Update local artifact group 2025-12-06 01:03:44 +01:00
Nikita Provotorov
713574c328 JBR-5672: Wayland: support input methods.
Providing support of the "text-input-unstable-v3" protocol, except its surrounding text API (zwp_text_input_v3::set_surrounding_text + zwp_text_input_v3::delete_surrounding_text).
A new system property "sun.awt.wl.im.enabled"[=true|false] is introduced to enable/disable all the integrations with Wayland's native input methods. Set to 'true' by default.

(cherry picked from commit 1c37490f00)
2025-12-06 01:03:44 +01:00
Nikita Gubarkov
4529314041 JBR-9450 Vulkan: Unify pipelines 2025-12-06 01:03:43 +01:00
Maxim Kartashev
5f30414a2a JBR-6990 Wayland: utilize relative-pointer-unstable-v1 protocol 2025-12-06 01:03:42 +01:00
Maxim Kartashev
1e88283b58 JBR-6979 Modernize more WaitForSingleObject on Windows
Use -XX:+UnlockExperimentalVMOptions -XX:-UseModernSynchAPI
to switch back to the original implementation
2025-12-06 01:03:41 +01:00
Dmitry Drobotov
a7d8f4f0bd JBR-4478 Implement support for native accessible caret events on Windows
The feature adds caret tracking support for assistive tools that don't work with Java Access Bridge, specifically, for the built-in Windows Magnifier.
It works by implementing Win32 IAccessible interface for the text caret, and sending EVENT_OBJECT_LOCATIONCHANGE events whenever it changes.
It's enabled by default and can be disabled by setting `sun.awt.windows.use.native.caret.accessibility.events` property to false.

(cherry picked from commit 88f1599bad)
(cherry picked from commit 3f6c1d54e10d49dc72f9d02f30e52f4aa32e099d)
2025-12-06 01:03:40 +01:00
Nikita Gubarkov
ab9048014f JBR-9236 Vulkan: Proper builds without Vulkan 2025-12-06 01:03:39 +01:00
Nikita Gubarkov
d537db6097 JBR-8810 Vulkan: Exclude native Vulkan files from vk=off builds 2025-12-06 01:03:38 +01:00
Vladimir Kharitonov
550bc36790 JBR-8992 fix com.jetbrains:jbr-api:SNAPSHOT pom file 2025-12-06 01:03:35 +01:00
Nikita Gubarkov
2530a877bc JBR-8601 Vulkan: Decouple from Wayland 2025-12-06 01:03:29 +01:00
Nikita Gubarkov
2b559b3904 JBR-8472 Vulkan: Respect source alpha type in blit routines 2025-12-06 01:03:27 +01:00
Vladimir Kharitonov
c334b35bf4 JBR-8118 TextureWrapperImage for MTLTexture 2025-12-06 01:03:23 +01:00
Nikita Gubarkov
f78e0f9240 JBR-8284 Vulkan: fix $VULKAN_SDK autoconf check. 2025-12-06 01:03:23 +01:00
Nikita Gubarkov
6d527fe559 Added Clion project setup
(cherry picked from commit db962149ec)
2025-12-06 01:03:21 +01:00
Nikita Gubarkov
5aec057a1e Updated IDEA project setup 2025-12-06 01:03:21 +01:00
Maxim Kartashev
cd2ca6a6f1 JBR-7969 Wayland: some popups misplaced when maximized with fractional scale 2025-12-06 01:03:18 +01:00
Maxim Kartashev
0b374585cc JBR-7663 Wayland: make gtk-shell1 protocol support optional
(cherry picked from commit 30e6c720b6)
2025-12-06 01:03:15 +01:00
Maxim Kartashev
596d3eea9a JBR-7663 Wayland: generate proxy code with wayland-scanner on the fly
(cherry picked from commit d599043b7d)
2025-12-06 01:03:15 +01:00
Maxim Kartashev
33a6568a03 JBR-7600 Provide ability to add messages to fatal error log
Use JNU_LOG_EVENT(env, msg, ...) to save a message in the internal
JVM ring buffer that gets printed out to the Events section
of the fatal error log if JVM crashed.

(cherry picked from commit 7a6184d309)
2025-12-06 01:03:10 +01:00
lbourges
7959ee8f53 JBR-7461: Implement VKTexturePool for the linux vulkan pipeline:
- based on common AccelTexturePool
 - new VKTexturePool instance in VKLogicalDevice
 - fixed SIGSEGV in VKImage dispose
 - store device in TPI
 - indentation fixes
 - merged with latest changes for JBR-7460
 - use (ATexturePoolLock_init)(void)
 - fixed logs in lock implementations + fixed indentation
 - fixed MTLTexturePool to pre-processor conditions (not runtime) on USE_ACCEL_TEXTURE_POOL

(cherry picked from commit 5515b0fbfc)
2025-12-06 01:03:08 +01:00
Nikita Gubarkov
0ca01a2a3b JBR-6543 Vulkan: migrate current code to pure c (#267)
Replaced C++ vulkan rendering with C one

(cherry picked from commit 85e44bf973)
2025-12-06 01:03:06 +01:00
Dmitrii Morskii
deda1c4d7c JBR-5965 Wayland: implement SplashScreen
(cherry picked from commit c0247eae4f)
2025-12-06 01:03:02 +01:00
Nikita Gubarkov
ed55dbc099 JBR-6144 Build JBR with Vulkan support
1. Update dockerfile to checkout Vulkan headers
2. Fix --with-vulkan-include configure option

(cherry picked from commit 67c8c4dc1a)
2025-12-06 01:03:02 +01:00
Alexey Ushakov
6ebd20c864 JBR-6158 Cannot build jbr21 with wayland toolkit on wsl2
Added --with-wayland-lib option to provide custom library path

(cherry picked from commit cdc2b1b7a0)
2025-12-06 01:03:02 +01:00
Nikita Gubarkov
141177fb0d JBR-5973 Implement rendering of no-AA shapes with Vulkan pipeline
Get rid of maxTextureSize in Vulkan code. This concept was introduced to fix macOS-specific bugs and don't map well to Vulkan implementation, as this value is tied to specific device and texture format, so get rid of it for now and see whether we need it at all.

Refactored native surface data hierarchy. There was a C-style "inheritance" model with VKSDOps having an SurfaceDataOps as its first member and conversions back and forth between them. And then also privOps - pointer to the platform-specific part (WLVK). This was refactored into plain inheritance: SurfaceDataOps -> VKSurfaceData -> VKSwapchainSurfaceData -> WLVKSurfaceData

State management, synchronization & layout transition. Now using dynamic rendering and synchronization2 extensions.
Each device has a single timeline semaphore (basically 64-bit counter), monotonically increasing as device executes our commands, allowing us to track the state of the submitted batches and reuse resources which are no longer in use.

Split command recording into primary and secondary command buffers.
This allows us to record commands "in the past", before current render pass started, which gives possibility for some heavy optimizations:
1. When we suddenly need some texture in the middle of the render pass - no need to stop render pass in order to insert necessary synchronization - we can do it as if we knew it beforehand.
2. When we draw something and then clear the surface - just erase all commands inside current render pass we recorded earlier, so the actual drawing will never happen.

Shaders are compiled with glslc or glslangValidator and bytecode is inlined directly into libawt_wlawt

Memory management via VMA, vertex buffer pool, shader push constants.

Other refactoring.

(cherry picked from commit 9ceaebbb60)
2025-12-06 01:03:01 +01:00
Nikita Gubarkov
b92dc75560 JBR-5645 Provide basic classes for Vulkan rendering pipeline
Implemented shared classes for cross-platform vulkan implementation and some support for wayland toolkit

(cherry picked from commit 9ea3d2d0b1)
2025-12-06 01:03:00 +01:00
Maxim Kartashev
0358c3b89c Wayland: fixed build errors on macOS
(cherry picked from commit 82fe989dd7)
2025-12-06 01:02:59 +01:00
Alexey Ushakov
f2ea20a099 Initial version of WLToolkit and Vulkan support
Co-authored-by: Dmitry Batrak <Dmitry.Batrak@jetbrains.com>
Co-authored-by: Nikita Gubarkov <nikita.gubarkov@jetbrains.com>
Co-authored-by: Maxim Kartashev <maxim.kartashev@jetbrains.com>
(cherry picked from commit 2e26de3c45)
2025-12-06 01:02:59 +01:00
bourgesl
586f23b5df JBR-7460: fixed (macos) MTLTexturePool GC implementation to release texture memory more promptly (regular young GC freeing not reused textures since 15s) + unified API with new generic AccelTexturePool (C) to be shared with the coming vulkan pipeline (linux)
(cherry picked from commit ea12ccdf5e)
2025-12-06 01:02:58 +01:00
Maxim Kartashёv
54f74a0e2a JBR-5956 Provide more details on assertion failure
Use JNU_RUNTIME_ASSERT(env, cond, msg) defined in jni_util.h
to crash JVM when 'cond' is not true with the given message
and source location information in the fatal error log.

(cherry picked from commit fd9bf2c37a)
2025-12-06 01:02:58 +01:00
bourgesl
74f8b3fd45 JBR-6696: added MTLContext CVDisplayLink checks, improved MTLLayer drawable lifecycle, hardened appkit main thread usage with ThreadUtilities instrumentation to monitor all performOnMainThread usages and report high latency tasks in LWCToolkit platform logger (use system property 'sun.awt.mac.mainThreadLatency=xx' in milliseconds), fixed few MainThread violations (PrinterView init)
(cherry picked from commit 975b4b8cc9)
2025-12-06 01:02:56 +01:00
Nikita Gubarkov
bbaa2d6e61 JBR-6357 JBR API v3
JBR API frontend is moved into a separate repository.
Rewritten proxy generation, bridges removed, invokedynamic is used instead.
Mapping is now specified using annotations.
Support for extension methods.
Support for arrays and generics.
Added JBR API implementation version.

JBR-7232 Refactor deriveFontWithFeatures & JBRFileDialog JBR API

(cherry picked from commit a4804efa96)
2025-12-06 01:02:55 +01:00
Roman Shevchenko
e03dda3e23 JBR-7194: extension-based filters in native file dialogs
(cherry picked from commit cf5d136b3e)
2025-12-06 01:02:55 +01:00
Nikita Provotorov
2ecaa0b33b JBR-6456 Sudden keyboard death on Linux using iBus.
Add a workaround for the iBus's bug which leads to the issue.

(cherry picked from commit b8e9dbf8c9)
(cherry picked from commit 7355948065)
2025-12-06 01:02:53 +01:00
Dmitrii Morskii
49fc35a7df JBR-6376: implement detecting of OS theme on linux
(cherry picked from commit d8aaa3da47)
2025-12-06 01:02:53 +01:00
Dmitrii Morskii
02653d997f Revert "JBR-6372: implement detecting of OS theme on linux"
This reverts commit a657e4e2cbce139f2c5b53c7fb5f30d81f99e311.

(cherry picked from commit c626c9f220)
2025-12-06 01:02:53 +01:00
Dmitrii Morskii
f65a413d64 JBR-6372: implement detecting of OS theme on linux
(cherry picked from commit 1d47383016)
2025-12-06 01:02:51 +01:00
Nikita Tsarev
7704b0c6c4 JBR-5254: Fix Caps Lock not working properly on certain Chinese IMs
with fix for JBR-5300 Change source code and test files to use GPL license

(cherry picked from commit be64a4f3d0)
2025-12-06 01:02:50 +01:00
Dmitry Batrak
7a7670895c JBR-5300 Change source code and test files to use GPL license
fix copyright profile in generated IDE project

(cherry picked from commit 43ebbe3cd1)
(cherry picked from commit 39d49c5abe)
2025-12-06 01:02:40 +01:00
Nikita Gubarkov
37f021a5b0 JBR-5124 Rewrite custom decorations support
JBR API v0.0.8
Added new WindowDecorations API, deprecated old CustomWindowDecoration.

JBR-4641 JBR-4630 Fix client area calculation with custom decorations on Windows.

- Window insets are rounded up, which causes visible & unusable border in fullscreen on some scales, round down instead.

- Clipping in Swing components sometimes cuts what it shouldn't, fixed.

(cherry picked from commit 03d850e722)
2025-12-06 01:02:40 +01:00
Alexey Ushakov
e8b3f3a38c JBR-5693 Debug build failure in main branch
Corrected printf format and muted unused-function option for keycode_cache.c

(cherry picked from commit 87a01c930d)
2025-12-06 01:02:34 +01:00
Maxim Kartashev
4497dcf8fe JBR-5445 JBRApiTest test fails on development builds
(cherry picked from commit d9d941f9c5)
2025-12-06 01:02:31 +01:00
Artem Semenov
a07b37b7fa JBR-4170 Implement API for announcing
(cherry picked from commit d7f14bf793)
2025-12-06 01:02:27 +01:00
Nikita Gubarkov
12b75c3660 8289189: Fix ./configure on WSL1
(cherry picked from commit 617ed45c5c)
2025-12-06 01:02:18 +01:00