Compare commits

..

8 Commits
1542 ... 1548

Author SHA1 Message Date
Anton Tarasov
995e2643c6 JBR-3525 SIGSEGV at sun.lwawt.macosx.CAccessible.unregisterFromCocoaAXSystem with enabled VO 2021-07-08 13:57:45 +03:00
Artem Semenov
ff7ca94ca3 JBR-3566: macOS: SIGILL at [libsystem_kernel] NPE in +[JavaComponentAccessibility createWithParent:accessible:role:index:withEnv:withView:isWrapped]: 2021-07-07 15:34:53 +03:00
Artem Semenov
4a393c0243 JBR-3548 macOS: SIGILL at [libsystem_kernel] __kill NPE / +[JavaComponentAccessibility createWithAccessible:withEnv:withView:isCurrent:] 2021-07-07 14:42:57 +03:00
Maxim Kartashev
b4316f0317 JBR-3592 Port 8267307 back to JBR11
8267307: Introduce new client property for XAWT: xawt.mwm_decor_title

Reviewed-by: azvegint, serb
2021-07-07 12:06:56 +03:00
Maxim Kartashev
404a4329c7 JBR-3590 Update JetBrains Runtime README 2021-07-06 18:04:56 +03:00
Nikita Gubarkov
504f91d4d1 JBR-3588 check for zero subpixel glyph resolution and fallback to 1x1 2021-07-06 14:25:31 +03:00
Maxim Kartashev
0895519455 JBR-3572 Wayland: java/awt/Window/WindowTitleVisibleTest/WindowTitleVisibleTestLinuxGnome.java: title bar shown and hidden are the same.
Exclude the test when running under XWayland that doesn't implement
screen capture necessary for the test to function.
2021-07-06 01:23:31 -07:00
Vitaly Provodin
ba57c58ac7 return back security tests into exclude list 2021-07-06 07:24:20 +07:00
13 changed files with 205 additions and 96 deletions

128
README.md
View File

