Commit Graph

85091 Commits

Author SHA1 Message Date
Maxim Kartashev
d3cece0c89 JBR-6416 Wayland: IDEA maximize button out of sync sometimes
(cherry picked from commit 6122875478)
2025-08-23 11:51:52 +04:00
Maxim Kartashev
ec0b431660 JBR-6391 Wayland: memory indicator tooltip flickers
(cherry picked from commit e84bddb1ba)
2025-08-23 11:51:52 +04:00
Dmitrii Morskii
f2db4ec14d JBR-6213 Wayland: removed blurring on cursor on multiple monitors with different scales
(cherry picked from commit fa7844da7c)
2025-08-23 11:51:52 +04:00
Maxim Kartashev
79e7e4f85f JBR-6276 Wayland: WLToolkit logs too much
Changed the logging level for such messages to FINE

(cherry picked from commit e946179554)
2025-08-23 11:51:52 +04:00
Maxim Kartashev
69c4a64c1d JBR-6316 Wayland: WLSMSurfaceData.getReplacement() throws UOE
Also fixed the keyboard repeat manager so that it does not prevent
application from shutting down.
Also improved fullscreen support.

(cherry picked from commit a36c9604b1)
2025-08-23 11:51:51 +04:00
Maxim Kartashev
c20dbf3d84 JBR-6321 Wayland: popup windows do not respect screen bounds
(cherry picked from commit b8b08a36aa)
2025-08-23 11:51:51 +04:00
Maxim Kartashev
ae6f29dcb0 JBR-6313 Wayland: pasting from clipboard doesn't always work
Also added a flush-to-server command following each Wayland request

(cherry picked from commit 58d2d421e0)
2025-08-23 11:51:51 +04:00
Maxim Kartashev
3ae5e7f5e0 JBR-6276 Wayland: WLToolkit logs too much
(cherry picked from commit fee20da837)
2025-08-23 11:51:50 +04:00
Nikita Tsarev
2be7b9d0b1 JBR-5678: Refactor Wayland keyboard support
(cherry picked from commit 070ec5bb8c)
2025-08-23 11:51:50 +04:00
Dmitrii Morskii
4a3f3fc9b4 JBR-5965 Wayland: implement SplashScreen
(cherry picked from commit c0247eae4f)
2025-08-23 11:51:50 +04:00
Maxim Kartashev
79a6c2846c JBR-6253 Wayland: can't run in weston because of xdg_wm_base version 3
(cherry picked from commit 79ddf65b83)
2025-08-23 11:51:49 +04:00
Maxim Kartashev
3ebe73af55 JBR-6212 Wayland: app does not terminate upon Wayland protocol error
(cherry picked from commit 5ad4f8a06d)
2025-08-23 11:51:49 +04:00
Maxim Kartashev
578ab56e1e JBR-6209 Wayland: popup windows cannot be moved
(cherry picked from commit 0aecd427d2)
2025-08-23 11:51:49 +04:00
Maxim Kartashev
719b1378c6 JBR-5977 Wayland: make undecorated windows natively resizeable
(cherry picked from commit fc735db0dc)
2025-08-23 11:51:49 +04:00
Maxim Kartashev
e50a009359 JBR-6207 Wayland: many popup windows positioned incorrectly
When popup's parent is also its top-level window, use that instead of
null

(cherry picked from commit 47d484b60f)
2025-08-23 11:51:48 +04:00
Maxim Kartashev
bcc6e47d57 JBR-6183 Wayland: clipboard-related exception in headless environment
(cherry picked from commit e302f472f2)
2025-08-23 11:51:48 +04:00
Nikita Gubarkov
829d16b53b 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-08-23 11:51:48 +04:00
Alexey Ushakov
da4fa55530 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-08-23 11:51:47 +04:00
Maxim Kartashev
8fbefc90ad JBR-5857 Wayland: implement clipboard support
(cherry picked from commit c155acb7f5)
2025-08-23 11:51:47 +04:00
Dmitry Batrak
fa032d16e6 JBR-6145 [Wayland toolkit] Popup windows aren't focusable
A partial solution. Cases not still covered:
* Alt+tab from the app and back should keep popup focused if it was focused initially
* Mouse clicks between popup and owner should transfer focus as expected

(cherry picked from commit 903231dc50)
2025-08-23 11:51:47 +04:00
Maxim Kartashev
cafc348158 JBR-6138 Wayland: utilize gtk_shell1 protocol to mark dialogs as modal
(cherry picked from commit ba60bfa1f4)
2025-08-23 11:51:47 +04:00
Maxim Kartashev
70efba9798 JBR-6117 Wayland: JVM shutdown hang
(cherry picked from commit 20b2eeb0cc)
2025-08-23 11:51:46 +04:00
Dmitry Batrak
16dc95aaa5 JBR-5961 Wayland: can't switch between projects using menu
prevent using a pointer to destroyed surface

(cherry picked from commit ba1b5cec5f)
2025-08-23 11:51:46 +04:00
Dmitry Batrak
25f0fb270e JBR-5961 Wayland: can't switch between projects using menu
fix typo

(cherry picked from commit 1ee3c83ef0)
2025-08-23 11:51:46 +04:00
Dmitry Batrak
4301eb310b JBR-5961 Wayland: can't switch between projects using menu
support Window.toFront in Wayland toolkit

