Use JScrollPane.getVerticalScrollBar/getHorizontalScrollBar methods to look for scroll bars. In some cases a scroll bar might be not a direct child of the scroll area, but it can still be assigned to the vertical/horizontalScrollBar property.
(cherry picked from commit 646d2e478f)
3rd party apps might want to subscribe for scroll bar value changed events to track scroll position. VoiceOver and Zoom don't react on these events.
(cherry picked from commit 4214897d5e)
Exclude VM error-reporting code that treats memory as a raw sequence of
bytes from address sanitizer checks. This is needed to only get true
reports when running tests against the --enable-asan build.
(cherry picked from commit 4c2085b5f7)
This lets awt_Win32GraphicsEnv.cpp SetProcessDPIAwareProperty() call Win7 specific ::SetProcessDPIAware() API func.
(cherry picked from commit 5e7a766090810d839f4352d06fc2812499d766f8)
(cherry picked from commit 7d1d43bfa1)
(cherry picked from commit 2351382562)
A new behavior for java.io.File was introduced in commit 9477c705c0. For example, `new File("").exists()` returns true now, but it used to return false.
Allow Windows Path to have a trailing space despite Windows naming conventions
discouraging it. Many programs - including Explorer - successfully work
with such files or directories.
(cherry picked from commit 64a468280c)
- monitors sleep/wake-up notifications to define ThreadUtilities.isWithinPowerTransition()
- fixed CPlatformWindow.flushBuffers() to use this pwm flag to use invokeLater() when the system property '-Dawt.mac.flushBuffers.pwm=true'
- always use invokeLater() when display mirroring is enabled (i.e. '-Dawt.mac.flushBuffers.invokeLater'=[auto|default])
- always use the timeout=0.666s in CPlatformWindow.flushBuffer()
- always use the time limit=13.333s in LWCToolkit.doAWTRunLoop() to ensure avoiding any potential hangs / freezes on macOS
Fixes crashes caused by multiple javax.accessibility.AccessibleState.EXPANDED/COLLAPSED changes by making sure AppKit has not more than one event of each type being processed or pending in its queue. The logic can be rolled back via a new system property -Dsun.lwawt.macosx.CAccessible.eventsCoalescingEnabled=false.
(cherry picked from commits 84012b5f39, a2707d4e95, fa8c4705e6, a23ab5a040, fe07d2731a)
This is needed for the implementation of painters (JBR-7646)
- Request pipelines one-by-one instead of a "pipeline sets"
- Split pipeline key into separate "shader" and "topology" (more items may need to be added later)
- Move management of composites into its own file
Implemented general logic of the blit, removed extra logging
Corrected clipping logic, updated regression tests
Added some flush and init code for the surfaces
* This method allows for third-party tools to modify text component contents through the accessibility API on macOS;
* The setAccessibilityValue method is implemented similarly to NavigableTextAccessibility.setAccessibilitySelectedText. On the Java side, it calls AccessibleEditableText.setTextContents according to the comment in JavaTextAccessibility.accessibilitySetValueAttribute;
* The isAccessibilitySelectorAllowed method is implemented similarly to JavaTextAccessibility.accessibilityIsValueAttributeSettable: it checks if the text component implements AccessibleEditableText, is enabled, and additionally checks if the editable property is true, because some components could be enabled but not editable, and we shouldn't allow setting the value in this case.
(cherry picked from commit 61a501351a)
Moved robot pixel grabber into windows surface data
Created offscreen surface data
Separated surfaces implementation into two files
Moved offscreen surface to the shared code
Fix
RQ doesn't expose async flush operation. All RQ flushes wait for the queue to be drained, effectively serializing queue flusher and EDT execution while still making it prone to deadlocks.
The periodic flush feature of the queue flusher thread is of no use as well, as every observable effect of RQ operation is already immediately followed by a forced flush.
As Vulkan functions have no restriction on the calling thread, keep it simple - lock the monitor and drain the queue synchronously.
Make sure the surface used for the cursor is marked as such prior to
being committed in order to receive an exception from enforcing the rule
about the buffer size having to be multiple of its scale.
Also correct library name encoding in exception messages.
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 82a239a61d)
that clashes with another test due to revert of "8315701: [macos] Regression: KeyEvent has different keycode on different keyboard layouts" caused by JBR-6387
- added more instrumentation on awt threads and AWTThreading.invokeAndWait() to detect and diagnose deadlocks
- enhanced awtLockListener to adopt nanotime for time accuracy + more advanced logging (caller, wait time) with histograms
- major ThreadUtilities performOnMainThread refactoring to observe thread coordination (state, callstacks) in order to avoid deadlocks while the appkit/main thread is waiting (performOnMainThreadWaiting:YES) in conflict with LWCToolkit.invokeLater() blocked in doAWTRunLoop (2nd)
- fixed CPlatformWindow.flushBuffers() to use LWCToolkit.invokeLater() to avoid deadlocks (EDT <-> main) if the the system property '-Dawt.mac.flushBuffers.invokeLater=true'
- use the new CGraphicsDevice.IsMirroring() to enable fix in CPlatformWindow.flushBuffers() too
- removed changes for JBR-5461 + cleanup + simplified awtLock() + keep few more invokeLater() when computer returns from sleep or displayChanged() to avoid deadlocks until solved definitely
- fixed review comments
- Position popups at the exact offset given; this is achieved by
using the XDG_POSITIONER_ANCHOR_TOP_LEFT anchor
- Update of popups location is done in sync with all other updates
that affect the size (like the surface size update)
- Maintain a popup's location relative to the popup's parent, not
its toplevel window
The watch service is based on FSEvents API that notifies about file
system changes at a directory level. It is possible to go back to
using the old polling watch service with -Dwatch.service.polling=true.
Features include:
- support for FILE_TREE option (recursive directory watching),
- minimum necessary I/O (no filesystem access more than once
unless needed),
- one thread ("run loop") per WatchService instance,
- changes are detected by comparing file modification times with
millisecond precision,
- a directory tree snapshot is taken at the time of WatchKey creation
and can take a long time (proportional to the number of files).
(cherry picked from commit f91ddf657a)
Exclude the test when running under XWayland that doesn't implement
screen capture necessary for the test to function.
(cherry picked from commit 4326028811)
Mask bytes are copied to texel buffer to be used in shader.
Up to 256KiB (configurable) of mask can be rendered in a single draw call, with no limit on number of MASK_FILL operations in a single batch.
Also added dirty implementation of greyscale-AA DRAW_GLYPH_LIST and FILL_AAPARALLELOGRAM over MASK_FILL.
(cherry picked from commit 4651c3f096)
- Implemented dynamic pipeline compilation.
- Added 64-bit per pixel format usage in debug mode for testing.
- Now passing colors from Java to Vulkan with straight alpha.
(cherry picked from commit 3d7baad687)
Implemented:
- raster loading and blit primitive
- transform for VKBlitSwToTextureViaPooledTexture
Used texture pool to get temporary image
(cherry picked from commit bf04a71bce)
- remove Vulcan part that causing builds to fail
- modify scripts for building images from Oracle Linux 8
- update jb/build/VerifyDependencies.java to check libraries have no dependency on symbols from glibc version higher than 2.28
- rename Ubuntu2004 docker files
- upgrade wayland up to wayland-devel-1.21.0-1
(cherry picked from commit 2092570840)
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)
- Adding information to WLPointerEvent about wl_pointer::axis* events along the X axis;
- Introducing 'WLComponentPeer#convertPointerEventToMWEParameters' - a routine for converting WLPointerEvent parameters to parameters required for MouseWheelEvent s;
- Handling both X and Y axes within the WLPointerEvent dispatching routine.
(cherry picked from commit 6afbc34d4b)
(cherry picked from commit 8b091f52d1)
- Remaking the mapping of wl_pointer::axis events values to MouseWheelEvent rotations to eliminate the touchpad scrolling behavior "the more slowly the fingers move, the more pixels are scrolled";
- Accumulating the fraction parts of wl_pointer::axis events values to improve the accuracy of touchpad scrolling;
- Distinguishing between wheel scrolling and touchpad scrolling to fine-tune MouseWheelEvent parameters for each of these cases.
(cherry picked from commit 874d5698bc)
(cherry picked from commit cb41fa53f0)
Swing requires that clicking frame decorations should cause the window
to be ungrabbed. However, if a custom title is used, and that title contains
user-provided components, then clicking such components should not
cause the window to be ungrabbed, otherwise a menu located in a custom
title behaves incorrectly.
Fix by using the same logic as for the native actions, such as moving the window.
If the native actions are allowed, then ungrabbing is allowed as well.
Otherwise, do not ungrab, let the component behave like it's located in the client area.
The fix is supplemented with a new regression test "test/jdk/jb/javax/swing/CustomTitleBar/JMenuClickToCloseTest.java".
(cherry picked from commit f82c018914)
AppKit resets the cursor on native mouse entered/exited events. Depending on the order of events, it may end up setting the wrong cursor. So update it forcibly on such events.
(cherry picked from commit 2de56405aa)
To fix missing mouse entered/exited events when
using rounded corners, we keep track of mouse moved events. When a mouse moved event is detected, and the current peer under the cursor belongs to a different window, we send fake mouse entered/exit events to the old and new windows. We also filter late mouse exited events.
The workaround is enabled by default with the VM option "awt.mac.enableMouseEnteredExitedWorkaround" to disable it in case something breaks.
About the test:
Use the robot to find the points when the mouse
entered event is sent to the popup when the mouse
enters through a rounded corner, and the similar
point for entering the outer window when exiting
through such a corner.
Once the points are found, move the mouse back
and forth to that point, but not beyond.
The correct behavior is that when the mouse
enters the popup, a mouse exited event is sent
to the outer frame and vice versa.
Therefore, every mouse entered/exited event
should be received exactly once.
Use reflection to set the rounded corners,
as JBR API isn't available in tests.
(cherry picked from commit 0b5beaf2eb)
Implemented reference counting for shared MTLContext objects. Supported multiple display links per MTLContext. Also, works for macOS version < 10.13
(cherry picked from commit c6aa7f18e5)
- Added proper synchronization and image layout transitions.
- Refactored VKRenderer to hold per-device rendering context. Isolated surface rendering contexts.
- Implemented reusing of command buffers and semaphores
- Fixed surface resize, made surface initialization more robust.
- Added on-demand pipeline creation for actual surface formats.
- Added missing destruction logic.
- Added macros for easy checking of return codes, logging with source code location.
- Moved implementation details out of headers where possible. Stripped dead code.
- Implemented consistent OOM strategy from dynamic arrays and ring buffers.
(cherry picked from commit 91aafbe5d2)
Certain Wayland compositors (wlroots) invalidate xdg_surface after window with popup loses focus. Subsequent attempts to
commit the popup window fail with protocol error "xdg_surface has never been configured".
Handle popup_done event by hiding the popup window. Also emit WINDOW_CLOSING event as otherwise focus remains on the popup parent.
Co-authored-by: Maxim Kartashёv <maxim@kartashev.spb.ru>
(cherry picked from commit 873a085de4)
* Renamed VKLogicalDevice to VKDevice for conformance and convenience.
* Refactored device->device to device->handle for clarity.
(cherry picked from commit aba56fd3a9)
- 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)
- Separate instance and device-specific function tables
- Avoid using device from global context when possible
- Set up debug logger
(cherry picked from commit af4eb8b758)
Do not copy the buffer if the drawing buffer has not been resized yet as
the size will not match that of the show buffer.
Also, properly guard against the size change by another thread while
copying.
(cherry picked from commit 8ff1d3c6aa)
Use -Dawt.window.counters to enable.
To output counters per second to stdout/stderr,
use -Dawt.window.counters=stdout or =stderr.
A counter by the name swing.RepaintManager.updateWindows
is always available for Swing applications, but it does not
accurately correspond to frames per second.
Toolkit-dependent counters provide much better accuracy.
On Wayland with memory buffers as the backend two are available:
java2d.native.frames - frames delivered to the Wayland server
java2d.native.framesDropped - fully formed frames that were not
delivered to the Wayland server
(cherry picked from commit 639a7b4a5e)
Clean up the damage list when resizing a surface.
Additionally, clamp the damaged area before copying to its current
actual size in order to safeguard against invalid external input.
(cherry picked from commit 392a016333)
When the size of the buffer changes, cancel the frame callback
and make sure that the next surface commit happens with the new buffer.
(cherry picked from commit acb2a54349)
Allow to associate the application's window with .desktop file with icon
and other info with -Dawt.app.id=... (DBus application name similar to
WM_CLASS in X
(cherry picked from commit 5901915afb)
Improved rendering performance by
* reducing memory copy and making it more efficient,
* tying the next frame display to the frame event from Wayland,
which dramatically reduces load for very quick Swing apps,
* limiting the number of buffers to 2.
(cherry picked from commit e625eeca1e)
-correctly positioning SplashScreen on multiple monitors;
-correctly correctly handles cases of SplashScreen with gif with transparent parts;
-refactoring;
(cherry picked from commit 7d750cfbcf)
fix activation not working on Ubuntu 23 (mutter 45.2), after a mouse button has been pressed in the originally active window
(cherry picked from commit 07fa18103e)
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)
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)
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)
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)
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)
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)
Don't exit from toolkit initialization until all the necessary
information has been received from the Wayland server.
(cherry picked from commit 453aa66d79)
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)
JBR-7336 Any keyboard shortcut with Alt produces a Windows system sound.
* X11 Linux part: disable posting KEY_TYPED events for VK_ENTER if any modifier except { Shift, Control, Lock, Mode Switch (a.k.a. AltGr), NumLock } is being pressed.
* Windows part: begin ignoring WM_SYSCHAR messages as MSDN instructs.
* Add a regression test.
(cherry picked from commit d732718ef7)
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)
Use -Dawt.window.counters to enable.
To output counters per second to stdout/stderr,
use -Dawt.window.counters=stdout or =stderr.
A counter by the name swing.RepaintManager.updateWindows
is always available for Swing applications, but it does not
accurately correspond to frames per second.
Toolkit-dependent counters provide much better accuracy.
On Wayland with memory buffers as the backend two are available:
java2d.native.frames - frames delivered to the Wayland server
java2d.native.framesDropped - fully formed frames that were not
delivered to the Wayland server
(cherry picked from commit 872e73ed1e)
* This fixes an issue with AccessibleJTreeNode#getBounds, which adjusts the node's bounds according to the parent node. For nodes whose parent is the invisible root, getBounds was returning null, and it caused issues with assistive technology like macOS Accessibility Zoom.
* Additionally, NVDA will now report correct tree depth levels because the root node won't add to the levels count (JDK-8249806).
(cherry picked from commit f7c47bf3cf)
(cherry picked from commit e785e9e7c9)
1. As we started committing the command buffer on glyph cache flush, this invalidates the current encoder. We need to `MTLTR_ValidateGlyphCache` after the flush, not before.
2. There's no reason to maintain separate glyph cache invalidation logic for this singe case (which is a no-op in reality), so just free the cache instead.
(cherry picked from commit 891a9c6c52)
It was initially written and tested on Linux, but it turns out that
on other systems validate() can be called in between init() and start()
calls, which would break the test even though BoxLayout isn't broken.
(cherry picked from commit 6cc237583b)
The checkRequests method only does layout initialization
if it isn't initialized already. However, when an exception
is thrown during the initialization, the layout may end up
in a half-initialized state.
Fix this by using the field that is initialized the last to check
if the layout is initialized. If that field is null, it may mean
that the layout isn't initialized or that the last attempt
failed midway. Then we try again. This attempt can,
of course, break for the same reason as the previous one,
but in that case we'll at least get a stack trace pointing
to a real cause of the error and not some mysterious NPE
that seems to be impossible from the logic.
The bug is that if we add a component that throws an exception
in one of its methods called by BoxLayout, then the layout may
end up in a half-initialized state that would mistakenly be considered
fully initialized. Then it would try to access some fields
and throw NPE with a stack trace that tells exactly nothing
about what went wrong and where.
This test checks for the presence of this bug by adding a broken
component to a BoxLayout and then un-breaking this component
and checking that an exception is thrown even though the component
is no longer broken.
(cherry picked from commit 8f5eb72836)
- Ignores the IM text returned from XmbLookupString/XwcLookupString if the KeyPress event which XmbResetIC was called with was synthetic and the first after a call of XmbResetIC/XwcResetIC.
- Only for the new mode introduced in JBR-2460 (-Djb.awt.newXimClient.preferBelowTheSpot=true): cancel text composing on each mouse press, so that preedit text stops following the caret if it's moving in response to mouse clicks.
(cherry picked from commit 43a9a3a17a)
(cherry picked from commit 156e5d9b65)
(cherry picked from commit 59f0ca804f)
A theoretical fix, it should:
- Catch any NSException (as it was initially expected);
- Probably fix possible memory leaks (by moving the layoutId var inside autoreleasepool).
(cherry picked from commit ae9520ce4f)
* Execute AccessibleAnnouncer.nativeAnnounce on a background thread on Windows to fix UI freezes. IntelliJ calls this method from EDT, but it doesn't need to run on EDT because on Windows it simply calls screen readers API without interacting with UI components. Additionally, when using a background thread, the JAWS SayString method, which previously could have been running for multiple seconds, is now executed immediately as expected, but the root cause of previous delays is unclear.
* In JawsAnnouncer, initialize COM library with the multithreaded model to allow executing it from different threads. Now COM is initialized and uninitialized on every call of the method as required by the [documentation](https://learn.microsoft.com/en-us/windows/win32/learnwin32/initializing-the-com-library): "Each thread that uses a COM interface must make a separate call to this function. For every successful call to CoInitializeEx, you must call CoUninitialize before the thread exits". IJawsApi COM object is still static and reused by different threads, which is allowed with a multithreaded concurrency model. It shouldn't cause issues because it has no state and only forwards calls to JAWS.
(cherry picked from commit 8cc4cd5cfd)
(cherry picked from commit d7d8d9b8e4)
(cherry picked from commit 8bfd24f89f)
Fixes different platform-specific issues with disabling/enabling input methods support via java.awt.Component#enableInputMethods(boolean):
* Windows: disabling used to require to deactivate and then activate back the app window to be performed completely ;
* macOS: disabling used to leave the input method window visible (however, it wasn't affecting the input) ;
* Linux: with fcitx5 IMF (may not be reproduced with iBus) disabling and then enabling back the input method support used to reset the used input source (keyboard layout) to a default one. It's done via disabling the current XIM when the input method support is disabled instead of disposing it .
(cherry picked from commit 2933ea89f0)
The patch also contains the fix for "JBR-6711: java/awt/LightweightDispatcher/LWDispatcherMemoryLeakTest.java: JButton JPanel not collected."
It unsets its references to tracked components thus not preventing GC from collecting them.
(cherry picked from commit e9aab98a6c)
(cherry picked from commit 13284aa508)
* Call UAZoomChangeFocus function when the keyboard focus is changed or when an accessible selection event is fired. Zoom viewport fill follow the accessible frame of the newly focused component, and if it has a selected child, its frame will be passed as part that needs to be highlighted.
* Fix an exception in ComboBoxAccessibility.accessibilitySelectedChildren when its selection is nil. This happens when a combo box doesn't have a selected item, and it this case Zoom wouldn't be able to follow the combo box location.
* Move the native handler of CAccessibility.focusChanged method from the legacy JavaComponentAccessibility to the new CommonComponentAccessibility class. It calls a class method (like a static method in Java), so there is no difference in which specific class it's located, but it allows to write the new code in the appropriate class.
(cherry picked from commit 75b06421ff)
(cherry picked from commit d0f47ced65)
Windows no longer change their "native" size when moved between monitors
with different scale on Linux. Use -Dresize.with.scale=true to revert
that.
(cherry picked from commit 637d67cbfe)
Created intermediate buffer in the MTLLayer
Implemented frame separation of window updates for AWT and Swing
Remove frame delays as they greatly affect throughput
Fixed test/jdk/sun/java2d/GdiRendering/ClipShapeRendering.java
Resolved crash on multi-GPU systems
(cherry picked from commit 20bf935c82)
Uses CFS_EXCLUDE instead of CFS_CANDIDATEPOS in the ::ImmSetCandidateWindow() native API, which is more powerful and allows to take into account the issue's case.
(cherry picked from commit 0afe6c37bb)
(cherry picked from commit fa3d03b373)
(cherry picked from commit 6995ce47fd)
with fix for JBR-5189 Can't exit fullscreen mode on ubuntu 22.10
(cherry picked from commit b933660cf1)
(cherry picked from commit f4ea24e18d8e6f4cb0420e30344a5cd3f000c021)
(cherry picked from commit 0ee3854a3a)
- moved common logic to a separate part
- moved parts of tests to swing package
(cherry picked from commit 80b6e4ba8cad4c19b0f306ccd64dad9c085a8bab)
(cherry picked from commit 22d1e57928)
Fixes a data race in the test.
(cherry picked from commit ca5562225a)
(cherry picked from commit 1ba73c8aaf430ca4c6e8302d1bcee8681aa8584d)
(cherry picked from commit cfbb5e642e)
(cherry picked from commit 9626cc17447b96e8b4a16908f349e682525e3090)
(cherry picked from commit 09d1ab6ca20b51a46dad120ac044346bb2a8d48e)
(cherry picked from commit b3d3fc5bc0)
(cherry picked from commit a4acdf005c53b1765ad356a740d4569db70e8b02)
(cherry picked from commit 9178b241d5d706c7628d5ebfac0fff8b54029b97)
(cherry picked from commit 262cccdd23)
- Removed font fallback hacks.
- Changed composite font glyph code encoding scheme, refactored to use Font2D instead of PhysicalFont.
- New Emoji logical font type with 2 underlying physical fonts.
- Removed getGlyphVectorOutline - it's unused and broken.
- Got rid of charsToGlyphs[NS] boilerplate.
- Moved emoji tests to separate directory.
(cherry picked from commit 485bdd1d1a)
1. Remove `value == nil` check in ComboBoxAccessiblity.accessibilityValue to fix the issue with not updated value of combo box. With `value == nil` check, the value was not reassigned on every get request of `accessibilityValue`, but only on get `accessibilitySelectedChildren`. When changing focus by Tab, only get `accessibilityValue` is called, and because `value` is already not nil, an old value was returned.
2. Set combo box role to NSAccessibilityPopUpButtonRole if it's not editable. Setting role to popup button fixes the bug when combo box value was not updated when using VO cursor navigation. Native MacOS non-editable combo boxes and non-editable HTML <select> elements also have the "popup button" role instead of "combo box", so the role should become more clear. Popup button role additionally enables opening the combo box menu with VO+Space shortcut, and changes VO instructions to be more appropriate when combo box is focused.
3. Add test for VoiceOver-specific issues of JComboBox.
(cherry picked from commit 8982db51d7)
(cherry picked from commit aebfb1439e)
Announce to Mutter that we are "client-decorated" when a Frame is
undecorated by setting _GTK_FRAME_EXTENTS to all zeroes.
This prevents Mutter from applying certain harmful heuristics.
(cherry picked from commit c5a34ea526)
JBR-5023 Configure TabbingIdentifier during create native window
JBR-5256 IDEA window resizes to zero height when exit full-screen mode with new window controls enabled
JBR-5197 Window control buttons are not visible in full-screen mode in dark themes when IDE window is focused
JBR-5175 jb/java/awt/Window/FullScreenTwoFrames.java: -[AWTWindow resetWindowFullScreeControls]: unrecognized selector sent to instance 0x60000232d5f0
JBR-5499 Window control buttons bugfix
JBR-4462 BigSur: project tab does not gain focus when click it after focusing another app
(cherry picked from commit 4aa2061ab6)
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)
This patch makes the fix of JBR-1573 (which caused JBR-4394) disabled by default, because it's incompatible with the native below-the-spot mode (a.k.a. over-the-spot in the X11's terminology).
(cherry picked from commit 3fe2a97aa0)
(cherry picked from commit fc3ce96788)
- introduces and integrates jbNewXimClient: a new implementation of XIC creation routine (it's mostly refactoring and generalizing of AWT's existed code). Enabled by default and can be disabled via a new system property -Djb.awt.newXimClient.enabled=false ;
- introduces support of the X11's native over-the-spot input method style (it's almost the same as AWT's below-the-spot mode, but the input method's windows are drawn externally, not by AWT). Enabled by default and can be disabled via a new system property -Djb.awt.newXimClient.enabled=false. Doesn't work if -Djb.awt.newXimClient.enabled=false is set ;
- introduces sun.awt.X11.XInputMethod.ClientComponentCaretPositionTracker class that tracks all kind of events for the current client component that can lead to the caret position changing ;
- makes the XInputMethod class to update the input window's position (whenever the ClientComponentCaretPositionTracker discovers that's necessary) by setting the X11's XNSpotLocation property .
Check out the branch nprovotorov/backups/JBR-2460_wrong-position-of-input-window-and-no-input-preview for more granular patches.
(cherry picked from commit c57030a2ef)
(cherry picked from commit 56d9759667)
Drop the maximized state right before the resize operation for
undecorated windows.
Also fixes setExtendedState() to work when changing snapped window's state
(MAXIMIZED_HORIZ or MAXIMIZED_VERT) to NORMAL.
(cherry picked from commit a9a227c5ab)
(also contains the fix of JBR-6267 Image retreived from the Clipboard is not the same image that was set to the Clipboard)
- Adds a way to disable caching of the data placed into the clipboard. The behavior is controlled by the system property "awt.windows.clipboard.cache.disabled" (=false by default) ;
- Whenever the app gets focus additionally checks if another app has modified the clipboard. The behavior is controlled by the system property "awt.windows.clipboard.extraOwnershipChecksEnabled" (=true by default) .
(cherry picked from commit e6f4a25b1a)
Marks the native flag AwtClipboard::isGettingOwnership as volatile and adds memory barriers around it to avoid inconsistencies of CPU caches.
(cherry picked from commit 51d2b31b28)
- AWT code heavily relies on reference comparison when updating graphics devices & configurations, so we need to actually re-create CGraphicsDevice if it was changed.
- Also do not rely on graphicsConfig.getDefaultTransform() when firing `graphicsContextScaleTransform` property change, as graphics devices are mutable and returned default transform may change over time, e.g. when device is invalidated.
(cherry picked from commit f9ad92a71c)
Reverted fix of the JRE-359 (CGraphicsEnvironment.getDefaultScreenDevice() returns null)
Logged exception after first attempt to create graphics device
(cherry picked from commit 345fd320c7)
Do not use print_native_stack() when recording OOME stacks as it is
designed to be used only in the context of a fatal error reporting where
induced crashes are tolerated.
(cherry picked from commit 6a87945cc5)
Restored REDRAW_INC to 2. Enabled the fix by default only for M2 and spans displays property enabled (Displays have separate spaces OFF)
(cherry picked from commit 19728e911b)
Blit operation should not be performed on textures with MTLTextureUsageRenderTarget only, so changing framebufferOnly to NO
(cherry picked from commit 5fb47ffc78)
- Implements the optional method [NSTextInputClient windowLevel] to tell the macOS IM subsystem correct level of the window;
- Adds a regression test ImWindowIsPlacedUnderPopup5984.java.
(cherry picked from commit 5a91aae9c2)
(cherry picked from commit 2f310561ba)
Do not search for the containing monitor in MouseInfo.getPointerInfo, this must be handled by peers (yes, this goes against the spec of MouseInfoPeer.fillPointWithCoords).
JBR-5268 Fix coordinates conversion in XMouseInfoPeer.fillPointWithCoords
(cherry picked from commit ae135f2126)
Use CGColorSpaceCopyName() available since macOS 10.6 in MTLLayer
Use sun.java2d.metal.colorMatching=true by default (current metal behaviour)
(cherry picked from commit ec5c99bfb6)
Enforce keeping the pressed button in the modifiers for MOUSE_DRAGGED events. This is under a (default enabled) system property "awt.mac.enforceMouseModifiersForMouseDragged".
(cherry picked from commit fb12990a98)
(cherry picked from commit 6a972e8ca7)
- Create a global reference of the passed to EDT accessible object (the local reference) to use it in the AppKit thread ;
- Enable -Xcheck:jni in the tests ;
- Make the tests handle the problematic case .
(cherry picked from commit cba981df4b)
(cherry picked from commit f3a038c849)
* don't move into itself
* use `PKG_NAME` variable instead of `${APP_NAME}.pkg`
* cleanup sign.sh
* add `SCRIPT_VERBOSE` env variable to control `set -x`
(cherry picked from commit 28514c3d00)
- add Swing/AWT specific Task runners
- split MouseEventsOnClientArea to separate AWT/Swing tests
- use CountDownLatch for tracking mouse events
(cherry picked from commit c6a43fe84f)
The OpenGL pipeline is enabled only if all of the following is true:
- WAYLAND is detected,
- VMWare virtualization is detected,
- rendering pipeline is not a software one (llvmpipe).
As a side effect, a system property 'jbr.virtualization.information'
is set to the value of detected virtualization type. The value is the
same as provided by JFR.
(cherry picked from commit f6acd65d32)
(cherry picked from commit 36190505f5)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit cebc6ed818)
A regression of JBR-4208 LWCToolkit.invokeAndWait should not stuck on invocation loss
(cherry picked from commit c464e4748e)
(cherry picked from commit 42d07c4f0c)
(cherry picked from commit e7009db076)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit bd9d4cf182)
Replace multiple CHANGE_SCREEN notifications fired around the same time with just one
Also, fix of JBR-5073 [Double-Monitor] java/awt/Window/LocationAtScreenCorner/LocationAtScreenCorner.java: Wrong location
Added check for nil displayID of the window
(cherry picked from commit cd6ca71ea8)
(cherry picked from commit 3f5ad0610a)
(cherry picked from commit 6a834fb5e7)
JBR-4959 [macOS Ventura] Screen flickering after OS update when IDE is full screen
Do not fire deliverChangeBackingProperties notification for the view if there is no change between layer and window scales. Also, do not fire displayChanged for display profile only changes.
(cherry picked from commit 87c092d4ec)
- Improves the fix of JBR-3544 to allow "Cmd N" and "Ctrl N" to reach AWT if they're actually the ones which were pressed.
- Adds a regression test.
(cherry picked from commit 61a1b70d73)
(cherry picked from commit c3f068760d)
Mention Toolbox App in the list of applications built on JetBrains Runtime.
(cherry picked from commit cfa9789515)
(cherry picked from commit acc1a29a25)
Since next jcef tests were moved into junit suite (inside jcef repository):
HandleJSQueryTest
JCEFStartupTest
LoadPageWithoutUI
MouseEventAfterHideAndShowBrowserTest
MouseEventScenario
MouseEventTest
(cherry picked from commit bd1d06d0bc)
Supported on Linux and MacOS only.
Controlled by -Djbr.catch.SIGABRT=true option; off by default.
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 987ce225b9)
Avoid C2-compiled loop crashes by replacing the handcrafted MRU cache
with a more modern LinkedHashMap-based one.
(cherry picked from commit 2f63acf3eb)
This greatly reduces boilerplate when dealing with platform-specific code, one can specify multiple target implementation classes, one per platform. First found will be used.
Also added JBRApi.ServiceNotAvailableException to give services ability to validate any custom condition they want.
(cherry picked from commit 02cf2548d5)
backport JBR-1991 (Focus problems in Windows with X-Mouse style focus) from JBR 11
(cherry picked from commit c8ad353f45)
(cherry picked from commit a52ed88377)
(cherry picked from commit 37c6d0b417)
JBR-4746 Added jetbrains.api.verifyBytecode VM option for generated bytecode verification
JBR-4753 Added JBR API for custom desktop actions
Added jetbrains.api.verbose system property for easier JBR API troubleshooting
Also fixed dependency scanning optimization by allowing search in known proxy interfaces outside com.jetbrains
JBR-3511 Way to customize implementation of java.awt.Desktop.browse()
Provided Desktop.setDesktopActionsHandler() and DesktopActionsHandler
interface, which methods will be invoked instead of the standard actions
provided that DesktopActionsHandler.isSupported() is true for the
corresponding action.
(cherry picked from commit 92b84906df)
After CPlatformComponent.setBounds() was changed to allow for platformWindow.getPeer() == null, a few exceptions appeared that suggest platformWindow can also be null. This commit safeguards against this situation as well.
It seems that this can only be the case if the instance is created from outside of JDK, so Objects.requireNonNull() may help to catch the perpetrator.
(cherry picked from commit 5da08dcd3a)
Implement rendering of colored outlines and bitmap glyphs in OutlineTextRenderer
Add Segoe UI Emoji to font fallback on Windows
Require layout for some emoji-related unicodes
Fix variation selectors and ZWJ
(cherry picked from commit 53059331b1)
Returning devanagari subset back for ja.UTF-8 to get non-null font name from WFontConfiguration.getTextComponentFontName(). It is a regression from JDK-8208179.
(cherry picked from commit b51254a975)
(cherry picked from commit 0588b3a885)
This changes the fonts JDK uses for font fallback on Windows. These used to be DokChampa (for Thai) and Batang/Gulim/Gulim (for Korean).
Those fonts are not available by default on Windows 10, user needs to install supplementary font language packs to get them.
Now the following fonts will be used - Tahoma (for Thai) and Malgun Gothic (for Korean). They are available by default
on Windows 7, 8 and 10.
port from JBR 11 to JBR 15 (cherry picked from commit 850653192b)
cherry picked from commit 2bf43a57ab
Kept only Thai-related changes - Korean-related issues are now fixed in OpenJDK as per JDK-8190907
(cherry picked from commit 56139b5800)
The problem was in commit "JBR-4512 windows: include pdb-files into jbrsdk": rsync can replace file lib/modules.
rsync is replaced with cp
(cherry picked from commit 6cd310aaa8)
* IDEA-283934 Top panel (toolbar, Editor tabs) hides under the Mac menu in full-screen mode
* IDEA-283934 Top panel (toolbar, Editor tabs) hides under the Mac menu in full-screen mode
* JBR-4305 IDEA-283934 Top panel (toolbar, Editor tabs) hides under the Mac menu in full-screen mode
* JBR-4305 IDEA-283934 Top panel (toolbar, Editor tabs) hides under the Mac menu in full-screen mode
(cherry picked from commit e91239081a)
theoretically it can cause 2 requests with the same query_id: "cef_query_2" (when first browser finishes loading after the creation of second one)
(cherry picked from commit e95de19533)
first invocation of dispatch(WindowEvent.WINDOW_CLOSING) calls System.exit() internally (because of setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE))
(cherry picked from commit 0f9afa7fbc)
This also aligns the handling of the style mask with how the other settings are applied: It uses a client property now. This property is now also applied directly on peer initialization so that there is no need to re-apply, and the window directly appears in the correct configuration.
(cherry picked from commit 4f254fac9d)
Added exception.toString() to jbr_err_* log
(cherry picked from commit 478bd6cdd7)
Added java stack of the exception to jbr_err_* log
(cherry picked from commit e97f728e93)
Also return the static string "OutOfMemoryError" in case of that
exception has been thrown in order to avoid crashing while reporting an
exception in an out-of-memory situation.
(cherry picked from commit b64f2a86ad)
When screen scale changes, the cached screen bounds must be explicitly
updated. Call resetBoundsCache() whenever X11GraphicsDevice.scale has
changed.
(cherry picked from commit 1bb3b2fa32)
IDEA-146669 Enable Mac native file dialogs
IDEA-159507 Mac native dialogs: multiple open dialogs are possible
JBR-1784 File dialogs aren't themed on macOS
JBR-1752 Floating windows overlap modal dialogs
JBR-2005: don't set appearance of file chooser if OSX version < 10.14
JBR-4546 Focus is not returned back to IDE after closing "Open" dialog
(cherry picked from commit e5646125e4)
(cherry picked from commit 2b05925276)
includes fix for JBR-4642 regression: "focus follows mouse" broken for modals, I need to click into them
(cherry picked from commits c55bf03680, ec748f84fb)
includes fix for JBR-4957 regression: "Modal dialog is hidden by sibling popup on Linux"
(cherry picked from commit ea8da3cbe5)
includes fix for JBR-4968: jb/java/awt/Window/ModalDialogAndPopup.java intermittently fails by TimeoutException
(cherry picked from commit 2e9ab0cb06)
(cherry picked from commit 72b9219964)
If NtQueryDirectoryFile() failed with STATUS_INVALID_PARAMETER,
try again asking for less information with the FileDirectoryInformation
option as "information class". This option works on a mounted
Google Drive, but it doesn't provide file ids, which speed
up file listing. So it is used only as a fall-back solution.
(cherry picked from commit 82693aa985)
(cherry picked from commit 732a5c9ad6)
Fix regression introduced by Google's NIO patches:
- do not attempt to get the next entry after the directory stream has
been closed already,
- fix FaultyFileSystem that is used in StreamTest.java to throw
the right exception even when getFileAttributeView() is used instead of
readAttributes(),
- removed unnecessary type cast that caused a compilation warning.
Added a test for walking a directory with a non-latin name.
(cherry picked from commit 152a4e886d)
(cherry picked from commit f5638a96b9)
Use `NtQueryDirectoryInformation` instead of `FindFirst/FindNext` to
retrieve the list of entries of a directory.
`NtQueryDirectionInformation` has 2 main benefits over
`FindFist`/`FindNext`:
* Performance is about 40% faster
* Each retrieved entry retrieved contains a 64-bit `FileId` in addition
to the usual attributes, ensuring that returned `java.nio.Path`
instances hold onto a `BasicFileAttributes` instance that exposes a
non-null `java.nio.file.attribute.BasicFileAttributes.fileKey()`.
This change also requires creating a new WindowsFileKey class, similar
to UnixFileKey class, so that
`java.nio.file.attribute.BasicFileAttributes.fileKey()` can return an
Object instance that can be used to compare files for equality.
With this change, the Windows implementation of Files.walkFileTree is
about 40% faster when the FOLLOW_LINKS option is not used, and about
2.5x faster when the FOLLOW_LINKS option is used.
When the FOLLOW_LINKS option is used, most calls to
`Files.isSameFile`, which is expensive as it requires 2 file I/O
operations, are avoided because the Path entries returned by the
new WindowsDirectoryStream implementation now contain a non-null
BasicFileAttributes.fileKey(). The remaining calls to
`Files.isSameFile` are performed when Files.walkFileTree need
to compare the initial directory with other entries.
Change-Id: Id79d89d477a6d5dcf151c63a9d6072c6f7ef43b2
(AKA JBR-3680 Cherry-pick Google's NIO patches to get faster file listing)
(cherry picked from commit 7c2d7541ba)
(cherry picked from commit 7a4078bf29)
The crashes begin with the call to getDefaultConfig() in
createStatusWindow() returning garbage. With 8280468 fixed, there aren't
many reasons left for it to do so; it must be that the argument to the
call (the screen number) is out of range.
This change eliminates the possibilities to get an absolutely incorrect
screen number by checking the return values of several Xlib functions,
which, when fail, will leave their outgoing arguments uninitialized.
This, in turn, can lead to reading some random memory resulting in
equally random screen number that is later being fed to
getDefaultConfig().
Although on modern systems with Xinerama there should really be no
screen other than zero, as the last resort, this number is also
range-checked in getDefaultConfig() itself.
(cherry picked from commit dec75d7601)
Replaced FT_LOAD_NO_HINTING mode for non AA rendering with FT_LOAD_TARGET_LIGHT
(cherry picked from commit 3368768244)
(cherry picked from commit 62b8fd828f)
Added -Djava2d.font.loadFontConfig=bundled to force loading bundled font.conf
(cherry picked from commit 788e078f64)
(cherry picked from commit 052b5d72a2)
Wrapped the native exception and added logging
JBR-4882 Unable to exit fullscreen mode after Presentation mode was entered (and exited) on macOS
(cherry picked from commit d57e8b631b)
(cherry picked from commit 5bfbdd28f2)
(cherry picked from commit 8d22e4dcb0)
includes fix for JBR-5046 Incorrect initial window's location in Xfce
(cherry picked from commits 234e705134, 02bc54f864)
includes fix for JBR-5458 Exception at dialog closing
(cherry picked from commit acde759572)
(cherry picked from commit c138965be0)
(cherry picked from commit 363650bbf4)
with JBR-4638 Regression: Unable to enter emoji in editor via Emoji & Symbols on macOS
(cherry picked from commit 8b9a00915d)
with JBR-4652 With multiple projects open non-fullscreen, right-click on Dock icon to select the project from the context menu doesn't switch to that project
(cherry picked from commit e34677587d)
with JBR-5134 Input methods can't be dynamically disabled on a focused JComponent
(cherry picked from commit 0a3f4b206d)
(cherry picked from commit 0307ccab3b)
* macOS: add methods to setup transparent titlebar with custom height
* make windowTransparentTitleBarHeight CPlatfromWindow property
* add windowTransparentTitleBarHeight test
* Prevent mouseUp events on the transparent header on macOS when the window is being dragged
Co-authored-by: Manuel Unterhofer <manuel.unterhofer@jetbrains.com>
Custom macOS window decorations via JBR API
JBR-4460 Fix window drag with custom decorations on macOS
JBR-4553 Add logging to setUpTransparentTitleBar and resetTitleBar
(cherry picked from commit f5552eed4d)
(cherry picked from commits d9ff151211, 67b174dc8c, 72b0add80c, 21af1eba85, 2f1d317d87, 6dd334f9f0, cd863bac0d, 010f6fc951, 25e087d269, parts of 7d5ac56b6c, cd6dd5c3cf, e8bbd8ffdd, abfc3e2e79, 50933cd23e)
with fix for JBR-3640 (java/awt/Modal/ModalFocusTransferTests/FocusTransferDWFAppModalTest.java: window Open button lost focus when it should not) and JBR-3979 (Focus is not transferred to parent window)
with fix for JBR-5300 Change source code and test files to use GPL license
with fix for JBR-2651 jb/java/awt/Focus/PopupIncomingFocusTest.java intermittently fails by java.util.concurrent.TimeoutException
(cherry picked from commit 56795d5d06)
Changes the default JBR's vendor from "Oracle Corporation" to "JetBrains s.r.o.".
(cherry picked from commit 0cb7b4565c)
(cherry picked from commit 62b01f9f56)
JBR-4228 report HTMINBUTTON, HTMAXBUTTON, HTCLOSE, HTMENU, HTCAPTION targets via JBR API & handle corresponding non-client mouse events for windows with custom decoration
(cherry picked from commit cacbbdc041)
Fixes the Layout_*.java tests by giving them to know the <Ctrl + key> combinations can generate KEY_TYPED event.
(cherry picked from commit eae5198b20)
(cherry picked from commit 072ae64f96)
This commit reverts the fix of JDK-8041928 and disables its regression tests.
(cherry picked from commit ba5209ec06)
(cherry picked from commit 19b7745ce3)
Renames the test AltGrMustGenerateAltGrModifierTest3838.java to AltGrMustGenerateAltGrModifierTest4207.java.
(cherry picked from commit ed60a9c2bd)
(cherry picked from commit cbacbf6d4e)
The problem: the crashes occur in createStatusWindow() when calls like
adata->AwtColorMatch() end up going to 0x0 pc or some random inaccessible
memory. The only reason for that seems to be the
getDefaultConfig(screen) returning either NULL or garbage. That, in turn, probably
happens because of the wrong screen number provided. Before JBR-3623 was
fixed, awt_numScreens could've changed between the time the screen
number was chosen and the getDefaultConfig() call. After JBR-3623 was
fixed, this change is protected with the AWT lock, which this code
holds.
The fix: obtain the screen number via the Xlib API rather than the
ad-hoc loop though the root windows and return NULL if
getDefaultConfig() doesn't return useable data.
(cherry picked from commit 3d23e8d6a5)
(cherry picked from commit 924f5bab8a)
Added file dialog customization via JBR API & fixed bugs in windows common item dialog
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 45c562e366)
Implemented gamma correction using the same approach that we did for OGL grayscale text rendering (OGLTextRenderer.c)
Optimized shader performance
(cherry picked from commit 5b290231ac)
Prevent JfrNetworkInterfaceName::on_rotation() to dereference a
potentially NULL pointer.
(cherry picked from commit b2a9372d70)
(cherry picked from commit 23ca382acc)
(cherry picked from commit 2a398ebb24)
includes fix for JBR-4131 Popup doesn't get focus if created from context menu
(cherry picked from commit 685562aafc)
(cherry picked from commit bb25c734db)
Make C1 hotspot compiler bail out during CFG construction if there's a
cycle in the graph that isn't a natural loop and that has led to an
unexpected state of stack/locals like missing a phi function.
This is a temporary measure that lets hotspot continue working
even after encountering such bytecode patterns. The full solution
will probably involve more sophisticated CFG checks.
(cherry picked from commit aa0b61cb75)
(cherry picked from commit f7a8581991)
When XGetImage() calls become slow in a remote X11 session, fake
XGetImage() with client-side XCreateImage() that is filled with some
background color. The color is chosen from several top left corner
pixels of the "slow" images obtained with XGetImage().
This feature activates in a remote X11 session only and is
controlled with -Dremote.x11.workaround={true|false|auto}.
(cherry picked from commit 99e8557c5b)
* JBR-3926 make AwtComponent transparent for hit events by default
* [WIP] pass hittest event to frame only if custom decoration is enabled and frame ready to handle it
(cherry picked from commit c0e26ff5d5)
(cherry picked from commit e7a31e309e)
The slowness was the result of XWM.getInsetsFromExtents() repeated
attempts to acquire frame extents from a property that under Sway is
simply unavailable. Each attempt added at least 20ms to every re-draw.
Prior to (repeatedly) checking for NET_FRAME_EXTENTS property of a
window, check that the property is supported by the window manager.
(cherry picked from commit b40cc1c791)
(cherry picked from commit dc29a24175)
as part of JBR-3017, to make investigation of similar issues simpler in the future
(cherry-picked from commit a7fd723e43)
(cherry picked from commit d8ca0763a5)
Added processing system events while waiting for OGLRenderQueue.lock
Moved getCGLConfigInfo logic execution to AppKit thread so, awt lock is
taken on one thread
(cherry picked from commit d1c8bf03e1bd41cb075aa73cc39558103af7fe1a)
(cherry picked from commit 6bf9f31986be64acf3755b34568802f9960a66ec)
(cherry picked from commit 4e21d67e0369bffac45662c63699b39946218a7a)
(cherry picked from commit 62b62e33cf)
The _NET_FRAME_EXTENTS property that is used to obtain the initial
insets of a dialog window does not immediately get its value and may be
returned as 0 if queried too soon after the window creation.
In order to avoid (incorrect) guessing of dialog's insets, make 3
attempts at getting the insets with a small but increasing pause
in between them.
(cherry picked from commit 8134ec069d)
Add regression test.
(cherry picked from commit 8df43eef4b)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 0763e18e1b)
The _NET_FRAME_EXTENTS property that is used to obtain the initial
insets of a dialog window does not immediately get its value and may be
returned as 0 if queried too soon after the window creation.
In order to avoid (incorrect) guessing of dialog's insets, add an
artificial delay if getInsets() is called too soon.
(cherry picked from commit d358fcc774)
because requesting focus for frame-parent causes to close whole popup chain
(cherry picked from commit 7a2ccfc521)
JBR-1762: fixed review comments
(cherry picked from commit 0efbe5d9b9)
(cherry picked from commit e539e4d29c)
because requesting focus for frame-parent causes to close whole popup chain
(cherry picked from commit 7a2ccfc521)
JBR-1762: fixed review comments
(cherry picked from commit 0efbe5d9b9)
(cherry picked from commit 614eea4fd3)
This new interface is similar to `BasicFileAttributeView` except it
gives implementations a hint that the fileKey() should be acquired
even at some performance cost.
`FileTreeWalker` uses this new interface to request a file key
in addition to regular file attributes so that file equality can
be efficiently performed when checking for loops during file
tree traversal.
This makes `FileTreeWalker` about 2x faster when traversing non
trivial file system trees with the FOLLOW_LINKS option.
Change-Id: I8de047c8fc241dbab9ad57c5e361118a3a94893d
(AKA JBR-3680 Cherry-pick Google's NIO patches to get faster file listing)
(cherry picked from commit 6d1c3f06c4)
(cherry picked from commit c5ac3d69ba)
Instead of using System.getProperty() directly, wrap the call into
GetPropertyAction and use AccessController to execute it.
(cherry picked from commit 4fefc6244b)
Only call XGetKeyboardMapping() once for all valid codes and cache the
resulting table. Use the cache on the subsequent calls to
keycodeToKeysym().
(cherry picked from commit 0ae3056c25)
Detect if we're running on a musl-based system by checking for the presence
of the libgcompat.so glibc compatibility library in the process' map.
If so, java is re-started with LD_LIBRARY_PATH set to point to the right
directory with libjvm.so. This works around the problem with the musl
dynamic library loader.
(based on commit 13a904ddb5)
(cherry picked from commit 51b5fe1b0c)
Introduced logging controlled with -Dsun.awt.x11.trace.
Currently, only looks at the AWT lock and reports methods holding it
sorted by average hold time.
(based on commit 792a58ea0e)
(based on commit 770b4dc9c1)
(cherry picked from commit 1ec3990980)
(cherry-picked from commit 07a5b9672e)
with fix for JBR-6436 crash in jb/java/awt/Focus/FullScreenFocusStealing.java and jb/java/awt/Window/FullScreenTwoFrames.java
(cherry picked from commit 98b3ac5221)
with fix for JBR-6569 macOS: SIGILL at [libsystem_kernel] __kill in This decoder will only decode classes that adopt NSSecureCoding. Class 'AWTView' does not adopt it.
(cherry picked from commit 7af653070f)
(cherry picked from commit db11bf6776)
make sure jb/java/awt/Focus/Typeahead* tests still pass
includes fixes for JBR-3786 javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on MacOS by timeout
(cherry picked from commit f5c5388fb5)
and JBR-4113 java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.java fails by time out on macOS
(cherry picked from commit d8d4c55a61)
(cherry picked from commit 9f6fa55673)
- changed open popup shortcut from Ctrl+N to Ctrl+M, so no new explorer windows appear if desktop gets focused by error
- added a click on the main test frame, so it gets focus when running from background cygwin process on Windows, otherwise it just flashes on the taskbar
(cherry picked from commit eda8e4d50e)
(cherry picked from commit 1c729008ce)
test case only
(cherry picked part of commit ee298f5287)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit b7d165e486)
Initiate move/resize event on first appearance of window having FULL_WINDOW_CONTENT property set
(cherry picked from commit a6ea081ba2)
(cherry picked from commit dd6877af04)
use the new invocation approach for 'makeKeyAndOrderFront' as well, as it can also cause synchronous back-calls to accessibility subsystem, and change the global call order unexpectedly
this commit fixes TypeaheadSetVisibleTest and TypeaheadToFrontTest, when they are run with AltTab active
Guard against possible deadlocks, if UI-related methods are invoked not on EDT.
Sample deadlock scenario:
* Application thread attempts to show the window, this involves calling CWrapper.NSWindow.makeKeyAndOrderFront under AWT tree lock, which blocks till 'makeKeyAndOrderFront' completes on AppKit thread
* AppKit thread, while executing 'makeKeyAndOrderFront' performs 'back-call' to CAccessibility.getFocusOwner, which waits for execution on EDT
* EDT performs some activity requiring AWT tree lock (e.g. processing of PaintEvent)
(cherry picked from commits e3aaff5db4, 09941119e1)
(cherry picked from commit 513767dce6)
(cherry picked from commits 99242748ee, ad1595b5c2)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 9eacb21298)
(cherry picked from commit 84ff4eab21)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 6b02027600)
JBR-3976 Fixed text spacing & emoji scaling on macOS
JBR-3638 Adjust subpixel glyph positions for correct rounding in CStrike#getGlyphImageBounds
(cherry picked from commit 4590e49b61)
Implemented alpha blending in grayscale text rendering (UX-1320)
Corrected bright text thickness (smooth on), bright and dark text thickness (smooth off)
Added JVM properties for fine tuning
(cherry picked from commit c30306f779)
(cherry picked from commit c95adeb8f2)
(cherry picked from commit 269c9580fb)
(cherry picked from commit 55c7be5fe9)
(cherry picked from commit e28ff71e97)
(cherry picked from commit 6fb9aaf291)
Save current blend mode before cached grayscale rendering
(cherry picked from commit 7beb75ccec)
(cherry picked from commit ed52fde57d)
(cherry picked from commit 1a46cd70af)
Disable subpixel positioning for macOS 10.13+ if legacy LCD rendering is disabled
(cherry picked from commit dbd24232e4)
(cherry picked from commit 9fbf990e83)
Converted gradle JUnit test to plain java for ant and gnumake
To run the tests:
cd src/demo/share/java2d/RenderPerfTest
ant run
or
java -jar dist/RenderPerfTest.jar
or
java -jar dist/RenderPerfTest.jar testWhiteTextBubblesGray
(cherry picked from commit 356121b18f)
(cherry picked from commit 8bd8d2d132)
(cherry picked from commit 448aad87bc)
Reverting gamma correction because of rendering artifacts in the light theme
This reverts commit 5016db51
(cherry picked from commit c1d644a004)
(cherry picked from commit ade5b22a83)
JBR-2412 [windows] mouse listener does not work for jcef
(cherry picked from commit 66ad6472ae)
(cherry picked from commit 04246aac57)
(cherry picked from commit b7cde4fd05)
(cherry picked from commit d325b98b54)
Introduced sun.awt.osx.RobotSafeDelayMillis property to control macOS specific safe delay for Robot methods.
50 ms safe delay was initially hardcoded in 3862142d (JDK-8242174: [macos] The NestedModelessDialogTest test make the macOS unstable) which affected performance tests execution.
(cherry picked from commit 5f691bb788)
(cherry picked from commit cfc90ce2c5)
Checks that JS Query is handled in 2nd opened browser
(cherry picked from commit 404ff84565)
Refactoring + changed EDT awaiting method
(cherry picked from commit dc24658b31)
(cherry picked from commit f191726147)
Do not pass the result via java object. Use more straight api.
(cherry picked from commit 9f91fe91f5)
(cherry picked from commit c0fd2daf5c)
(cherry picked from commit 1bfd5ad21c)
Used user home dir for jbr_err files. Removed logging with reportException method
(cherry picked from commit 2c8cdb221b)
JBR-2382 Provide detailed stack trace in crash dumps for unhandled ObjC exceptions
Used process workdir for jbr_err files. Added one more logging to reportException method
(cherry picked from commit 95a47810d5)
JBR-2382 Provide detailed stack trace in crash dumps for unhandled ObjC exceptions
Generate jbr_err_pidXX.log file with detailed stack trace of the exception
(cherry picked from commit 4c42f75021)
(cherry picked from commit 9ed5cac63d)
- added workaround for JBR-2585
- added README.md about manual test run
- made an update to close LinuxTouchScreenDevice properly
- added an error exit from linux shell script if sudo password is empty or chown fails
(cherry picked from commit 4deb3bbe61)
(cherry picked from commit a13b014719)
Update regression test after the following commits:
02fad83c: Remove public constants from KeyEvent
f4227faf: Impossible to assign cmd+ß shortcuts
(cherry picked from commit 264802cf4b)
(cherry picked from commit 679b5d8cd3)
Updated reproducer
(cherry picked from commit 529a188b8b)
JBR-2256 JEditorPane with test/html type and zero margins is not shown
Added reproducer
(cherry picked from commit 41578a40b5)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 775801a875)
Added regression test
(cherry picked from commit 4e1f5a43b3)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit f7cf514da2)
- java/awt/TextArea/DisposeTest/TestDispose.java, java/awt/TextField/DisposeTest/TestDispose.java: fixed test frame disposal
- java/awt/Frame/DisposeStressTest/DisposeStressTest.java: decreased test timeout from 2h to 10 min, added minor diagnostic logging
(cherry picked from commit 7f025f4e16)
(cherry picked from commit dda7f3d871)
(cherry picked from commit bc09aadadb)
(cherry picked from commit 0905abecf5)
Added a property to force loading bundled fonts: -Djava2d.font.noVersionCheck=true
(cherry picked from commit cbb148dff4)
(cherry picked from commit db7e53e67d)
(cherry picked from commit 1f4ab12fbb)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit ba00bacb9f)
(cherry picked from commit 2d587b3728)
(cherry picked from commit 92606f2c7f)
(cherry picked from commit 05af375909)
(cherry picked from commit 0f895bf1b2)
(cherry picked from commit 08aa0852b7)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 9bd62fade9)
(cherry picked from commit 6cc380ffb5)
(cherry picked from commit 958e25ed21)
(cherry picked from commit a7de601d5f)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 32a3948437)
1. NSFont.familyName is faster than loading allFamilyNames
2. Prebuilt list of system fonts
3. Cleanup San Francisco family loading
4. Avoid calling expensive native getWidth on font when creating font family, load styles only when they would be used.
(cherry picked from commit db44a8c70e)
(cherry picked from commit 2d9fb9e7b8)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 27f390cf9a)
and make more exception-safe
and minor optimization for logging (cache jobjects)
(cherry picked from commit 5839539379)
(cherry picked from commit 23a3321d6d)
(cherry picked from commit 30d479fbd4)
JBR-4899 Activate Previous Window doesn't work sometimes
(cherry picked from commit 63cb726f3c)
(cherry picked from commit ddeeb4c813)
(cherry picked from commit 41e89505be)
(cherry picked from commit 9fe5c778d9)
(cherry picked from commit 6ea9530d9f)
(cherry picked from commit d757108517)
(cherry picked from commit b99c1e7b5c)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 9745d7d7dc)
The proposed solution is to use a 'normal' font as a base for 'San Francisco' font fallback.
Most of its fallback components/candidates (provided by the OS) are expected to be normal
fonts as well, and so the resulting coverage of Unicode character repertoire should be much better.
(cherry picked from commits 9b7113a6cf, 92b00d50b5, 53489fab27)
(cherry picked from commit 7b14db7f6b)
The fix consists of two parts:
* Making CCharToGlyphMapper remember that a particular character cannot be displayed (isn't mapped to glyph with given font). Checking this repeatedly in native code is very slow.
* Make CCompositeGlyphMapper remember the results of char-to-glyph mapping, this was missing in previous implementation. This reuses caching code in CompositeGlyphMapper, extending the range of characters for which the results are cached to include Supplementary Multilingual Plane (most emoji characters belong to it).
port commit 4e0ccde2 from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit 394e055ae6)
cherry picked from commit 0db7e948af
(cherry picked from commit 7721393e5b)
port commit ba38e5c4 from JBR 9
port from JBR 11 to JBR 15(cherry picked from commit a949f9d220)
cherry-picked from commit f309844f75
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit f9942d50a8)
(cherry picked from commit 0900a705bc)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 0981cb572a)
Restored old behaviour of registerFontsInDir as it does not affect idea bundled fonts
(cherry picked from commit cef29e8100)
(cherry picked from commit e3a1cdae23)
Added -it pattern into italic detection code
Added some more patterns to bold and italic detection code
'Anka/Coder' font support
(cherry picked from commit 5119eeee12)
(cherry picked from commit ec241e4a0a)
(cherry picked from commit 251068294e)
(cherry picked from commit 08ae9ff034)
(cherry picked from commit b472b89fba)
Use different family for specific font faces. Refactoring
JBR-3071 Remove naming workaround for Fira Code
(cherry picked from commits c423003bd4, aee4b48d20)
(cherry picked from commit 8838b708be)
Lower priority for idea bundled fonts to pickup platform ones
(if installed)
(cherry picked from commit e838103a24)
(cherry picked from commit 181c757ebe)
Updated the fonts to v0.19. Bundled italic fonts
(cherry picked from commit 7f032e3fe7)
(cherry picked from commit a7b4c9449a)
(cherry picked from commit 9c9cea0871)
Lower priority for idea bundled fonts to pickup platform ones
(if installed)
(cherry picked from commit e838103a24)
(cherry picked from commit 517bd6d449)
Used CFont instead of TrueTypeFont for bundled fonts on mac
Use different family for specific font faces. Refactoring
(cherry picked from commit 8c86ad3e96)
(cherry picked from commit c423003bd4)
(cherry picked from commit bcae402dc8)
(cherry picked from commit e53374aab3)
Update family name for JetBrainsMono-Thin
(cherry picked from commit 0d2326ff34)
(cherry picked from commit 83843f9124)
(cherry picked from commit 2a2e1cfb36)
(cherry picked from commit 76abb69262)
(cherry picked from commit 1350ceb04b)
recreate instance of system InputMethod when starts filter all events
(cherry picked from commit 3ad94911af)
(cherry picked from commit c8533a1219)
(cherry picked from commit 42c5f07276)
When XGetImage() calls become slow in a remote X11 session, fake
XGetImage() with client-side XCreateImage() that is filled with some
background color. The color is chosen from several top left corner
pixels of the "slow" images obtained with XGetImage().
This feature activates in a remote X11 session only and is
controlled with -Dremote.x11.workaround={true|false|auto}.
(cherry picked from commit 76decaa4ef)
Fix modality for Common Item Dialog
squash! JBR-1257 CommonItemDialog modal window has no owner
JBR-2478 java/awt/Modal/FileDialog/FileDialogNonModal7Test.java: DummyButton on Dialog did not gain focus when clicked
revert part of JBR-1271, that's related to 'old' file dialogs
(cherry picked from commit 8bc4787c11)
(cherry picked from commit 3d898a8024)
(cherry picked from commit f368f0f101)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 362b7d402d)
(cherry picked from commit 0be0a018b5)
(cherry picked from commit 5bb4c2a1d6)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 7fa8aa1568)
(cherry picked from commit b808be6a6a)
(cherry picked from commit 48b7dd874f)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit a39264214b)
Replaced [NSScreen screens] 'objectAtIndex' with 'firstObject' to get nil instead of NSRangeException. Added nil checks
(cherry picked from commit d6b98511262055c01522d9ec8024253af7e91564)
(cherry picked from commit cef970e1ba)
(cherry picked from commit 9f34bb4ee4)
Increased rendering queue buffer up to 6.4 MB
(cherry picked from commit 9ef00f00a7fb6e14835393f8d3944157c6800727)
(cherry picked from commit 2a61e9e997a880a60c5acb361849205170501b91)
(cherry picked from commit 68ca9f00ded004c970b94bd047a04b9f09237047)
(cherry picked from commit 2fe5289178)
(cherry picked from commit 560a65654e)
Disable LCD text shader on macOS 10.14+ if LCD rendering is not explicitly specified
(cherry picked from commit dffea9d701)
(cherry picked from commit 1628d6120e)
JBR-5008 remove extra file jb/java/awt/font/DrawTest.java from colliding group
(cherry picked from commit 6f1c0a6)
(cherry picked from commit 63130fd461)
add regression test on https://bugs.openjdk.java.net/browse/JDK-8139176
(cherry picked from commit 380c17456c)
(cherry picked from commit 6f1c0a6)
(cherry picked from commit 63130fd461)
(cherry picked from commit 33bbc7d54d)
(cherry picked from commit 4ffb665)
(cherry picked from commit 00a29ad129)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 05ad949ded)
Moved task execution on AppKit to the privileged block. Minor refactoring
(cherry picked from commit 5dbb88471115c9e4a536ae37d0e6794de9e5ac9c)
(cherry picked from commit fd2f9a1166)
Moved CG api calls to AppKit thread
(cherry picked from commit fd0210f035199e8612097a2c1d42b90cfd2111f8)
(cherry picked from commit 5e99e376d9dfe477401121878704630c3c13f9f7)
(cherry picked from commit 6d73b25130)
(cherry picked from commit 9519ac1e6e)
Replaced number of CGWindowListCopyWindowInfo for each window layer with [NSWindow windowNumberAtPoint: belowWindowWithWindowNumber:]
(cherry picked from commit 2a143af4d62340acdfd9c94d876f684385febbc8)
(cherry picked from commit 6fc369e8bf)
(cherry picked from commit 91b0084667)
Replaced glyph outlines with bounding boxes for glyph boundaries calculation for most common usages. Also, skipped unnecessary OGL flushes in OGL rendering queue
(cherry picked from commit c58dc052af48887338a38beb0c721eddca3af481)
(cherry picked from commit 7f6be7cfb907bbf1c3572b911df5690fa3039fde)
(cherry picked from commit c68913d82c0ba4b4c509179123f0a4bf7971f857)
(cherry picked from commit 9cfa04c93ad416a8177d9e7ca410850bd3ff880f)
(cherry picked from commit 0e930841704e4e98ecc0c888b144245e74218799)
(cherry picked from commit 8ffc190fbdb059d5a24842115c0bc3ade8b351b9)
(cherry picked from commit 0f7c26186a)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit e20819c77b)
Adopted CThreading related code to OpenJDK17 source base
(cherry picked from commit 5dfb30ae68b2c54d58c98a9195709c031f823581)
(cherry picked from commit 94163bd69f64616836523e81567aa1141480d841)
(cherry picked from commit baca50b430)
Added detection of Awesome WM and handled similar to Sawfish WM
(cherry picked from commit 6742077ed198975949af567e8ef543f853397351)
(cherry picked from commit 2847be73c6)
(cherry picked from commit 916a2ab66f)
Added support for Xmonad WM
(cherry picked from commit c690c3c7fdf1390e6b1a8d388ff752a09391ae3c)
(cherry picked from commit 6851dc3441)
(cherry picked from commit e290bf8a0c)
(cherry picked from commit 62b04983f2)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit e4f68d461c)
(cherry picked from commit 0161050077)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 8b2f0315d1)
(cherry picked from commit 0c2b6e1c04)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 8c6ecf33f1)
(cherry picked from commits 11732c2469, 0ed7deabaa)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit cc952f4053)
this test failing in jtreg launch most probably indicates either some problem with the environment (e.g. some windows left open from previously launched processes) or with java.awt.Robot implementation
(cherry picked from commit 1d525a2d2f)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 9c3043a557)
(cherry picked from commits 1a9838082e, f5b6222835, acd7e3b2da, cd6dd5c3cf8556f97f3113cb7d615a92393b57bf(partially), e8bbd8ffdd90f57cd12d7d7e89188be97ee4be0b(partially), 37901295e1, cafb374afc, 12034dcf61)
includes fix for JBR-4974 jb/java/awt/Focus/ModalDialogFromMenuTest.java intermittently clicks at tittle bar
Pause before getting the coordinates of the component to be clicked on,
not right before the click itself.
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 7855e07658)
port from JBR 11 to JBR 15 (cherry picked from commits b6583d0a71, 6003abc15f)
cherry picked from commit 93ad4f06dd
also includes JBR-4006 [JCK] javax.swing.text.html.CSS$Attribute.OVERFLOW_WRAP field breaks public API
(cherry picked from commit f20a3d8679)
and JBR-4007 [JCK] javax.swing.text.GlyphView.calcBreakSpots method breaks public API
(cherry picked from commit 1002eff4f3)
(cherry picked from commit f603f9e837)
port commit 11a5a4a2 from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit 65a5e450d5)
cherry picked from commit 47ff31ae82
(cherry picked from commit c4426e7ff2)
port commit ea9b75b3 from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit c6fed2cf58)
cherry picked from commit a5e25d1ef9
(cherry picked from commit a105a6e802)
port commit 778cef18 from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit 9caaac4a5a)
cherry picked from commit eea293f4a4
(cherry picked from commit 7b9b29493d)
port commit 82e7c82d from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit e9bd5f5dad)
cherry picked from commit e0475e9ba2
(cherry picked from commit 714ba79a84)
port commit 1f6bd200 from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit 32ce109355)
cherry picked from commit 087ff34c2e
(cherry picked from commit 86fa2a9c9b)
Corrected rendering hints for Non-AA text rendering
(cherry picked from commit b923aa7a0729a10ea47d3438622d659fbead44c9)
(cherry picked from commit b6bdd04e41)
(cherry picked from commit 8b12cf08ee)
Added property to disable bundled font config:
java2d.font.loadFontConf=false
Do not load custom font.conf by default
Moved hints adjusting logic from code to bundled font.conf file
Applied correction only for regular fonts with platform sizes less than 12
Some fonts are not corrected at all: Consolas, Noto Sans Mono
Used family name instead of physical one in requests to Fontconfig
Removed redundant call to FcConfigBuildFonts
Added privileged access to the properties (JRE-235,JRE-235)
(cherry picked from commit 4d4c915047077ebd966b0e3be056566d56ba11a4)
(cherry picked from commit 9d6f325f72482405264852f3ee2636f5fedaeaf0)
(cherry picked from commit e7e3372bf8db539c0f6bc85db9f1093f8fa4c380)
(cherry picked from commit 3e724caed2f199be50d25d1ecb20b7819c86be2e)
(cherry picked from commit d372b35963c096a32331b05b257e26841ace5d94)
(cherry picked from commit 18a5f5de03eb107f89dca138a44b9aab2151235c)
(cherry picked from commit 9ba320efef0539f75aa93fd1b5dd80266c954d0a)
(cherry picked from commit b8c38f419972af61291953f7f452c1698f7a1624)
(cherry picked from commit debba0128e200be60adc9a339d5985590ef4e230)
(cherry picked from commit 2fa17b1bd7d6524e4b5fa4d0b3ce2bf02a8fcc78)
(cherry picked from commit 09b4f61db0d4f5beea0e16ce9136c99e2185c10b)
(cherry picked from commit 3b6782dd742f9c74a9535145db2f9f7ffaccf7c8)
(cherry picked from commit f1b68149528c13a22fa64468c130b1405bf3d081)
(cherry picked from commit db5cf5a2b9cb454630fb86783c2d58cd5446cba6)
(cherry picked from commit 32140948578bc3c2a0c5f8adb537660421efe5e7)
(cherry picked from commit b978e3d0b131ed642774c5a14a649e13f764c20b)
(cherry picked from commit c75c1ef8b2)
(cherry picked from commit a29f19e6a2)
(cherry picked from commit c38c46744f)
port commit ccc1ded6 from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commit 72fb9ff7c4)
cherry picked from commit a5bd092449
(cherry picked from commit 52ebd26933)
don't apply FreeType-returned glyph advance for rotated glyphs rendered by GDI
This seems to produce a better looking text (more evenly spaced). Fractional metrics won't be respected by this code, but we can address this later if needed.
port commits c9debd5e, ed78cd00, 4c7e1619, 7aa0429c, 7bd6c17c from JBR 9
port from JBR 11 to JBR 15 (cherry picked from commits d6b588bdab, dbc15fb84e)
cherry picked from commit 2c0d6150d0
(cherry picked from commit 12f2233f94)
(cherry picked from commit 236bd38d1b)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 45b52492a9)
(cherry picked from commit 1f4ad38d23)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit b2f584b10a)
(cherry picked from commit 15693661cc)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit ae4c4c017d)
(cherry picked from commit c7b0ac686f)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit e8e81b7509)
(cherry picked from commit 3a7b3c67b0)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 7439fd115a)
(cherry picked from commit cb4453b1d1)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit dde86b1e6c)
(cherry picked from commit 37dc13c603)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit a5e094dd07)
(cherry picked from commit d04debc847)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 5a47f2a66c)
(cherry picked from commit 3a43f4557f)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit f534b029e2)
(cherry picked from commit 0026095202)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 1d0be02755)
(cherry picked from commit 1ce8c3ce82)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 0200338c3c)
(cherry picked from commit c4a1277c1b)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 39bd5023d4)
(cherry picked from commit 4a14c6f15a)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 4643b6a354)
(cherry picked from commit 82cd480619)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 84c0444389)
(cherry picked from commit c8f248a936)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 9aa93e5907)
Provided fallback to default font rendering settings if libfontconfig unable to
match font pattern
(cherry picked from commit d93a5f1598)
(cherry picked from commit ebaea7e146)
Skip FT_Library_setLcdFilter call if the symbol is not there
Cache negative FT_Library_setLcdFilter symbol lookup result
Used RTLD_DEFAULT handler for process symbols lookup
(cherry picked from commit e6f0055704)
(cherry picked from commit dfbc7d7cc2)
Disable FT_LOAD_TARGET_LIGHT for fonts with FC_AUTOHINT=false (this target implicitly enables FC_AUTOHINT)
Reused setupLoadRenderFlags for all rendering cases
(cherry picked from commit f3f2667a4c)
(cherry picked from commit e5a81a300f)
This code is needed for "Read org.gnome.desktop.interface/scaling-factor".
Keep it until "JDK-8260270 Implement the HiDPI scale factor reading" is fixed.
This reverts commit a7c2ebc7
(cherry picked from commit a249b989e1)
(cherry picked from commit 2daaf21e420d4af15d3b1bfeb3f896074bea1e61)
(cherry picked from commit 9ea2011948)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit b6b83ff41f)
Apply only WmEraseBkgnd
(cherry picked from commit afa68f7ad6440303c6417be3f675b1c4644b6014)
(cherry picked from commit 0651b45e13)
(cherry picked from commit cfeb8ba435)
(cherry picked from commit 76aba25)
(cherry picked from commit df11dcc97bb5556ac5d0299b773a512b4f0bb5bb)
(cherry picked from commit aeea6c1ca3)
(cherry picked from commit 3fbb520b07)
(cherry picked from commit 6c3087e6bda32ae9b095e069d8bea614502f5c03)
(cherry picked from commit adb3a4be16)
with fix for JBR-5300 Change source code and test files to use GPL license
(cherry picked from commit 5b987c7a94)
updateGC() is called from WWindowPeer.<init> though it's not applicable to the named dialogs
as they don't have native AwtWindow peer required for the method.
(cherry picked from commit 72ed9f653177e273b811cfe70c2dba102a8636e4)
(cherry picked from commit cec49aaa38)
(cherry picked from commit a279dd9e1c)
Adopted: rely on java.manifest
(cherry picked from commit d00cfa4dc62a14a4cf89df9d4c4899970c9fc9e8)
Adopted
(cherry picked from commit 60be76b725)
(cherry picked from commit 8ec82c766b)
Use the GTK method:
https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-get
to retrieve "gtk-xft-dpi" integer property of the X settings.
Add the property to JDK's GtkEngine & gtk2-interface.
Then read the property via GtkEngine from GTK LaF when "gnome.Xft/dpi" is undefined. It's assumed GTK LaF is forcedly installed.
(cherry picked from commit e05fc391ae0a3cc389e836441f882c0cf6ab3b99)
(cherry picked from commit fd615a5b45)
(cherry picked from commit adc80251ad)
Used desktop DPI instead of hard-coded 72
Compensated increased glyph bitmap size by adjusting font size
Added LCD filter for sub-pixel rendering
Use fontconfig library to provide right rendering options for fonts
Corrected sizes passed to fontconfig library and hinting disabling policy
Added logging and versioned fontconfig lib loading
Resolved font rendering problem in lenses
fix text rendering issues (text cutoff and incorrect rendering in editor fragment components)
FcMatchFont-type pattern substitutions shouldn't be invoked before specific font is selected - it can apply unrelated rules
port commit e21cd635 from JBR 9
partially rollback JBR-363 fix, to apply corresponding change from OpenJDK 12
(cherry picked from commit 5d704a963b)
(cherry picked from commit 3d7ac30072)
(cherry picked from commit 0456745afb)
(cherry picked from commit 3d7ac30072)
(cherry picked from commit 4c8351fecf)
(cherry picked from commit 5faebc73d5)
(cherry picked from commit d1ed8ab118)
(cherry picked from commit 20487c7515)
Passed the configure script options necessary to enable reproducible builds
on Windows. With this options, the resulting jars are reproducible, but
native executables and libraries aren't.
(cherry picked from commit c1da1fa0d6)
add exec permissions && fix misprint in checking if headers exist
move the script comparing performance results from jdk8u_test
(cherry picked from commit 924e7baadd)
Make mkimages.sh produce more deterministic .tar.gz archives on MacOS.
NB: build notarization is not in the scope of this change.
(cherry picked from commit e1a1b6814d)
(cherry picked from commit 43f7ebddec)
This commits achieves almost the same build output with the same build
input on Linux. Exceptions are:
- class files timestamps differ in jrt-fs.jar (for all output),
- class files timestamps differ in all the jmod files (for
jbrsdk...tar.gz).
NB: jbrsdk...test...tar.gz does not need to be deterministic.
This was achieved mainly by
- setting several environment variables (SOURCE_DATE_EPOCH, TZ),
- providing the necessary options to the configure script,
- setting the timestamp of all files that make up the resulting
archive to SORUCE_DATE_EPOCH and normalizing the list of said
files before archiving.
(cherry picked from commit ffded82734)
(cherry picked from commit 38ec30a58d)
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
In the Cygwin shell:
```
$ cd JetBrainsRuntime
$ git checkout main
$ bash configure --with-toolchain-version=2019
$ make images
```
This will build the release configuration under `./build/windows-x86_64-server-release/`.
#### Enable optional NVDA screen reader support
If you want to add support of a11y announcing via [NVDA screen reader](https://www.nvaccess.org/about-nvda/),
you will need to bundle the NVDA Controller Client library.
You can do it with the following steps:
1. Download the NVDA Controller Client library. You can find the link in its official README [here](https://github.com/nvaccess/nvda/blob/master/extras/controllerClient/readme.md)
2. Pass the path to the unpacked package to `configure` via an additional flag `--with-nvdacontrollerclient=<path>`.
The build system will search the required library files under `<path>/<target-arch>`.
#### Disable optional JAWS screen reader support
JBR is built with built-in support of JAWS screen reader.
If you want to disable it, run `configure` with the additional flag `--disable-jaws-client`.
### macOS
Install the following:
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
AC_MSG_NOTICE([Can't find dbus-1 library. This library is needed to use some features. You can install dbus-1 library or specify include directories manually by giving --with-dbus-includes option.])
<optionname="notice"value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year 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."/>
<optionname="notice"value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year 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."/>
<optionname="notice"value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year 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."/>
<optionname="notice"value="Copyright &#36;originalComment.match("Copyright (\d+)", 1, "-")&#36;today.year 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."/>
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.