@@ -1,84 +1,132 @@
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
# How JetBrains Runtime is organised
## Workspaces
# Welcome to JetBrains Runtime!
[github.com/JetBrains/JetBrainsRuntime](https://github.com/JetBrains/JetBrainsRuntime)
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
It includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes.
## Getting sources
__macOS, Linux:__
## Contents
- [Welcome to JetBrains Runtime](#jetbrains-runtime)
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
- [Getting Sources](#getting-sources)
- [macOS, Linux](#macos-linux)
- [Windows](#sources-windows)
- [Configuring the Build Environment](#configuring-the-build-environment)
- [Linux (Docker)](#linux-docker)
- [Ubuntu Linux](#ubuntu-linux)
- [Windows](#build-windows)
- [macOS](#macos)
- [Contributing](#contributing)
- [Resources](#resources)
## Products Built on JetBrains Runtime
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
## Getting Sources
### macOS, Linux
```
git config --global core.autocrlf input
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
__Windows:__
### Windows
<a name="sources-windows"></a>
```
git config --global core.autocrlf false
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
# Configure local build environment
[OpenJDK build docs](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html)
Tip for all platforms: run `./configure` and check output.
Usually, it has meaningful advice how to solve your problem.
## Configuring the Build Environment
Here are quick per-platform instructions for those who can't wait to get started.
Please refer to [OpenJDK build docs](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html) for in-depth
coverage of all the details.
## Linux (Docker)
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
> It would usually have a meaningful advice on how to solve the problem.
### Linux (Docker)
Create a container:
```
$ cd jb/project/docker
$ docker build .
...
Successfully built 942ea9900054
```
Run these commands in the new container:
```
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
# cd /JetBrainsRuntime
# sh ./configure
# make images CONF=linux-x86_64-normal-server-release
```
## Linux (Ubuntu 18.10 desktop)
### Ubuntu Linux
Install the necessary tools, libraries, and headers with:
```
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
```
Then run the following:
```
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
$ cd JetBrainsRuntime
$ sh ./configure --disable-warnings-as-errors
$ make images
```
## Windows
Install:
* [Cygwin x64](http://www.cygwin.com/)
Required packages: autoconf, binutils, cpio, diffutils, file, gawk, gcc-core, make, m4, unzip, zip.
**Install them while installing Cygwin**.
* Visual Studio compiler toolset [Download](https://visualstudio.microsoft.com/downloads/)
Visual Studio 2015 has support by default.
**Install with desktop development kit, it includes Windows SDK and compilers**.
* [Java 11](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
If you have problems while configuring [read Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html)
### Windows
<a name="build-windows"></a>
Install the following:
* [Cygwin x64](http://www.cygwin.com/).
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
Install those together with Cygwin.
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
Install with the desktop development kit, which includes Windows SDK and compilers.
Visual Studio 2015 is supported by default.
* [Java 11](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
From command line:
From the command line:
```
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
```
First command will set env vars, the second will run Cygwin shell with proper environment.
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
In Cygwin shell:
```
cd JetBrainsRuntime
bash configure --enable-option-checking=fatal --with-toolchain-version=2015 --with-boot-jdk="/cygdrive/c/Program Files/Java/jdk-11.0.5" --disable-warnings-as-errors
make images
In the Cygwin shell:
```
$ cd JetBrainsRuntime
$ bash configure --enable-option-checking=fatal --with-toolchain-version=2015 \
--with-boot-jdk="/cygdrive/c/Program Files/Java/jdk-11.0.5" --disable-warnings-as-errors
$ make images
```
## macOS
Install Xcode command line developer tools, autoconf (via Homebrew).
### macOS
Install Xcode command line developer tools and `autoconf` via [Homebrew](getDpiInfo).
Run:
From the command line:
```
sh ./configure --prefix=$(pwd)/build --disable-warnings-as-errors
make images
$ cd JetBrainsRuntime
$ sh ./configure --prefix=$(pwd)/build --disable-warnings-as-errors
$ make images
```
## Contribution
We will be happy to receive your pull requests. Before you submit one, please sign our Contributor License Agreement (CLA) https://www.jetbrains.com/agreements/cla/
## Contributing
We are happy to receive your pull requests!
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
## Resources
* [JetBrains Runtime on github](https://github.com/JetBrains/JetBrainsRuntime)
* [OpenJDK build instructions](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html)
* [OpenJDK test instructions](http://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html#running-tests)
* [How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/)

View File

@@ -63,6 +63,9 @@ class CAccessible extends CFRetainedResource implements Accessible {
return newCAX;
}
@Override
protected native void nativeCFRelease(final long ptr, final boolean disposeOnAppKitThread);
private static native void unregisterFromCocoaAXSystem(long ptr);
private static native void valueChanged(long ptr);
private static native void selectedTextChanged(long ptr);

View File

@@ -34,7 +34,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
* correct AppKit threading and Objective-C GC semantics.
*/
public class CFRetainedResource {
private static native void nativeCFRelease(final long ptr, final boolean disposeOnAppKitThread);
protected native void nativeCFRelease(final long ptr, final boolean disposeOnAppKitThread);
private final boolean disposeOnAppKitThread;
// TODO this pointer should be private and accessed via CFNativeAction class

View File

@@ -28,6 +28,28 @@
#import "sun_lwawt_macosx_CFRetainedResource.h"
void nativeCFRelease(JNIEnv *env, jlong ptr, jboolean releaseOnAppKitThread, bool (^condition)(jlong))
{
JNF_COCOA_ENTER(env);
if (releaseOnAppKitThread) {
// Releasing resources on the main AppKit message loop only
// Releasing resources on the nested loops may cause dangling
// pointers after the nested loop is exited
if ([NSApp respondsToSelector:@selector(postRunnableEvent:)]) {
[NSApp postRunnableEvent:^() {
if (condition(ptr)) CFRelease(jlong_to_ptr(ptr));
}];
} else {
// could happen if we are embedded inside SWT/FX application,
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
if (condition(ptr)) CFRelease(jlong_to_ptr(ptr));
}];
}
} else {
if (condition(ptr)) CFRelease(jlong_to_ptr(ptr));
}
JNF_COCOA_EXIT(env);
}
/*
* Class: sun_lwawt_macosx_CFRetainedResource
@@ -35,29 +57,7 @@
* Signature: (JZ)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease
(JNIEnv *env, jclass clazz, jlong ptr, jboolean releaseOnAppKitThread)
(JNIEnv *env, jobject peer, jlong ptr, jboolean releaseOnAppKitThread)
{
if (releaseOnAppKitThread) {
// Releasing resources on the main AppKit message loop only
// Releasing resources on the nested loops may cause dangling
// pointers after the nested loop is exited
if ([NSApp respondsToSelector:@selector(postRunnableEvent:)]) {
[NSApp postRunnableEvent:^() {
CFRelease(jlong_to_ptr(ptr));
}];
} else {
// could happen if we are embedded inside SWT/FX application,
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
CFRelease(jlong_to_ptr(ptr));
}];
}
} else {
JNF_COCOA_ENTER(env);
CFRelease(jlong_to_ptr(ptr));
JNF_COCOA_EXIT(env);
}
nativeCFRelease(env, ptr, true, ^bool (jlong ptr) { return true; });
}

View File

@@ -55,6 +55,8 @@
// for example, for AccessibleJTreeNode, whose currentComponent has index -1
+ (JavaComponentAccessibility *) createWithAccessible:(jobject)jaccessible withEnv:(JNIEnv *)env withView:(NSView *)view isCurrent:(BOOL)current;
+ (bool) isAllocated:(long)ptr;
@property(readonly) jobject accessible;
@property(readonly) jobject component;
@property(readonly) jint index;

View File

@@ -46,6 +46,8 @@ static JNF_MEMBER_CACHE(jm_getAccessibleContext, sjc_CAccessible, "getAccessible
static jobject sAccessibilityClass = NULL;
NSMutableArray *sJavaComponentAccessibilityPtrs = nil; // a list of pointers to allocated JavaComponentAccessibility objects
static void RaiseMustOverrideException(NSString *method)
{
@throw [NSException exceptionWithName:NSInternalInconsistencyException
@@ -55,6 +57,24 @@ static void RaiseMustOverrideException(NSString *method)
@implementation JavaComponentAccessibility
- (instancetype)init
{
if (self = [super init]) {
if (sJavaComponentAccessibilityPtrs == nil) {
sJavaComponentAccessibilityPtrs = [[NSMutableArray alloc] init];
[sJavaComponentAccessibilityPtrs retain]; // per-process persistent
}
[sJavaComponentAccessibilityPtrs addObject:[NSNumber numberWithLong:(jlong)self]];
}
return self;
}
+ (bool) isAllocated:(long)ptr
{
assert([NSThread isMainThread]);
return [sJavaComponentAccessibilityPtrs containsObject:[NSNumber numberWithLong:ptr]];
}
- (id)initWithParent:(NSObject *)parent withEnv:(JNIEnv *)env withAccessible:(jobject)accessible withIndex:(jint)index withView:(NSView *)view withJavaRole:(NSString *)javaRole
{
self = [self init];
@@ -94,6 +114,8 @@ static void RaiseMustOverrideException(NSString *method)
JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
[sJavaComponentAccessibilityPtrs removeObject:[NSNumber numberWithLong:(jlong)self]];
(*env)->DeleteWeakGlobalRef(env, fAccessible);
fAccessible = NULL;
@@ -220,11 +242,13 @@ static void RaiseMustOverrideException(NSString *method)
}
+ (jobject) getCAccessible:(jobject)jaccessible withEnv:(JNIEnv *)env {
JNF_COCOA_DURING(env);
if (JNFIsInstanceOf(env, jaccessible, &sjc_CAccessible)) {
return jaccessible;
} else if (JNFIsInstanceOf(env, jaccessible, &sjc_Accessible)) {
return JNFCallStaticObjectMethod(env, sjm_getCAccessible, jaccessible);
}
JNF_COCOA_HANDLE(env);
return NULL;
}
@@ -329,11 +353,13 @@ static void RaiseMustOverrideException(NSString *method)
{
JavaComponentAccessibility *ret = nil;
jobject jcomponent = [(AWTView *)view awtComponent:env];
JNF_COCOA_DURING(env);
jint index = JNFCallStaticIntMethod(env, sjm_getAccessibleIndexInParent, jaccessible, jcomponent);
NSString *javaRole = getJavaRole(env, jaccessible, jcomponent);
if ((index >= 0) || current) {
ret = [self createWithAccessible:jaccessible role:javaRole index:index withEnv:env withView:view];
}
JNF_COCOA_HANDLE(env);
(*env)->DeleteLocalRef(env, jcomponent);
return ret;
}
@@ -1152,9 +1178,29 @@ JNF_COCOA_EXIT(env);
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CAccessible_unregisterFromCocoaAXSystem
(JNIEnv *env, jclass jklass, jlong element)
(JNIEnv *env, jclass jklass, jlong ptr)
{
JNF_COCOA_ENTER(env);
[ThreadUtilities performOnMainThread:@selector(unregisterFromCocoaAXSystem) on:(JavaComponentAccessibility *)jlong_to_ptr(element) withObject:nil waitUntilDone:NO];
[ThreadUtilities performOnMainThreadWaiting:NO block:^() {
if ([JavaComponentAccessibility isAllocated:ptr]) {
[(JavaComponentAccessibility *)jlong_to_ptr(ptr) unregisterFromCocoaAXSystem];
}
}];
JNF_COCOA_EXIT(env);
}
extern void nativeCFRelease(JNIEnv *env, jlong ptr, jboolean releaseOnAppKitThread, bool (^condition)(jlong));
/*
* Class: sun_lwawt_macosx_CAccessible
* Method: nativeCFRelease
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CAccessible_nativeCFRelease
(JNIEnv *env, jobject peer, jlong ptr, jboolean releaseOnAppKitThread)
{
assert(releaseOnAppKitThread);
nativeCFRelease(env, ptr, true, ^bool (jlong ptr) {
return [JavaComponentAccessibility isAllocated:ptr];
});
}

View File

@@ -341,14 +341,14 @@ abstract class XDecoratedPeer extends XWindowPeer {
|| ev.get_atom() == XWM.XA_NET_FRAME_EXTENTS.getAtom())
{
if (XWM.getWMID() != XWM.UNITY_COMPIZ_WM) {
if (getWindowTitleVisibleProperty().isPresent()) {
if (getMWMDecorTitleProperty().isPresent()) {
// Insets might have changed "in-flight" if that property
// is present, so we need to get the actual values of
// insets from the WM and propagate them through all the
// proper channels.
wm_set_insets = null;
Insets in = getWMSetInsets(XAtom.get(ev.get_atom()));
if (!in.equals(dimensions.getInsets())) {
if (in != null && !in.equals(dimensions.getInsets())) {
handleCorrectInsets(in);
}
} else {
@@ -1333,15 +1333,14 @@ abstract class XDecoratedPeer extends XWindowPeer {
super.handleWindowFocusOut(oppositeWindow, serial);
}
// Client properties
public static final String WINDOW_TITLE_VISIBLE = "linux.awt.windowTitleVisible";
public static final String MWM_DECOR_TITLE_PROPERTY_NAME = "xawt.mwm_decor_title";
public final Optional<Boolean> getWindowTitleVisibleProperty() {
public final Optional<Boolean> getMWMDecorTitleProperty() {
Optional<Boolean> res = Optional.empty();
if (target instanceof javax.swing.RootPaneContainer) {
if (SunToolkit.isInstanceOf(target, "javax.swing.RootPaneContainer")) {
javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer) target).getRootPane();
Object prop = rootpane.getClientProperty(WINDOW_TITLE_VISIBLE);
Object prop = rootpane.getClientProperty(MWM_DECOR_TITLE_PROPERTY_NAME);
if (prop != null) {
res = Optional.of(Boolean.parseBoolean(prop.toString()));
}
@@ -1351,6 +1350,6 @@ abstract class XDecoratedPeer extends XWindowPeer {
}
public final boolean getWindowTitleVisible() {
return getWindowTitleVisibleProperty().orElse(true);
return getMWMDecorTitleProperty().orElse(true);
}
}

View File

@@ -34,6 +34,7 @@ import java.awt.Insets;
import java.awt.MenuBar;
import java.awt.Rectangle;
import java.awt.peer.FramePeer;
import sun.awt.SunToolkit;
import sun.util.logging.PlatformLogger;
import sun.awt.AWTAccessor;
@@ -50,9 +51,6 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
private static final int MENUBAR_HEIGHT_IF_NO_MENUBAR = 0;
private int lastAppliedMenubarHeight = MENUBAR_HEIGHT_IF_NO_MENUBAR;
// Client properties
public static final String WINDOW_TITLE_VISIBLE = "linux.awt.windowTitleVisible";
XFramePeer(Frame target) {
super(target);
}
@@ -84,9 +82,9 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
}
private void registerWindowDecorationChangeListener() {
if (target instanceof javax.swing.RootPaneContainer) {
if (SunToolkit.isInstanceOf(target, "javax.swing.RootPaneContainer")) { // avoid unnecessary class loading
javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer) target).getRootPane();
rootpane.addPropertyChangeListener(WINDOW_TITLE_VISIBLE, e -> winAttr.decorations = getWindowDecorationBits() );
rootpane.addPropertyChangeListener(MWM_DECOR_TITLE_PROPERTY_NAME, e -> winAttr.decorations = getWindowDecorationBits() );
}
}
@@ -98,15 +96,15 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
decorations = XWindowAttributesData.AWT_DECOR_ALL;
if (!getWindowTitleVisible()) {
// NB: window must be [re-]mapped to make this change effective. Also, window insets will probably
// NB: the window must be [re-]mapped to make this change effective. Also, window insets will probably
// change and that'll be caught by one of the subsequent property change events in XDecoratedPeer
// (not necessarily the next event, though).
// (not necessarily the very next event, though).
decorations = XWindowAttributesData.AWT_DECOR_BORDER;
}
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Frame''s initial decorations affected by the client property {0}={1}",
WINDOW_TITLE_VISIBLE, getWindowTitleVisibleProperty());
MWM_DECOR_TITLE_PROPERTY_NAME, getMWMDecorTitleProperty());
}
}

View File

@@ -185,11 +185,13 @@ public class XRGlyphCacheEntry {
}
public byte getSubpixelResolutionX() {
return StrikeCache.unsafe.getByte(glyphInfoPtr + StrikeCache.subpixelResolutionXOffset);
byte rx = StrikeCache.unsafe.getByte(glyphInfoPtr + StrikeCache.subpixelResolutionXOffset);
return rx < 1 ? 1 : rx;
}
public byte getSubpixelResolutionY() {
return StrikeCache.unsafe.getByte(glyphInfoPtr + StrikeCache.subpixelResolutionYOffset);
byte ry = StrikeCache.unsafe.getByte(glyphInfoPtr + StrikeCache.subpixelResolutionYOffset);
return ry < 1 ? 1 : ry;
}
public long getGlyphInfoPtr() {

View File

@@ -52,7 +52,8 @@ requires.properties= \
vm.hasSAandCanAttach \
vm.hasJFR \
docker.support \
release.implementor
release.implementor \
display.XWayland
# Minimum jtreg version
requiredVersion=4.2 b12

View File

@@ -25,10 +25,11 @@
/**
* @test
* @key headful
* @summary Verifies client property for Linux linux.awt.windowTitleVisible.
* @summary Verifies the client property xawt.mwm_decor_title for Linux.
* Note: the test requires GNOME Shell window manager and will automatically
* pass with any other WM.
* @requires (os.family == "linux")
* @requires !display.XWayland
* @run main WindowTitleVisibleTestLinuxGnome
*/
@@ -83,7 +84,7 @@ public class WindowTitleVisibleTestLinuxGnome
captureTitleBarNotVisible();
if (imagesEqual(titleBarImageVisible, titleBarImageNotVisible)) {
throw new RuntimeException("Test failed: title bar shown and hidden are the same.");
throw new RuntimeException("Test failed: title bars shown and hidden are the same.");
}
runSwing(() -> frame.dispose());
@@ -107,23 +108,19 @@ public class WindowTitleVisibleTestLinuxGnome
}
private void captureTitleBarNotVisible() {
runSwing( () -> {
titleBarImageNotVisible = robot.createScreenCapture(titleBarBounds);
});
titleBarImageNotVisible = robot.createScreenCapture(titleBarBounds);
}
private void hideTitleBar() {
runSwing( () -> {
rootPane.putClientProperty("linux.awt.windowTitleVisible", false);
rootPane.putClientProperty("xawt.mwm_decor_title", false);
frame.setVisible(false);
frame.setVisible(true);
});
}
private void captureTitleBarVisible() {
runSwing( () -> {
titleBarImageVisible = robot.createScreenCapture(titleBarBounds);
});
titleBarImageVisible = robot.createScreenCapture(titleBarBounds);
}
private void constructAndShowFrame() {
@@ -131,7 +128,7 @@ public class WindowTitleVisibleTestLinuxGnome
frame = new JFrame("IIIIIIIIIIIIIIII");
frame.setBounds(100, 100, 300, 150);
rootPane = frame.getRootPane();
rootPane.putClientProperty("linux.awt.windowTitleVisible", true);
rootPane.putClientProperty("xawt.mwm_decor_title", true);
JComponent contentPane = (JComponent) frame.getContentPane();
JPanel comp = new JPanel();
contentPane.add(comp);

View File

@@ -837,12 +837,17 @@ com/sun/nio/sctp/SctpChannel/SocketOptionTests.java
sun/security/lib/cacerts/VerifyCACerts.java 8240268 generic-all
sun/security/pkcs11/ec/TestKeyFactory.java 8026976 generic-all
sun/security/pkcs11/Secmod/AddTrustedCert.java 8180837 generic-all
sun/security/pkcs11/tls/TestKeyMaterial.java 8180837 generic-all
sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8209398 generic-all
sun/security/pkcs11/Secmod/AddTrustedCert.java 8180837 generic-all
sun/security/pkcs11/tls/TestKeyMaterial.java 8180837 generic-all
security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java 8224768 generic-all
security/infra/java/security/cert/CertPathValidator/certification/BuypassCA.java 8243543 generic-all
security/infra/java/security/cert/CertPathValidator/certification/ComodoCA.java 8263059 generic-all
security/infra/java/security/cert/CertPathValidator/certification/LetsEncryptCA.java 8268678 generic-all
security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java 8248899 generic-all
############################################################################

View File

@@ -117,6 +117,7 @@ public class VMProps implements Callable<Map<String, String>> {
map.put("vm.compiler2.enabled", this::isCompiler2Enabled);
map.put("docker.support", this::dockerSupport);
map.put("release.implementor", this::implementor);
map.put("display.XWayland", this::displayXWayland);
vmGC(map); // vm.gc.X = true/false
vmOptFinalFlags(map);
@@ -515,6 +516,13 @@ public class VMProps implements Callable<Map<String, String>> {
}
}
protected String displayXWayland() {
final boolean isXWayland = (System.getenv("WAYLAND_DISPLAY") != null)
&& (System.getenv("DISPLAY") != null);
return String.valueOf(isXWayland);
}
/**
* Dumps the map to the file if the file name is given as the property.
* This functionality could be helpful to know context in the real