(cherry picked from commit b42043930f)
2025-08-23 11:51:45 +04:00
Maxim Kartashev
a5df8d76de JBR-6071 Alpine Linux compilation: error: implicit declaration of function 'pthread_getname_np'
(cherry picked from commit 72722dac36)
2025-08-23 11:51:45 +04:00
Maxim Kartashev
ee596fa7ab JBR-5989 Wayland: jdk_awt_wayland test group
(cherry picked from commit 05ad0c35dd)
2025-08-23 11:51:45 +04:00
Maxim Kartashev
27cbe10f17 JBR-6025 Wayland: miscellaneous small improvements
(cherry picked from commit 9dfeaac204)
2025-08-23 11:51:45 +04:00
Alexey Ushakov
a17b87cf32 JBR-6045 WLToolkit(Vulkan): Add options to select physical device
Changed access to _name field, minor corrections in verbose print

(cherry picked from commit 36407e978c)
2025-08-23 11:51:44 +04:00
Alexey Ushakov
45fac1bddf JBR-6045 WLToolkit(Vulkan): Add options to select physical device
Implemented -Dsun.java2d.vulkan=True and -Dsun.java2d.vulkan.deviceNumber=n VM options

(cherry picked from commit 7ea0f44a6f)
2025-08-23 11:51:44 +04:00
Maxim Kartashev
95f307d993 JBR-6036 Wayland: Cannot invoke "java.awt.Component.getWidth()" because "popupParent" is null
Not all POPUP Window's have their parent set. And only those who do
shall be treated as popups in the Wayland's sense.

(cherry picked from commit 86080923bb)
2025-08-23 11:51:44 +04:00
Nikita Gubarkov
9ab59b4079 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-08-23 11:51:43 +04:00
Alexey Ushakov
7c5267a0be JBR-6032 WLToolkit: Uninitialized WLComponentPeer sends paint requests
Protected surfaceAssigned from MT access

(cherry picked from commit e5a3802293)
2025-08-23 11:51:43 +04:00
Alexey Ushakov
01adb4b756 JBR-6032 WLToolkit: Uninitialized WLComponentPeer sends paint requests
Skip sending paint events for not configured peers

(cherry picked from commit 145d6405e4)
2025-08-23 11:51:43 +04:00
Maxim Kartashev
67354fe610 JBR-5968 Wayland: support PERPIXEL_TRANSLUCENT
(cherry picked from commit 35bb2d2489)
2025-08-23 11:51:43 +04:00
Nikita Tsarev
726bef6f95 JBR-5963: Fix RobotKeyboard test and implement getLockingKeyState
(cherry picked from commit 8210596700)
2025-08-23 11:51:42 +04:00
Maxim Kartashev
a4188a6532 JBR-5962 Wayland: fix the main event loop to allow for secondary queues
Return READ_RESULT_FINISHED_NO_EVENTS from WLToolkit.readEvents() in
case of poll returning with no new data (i.e. via timeout).

(cherry picked from commit 2b68207e79)
2025-08-23 11:51:41 +04:00
Nikita Tsarev
c7e2eb51cb Regenerate wakefield-client-protocol using an older wayland-scanner to temporarily fix build problems
(cherry picked from commit 7310c73a94)
2025-08-23 11:51:41 +04:00
Nikita Tsarev
c4e3f15ee7 JBR-5676: Support emulating input events in Wakefield
(cherry picked from commit 6544d9d976)
2025-08-23 11:51:41 +04:00
Nikita Tsarev
26531bafd6 JBR-5900: Fix deadlock when enabling the Wakefield extension
(cherry picked from commit f1712ababd)
2025-08-23 11:51:40 +04:00
Nikita Tsarev
8ac4342273 JBR-5896: Fix WLToolkit being instantiated twice
(cherry picked from commit 1bdfdc275d)
2025-08-23 11:51:40 +04:00
Maxim Kartashev
6dc6c824d0 JBR-5861 Wayland: minimum necessary stubs to run IDEA
(cherry picked from commit d8dbfd7249)
2025-08-23 11:51:40 +04:00
Nikita Gubarkov
daf90e2b8d 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-08-23 11:51:39 +04:00
Maxim Kartashev
f37325c479 JBR-5661 Wayland: implement heavy-weight popup windows
(cherry picked from commit abdfb7231b)
2025-08-23 11:51:39 +04:00
Maxim Kartashev
2293de6b63 JBR-5666 Wayland: WLToolkit doesn't work with weston
Multiple Wayland buffers support.

(cherry picked from commit 4541c118ff)
2025-08-23 11:51:39 +04:00
Maxim Kartashev
68635e7f22 JBR-5658 Wayland: incorrect scaling of window content
The buffer scale is changed atomically with the size.
WLGraphicsConfig made immutable and is re-created when scaling changes.
WLGraphicsDevice is also re-created when its position changes.

(cherry picked from commit 2d0d950d5b)
2025-08-23 11:51:38 +04:00
Maxim Kartashev
dd7a290876 JBR-5657 Wayland: sometimes there's a deadlock at the start
Don't exit from toolkit initialization until all the necessary
information has been received from the Wayland server.

(cherry picked from commit 453aa66d79)
2025-08-23 11:51:38 +04:00
Maxim Kartashev
78eed6a544 JBR-5655 java/awt/Toolkit/Wayland/WaylandToolkit.java: WLToolkit not found
WLToolkit made operational in headless mode

(cherry picked from commit 5679e134a7)
2025-08-23 11:51:38 +04:00
Maxim Kartashev
ea46a4492f Wayland: fix AWT initialization on macOS
(cherry picked from commit 382e6c6989)
2025-08-23 11:51:38 +04:00
Maxim Kartashev
724cd34db8 Wayland: fixed build errors on macOS
(cherry picked from commit 82fe989dd7)
2025-08-23 11:51:37 +04:00