Compare commits

...

27 Commits

Author SHA1 Message Date
Nikita Tsarev
8e287c09a0 JBR-9330: Set scale for drag images [WLToolkit] 2025-09-22 17:12:10 +02:00
Vitaly Provodin
28f9408b29 fixup! update exclude list on results of 25.135.30 test runs 2025-09-22 04:51:45 +04:00
Vitaly Provodin
338f1df777 update exclude list on results of 25.135.30 test runs 2025-09-21 16:19:29 +04:00
Alexey Ushakov
690349f07c JBR-9376 Vulkan: Incorrect deallocation in VKDevice_Reset
Moved texture pool into VKRenderer

(cherry picked from commit 392514fc9daf57a501a0c1598fe2a0782045f335)
2025-09-19 12:38:41 +02:00
Dmitry Batrak
fe1d8d85ae JBR-9365 Unnecessary operations on tree node update
(cherry picked from commit cc5d9ca55c484bf8359135498836a64cc49c3406)
2025-09-18 13:41:52 +03:00
Maxim Kartashev
a1d745006b JBR-9332 Wayland: popups are not closed when parent looses focus 2025-09-16 13:36:33 +04:00
bourgesl
2d345b9aab JBR-9351 jb/java/awt/Counters/UpdateWindowsCounter.java fails by time out
Fixed Timers to be daemon
2025-09-16 08:02:29 +02:00
bourgesl
d720f1ee4a JBR-9350 javax/swing/JOptionPane/8081019/bug8081019.java: Cannot invoke "sun.lwawt.LWWindowPeer.getTarget()" because "this.peer" is null
Added peer null checks + use perfCountersEnabled flag
2025-09-16 08:00:43 +02:00
Nikita Provotorov
a2fa35786e JBR-9349 Do_Not_Use_calloc_Use_safe_Calloc_Instead: is not a member of global namespace
Refactoring the code of JBR-4478 so that C++ standard library headers get only included in AccessibleCaret.cpp and not in any headers.

(cherry picked from commit 12bbc14e5e)
2025-09-14 13:44:24 +02:00
bourgesl
e66f996829 JBR-9283 Enhance Window counters to provide statistics
Enhanced Window counters to provide statistics (using the new marlin StatDouble class), enhanced logging code to dump regularly (10s) window stats, added shutdown hook, bumpCounter() renamed to incrementCounter(), added addStat(window, name, value) used by MTLLayer to report blitTexture & nextDrawable timings (ms), use InnocuousThread for shutdown hooks, fixed D3DSurfaceData bumpCounter() usages to incrementCounter()

(cherry picked from commit af437d9d61)
2025-09-12 15:18:23 +02:00
Vitaly Provodin
8569475930 update exclude list on results of 25.107.28 test runs 2025-09-12 13:33:33 +04:00
Nikita Gubarkov
7433067506 JBR-9111 Vulkan: Lock RQ while disposing the surface 2025-09-11 15:25:26 +02:00
Nikita Gubarkov
2e517af41f JBR-9236 Vulkan: Proper builds without Vulkan 2025-09-11 11:03:12 +02:00
Nikita Tsarev
a54096f118 JBR-9336: Fix build error with old wayland protocol headers [WLToolkit] 2025-09-11 08:55:16 +02:00
Maxim Kartashev
d3f0367a19 JBR-9310 Wayland: Gtk-WARNING in swing app 2025-09-10 10:23:53 +04:00
Nikita Tsarev
14f93c154e JBR-9326 Support TransferHandler.setDragImage [WLToolkit] 2025-09-09 11:08:31 +02:00
Maxim Kartashev
07a1aee823 JBR-9302 Wayland: default window decoration to look more like KDE 2025-09-08 15:44:48 +04:00
Maxim Kartashev
3345eb8e16 JBR-9288 Wayland: use builtin window decorations in KDE 2025-09-08 15:44:41 +04:00
Dmitry Drobotov
987f5f9561 JBR-4478 Implement support for native accessible caret events on Windows
The feature adds caret tracking support for assistive tools that don't work with Java Access Bridge, specifically, for the built-in Windows Magnifier.
It works by implementing Win32 IAccessible interface for the text caret, and sending EVENT_OBJECT_LOCATIONCHANGE events whenever it changes.
It's enabled by default and can be disabled by setting `sun.awt.windows.use.native.caret.accessibility.events` property to false.

(cherry picked from commit 88f1599bad)
2025-09-08 06:54:45 +02:00
Maxim Kartashev
bfa8e73dcf JBR-9016 Make screenshot JBR API work on Windows 2025-09-05 17:33:08 +04:00
Maxim Kartashev
5493f14d30 JBR-9016 Add API for making screenshots of some regions of the application without interacting with OS 2025-09-04 13:23:01 +04:00
Maxim Kartashev
09ecf47329 JBR-9228 KDE: jb/java/awt/Toolkit/DetectingOSThemeTest.java fails 2025-09-04 12:01:59 +04:00
Maxim Kartashev
b3becb25a2 JBR-9289 Wayland: re-enable window shadow by default 2025-09-03 13:19:50 +04:00
Maxim Kartashev
8bad559f91 JBR-9289 Wayland: an option to turn window shadow off
Use -Dsun.awt.wl.Shadow=false to turn all the window shadows off
2025-09-03 12:49:12 +04:00
Nikita Gubarkov
43cbf9a7db JBR-7334 Skip custom title bar reconfiguration if nothing changed 2025-09-01 15:17:52 +02:00
Vitaly Provodin
3c70bd7f50 fixup! JBR-9238 Introduce distinct test groups for Vulkan runs 2025-08-29 15:47:14 +04:00
Vitaly Provodin
dca326f640 JBR-9274 turn off streaming output for attach API by default 2025-08-29 15:47:14 +04:00
60 changed files with 2123 additions and 466 deletions

View File

@@ -199,7 +199,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
-framework OpenGL, \
LIBS_windows := advapi32.lib comctl32.lib comdlg32.lib delayimp.lib \
gdi32.lib gdiplus.lib imm32.lib kernel32.lib ole32.lib shell32.lib shlwapi.lib \
user32.lib uuid.lib winmm.lib winspool.lib dwmapi.lib $(A11Y_NVDA_ANNOUNCING_LIBS), \
user32.lib uuid.lib winmm.lib winspool.lib dwmapi.lib $(A11Y_NVDA_ANNOUNCING_LIBS) oleacc.lib, \
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
EXTRA_RCFLAGS := $(LIBAWT_RCFLAGS), \
STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_STATIC_EXCLUDE_OBJS), \

View File

@@ -172,8 +172,8 @@ volatile AttachListenerState AttachListener::_state = AL_NOT_INITIALIZED;
AttachAPIVersion AttachListener::_supported_version = ATTACH_API_V1;
// Default is true (if jdk.attach.vm.streaming property is not set).
bool AttachListener::_default_streaming_output = true;
// Default is false (if jdk.attach.vm.streaming property is not set).
bool AttachListener::_default_streaming_output = false;
static bool get_bool_sys_prop(const char* name, bool default_value, TRAPS) {
ResourceMark rm(THREAD);

View File

@@ -33,7 +33,6 @@ import sun.lwawt.macosx.CFLayer;
import sun.util.logging.PlatformLogger;
import java.awt.Component;
import java.awt.GraphicsConfiguration;
import java.awt.Insets;
import java.awt.Window;
@@ -51,12 +50,13 @@ public class MTLLayer extends CFLayer {
private static native void nativeSetOpaque(long layerPtr, boolean opaque);
private int scale = 1;
private final boolean perfCountersEnabled;
public MTLLayer(LWWindowPeer peer) {
super(0, true);
Window target = (peer != null) ? peer.getTarget() : null;
boolean perfCountersEnabled = (target != null) && AWTAccessor.getWindowAccessor().countersEnabled(target);
this.perfCountersEnabled = (target != null) && AWTAccessor.getWindowAccessor().countersEnabled(target);
setPtr(nativeCreateLayer(perfCountersEnabled));
this.peer = peer;
@@ -150,11 +150,29 @@ public class MTLLayer extends CFLayer {
}
}
private final static String[] STAT_NAMES = new String[]{
"java2d.native.mtlLayer.drawInMTLContext", // type = 0
"java2d.native.mtlLayer.nextDrawable" // type = 1
};
private void addStat(int type, double value) {
// Called from the native code when this layer has been presented on screen
if (perfCountersEnabled && (peer != null)) {
final Component target = peer.getTarget();
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().addStat(window,
((type >= 0) && (type < STAT_NAMES.length)) ? STAT_NAMES[type] : "undefined", value);
}
}
}
private void countNewFrame() {
// Called from the native code when this layer has been presented on screen
Component target = peer.getTarget();
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().bumpCounter(window, "java2d.native.frames");
if (perfCountersEnabled && (peer != null)) {
final Component target = peer.getTarget();
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().incrementCounter(window, "java2d.native.frames");
}
}
}
@@ -162,9 +180,11 @@ public class MTLLayer extends CFLayer {
// Called from the native code when an attempt was made to present this layer
// on screen, but that attempt was not successful. This can happen, for example,
// when those attempts are too frequent.
Component target = peer.getTarget();
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().bumpCounter(window, "java2d.native.framesDropped");
if (perfCountersEnabled && (peer != null)) {
final Component target = peer.getTarget();
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().incrementCounter(window, "java2d.native.framesDropped");
}
}
}
}

View File

@@ -71,6 +71,8 @@
- (void) stopRedraw:(MTLContext*)mtlc displayID:(jint)displayID force:(BOOL)force;
- (void) flushBuffer;
- (void) commitCommandBuffer:(MTLContext*)mtlc wait:(BOOL)waitUntilCompleted display:(BOOL)updateDisplay;
- (void) addStatCallback:(int)type value:(double)value;
- (void) countFramePresentedCallback;
- (void) countFrameDroppedCallback;
@end

View File

@@ -226,29 +226,33 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
}
// Acquire CAMetalDrawable without blocking:
const CFTimeInterval beforeDrawableTime = (TRACE_DISPLAY) ? CACurrentMediaTime() : 0.0;
const CFTimeInterval beforeDrawableTime = CACurrentMediaTime();
const id<CAMetalDrawable> mtlDrawable = [self nextDrawable];
if (mtlDrawable == nil) {
J2dTraceLn(J2D_TRACE_VERBOSE, "MTLLayer.blitTexture: nextDrawable is null");
return;
}
const CFTimeInterval nextDrawableTime = (TRACE_DISPLAY) ? CACurrentMediaTime() : 0.0;
const CFTimeInterval nextDrawableTime = CACurrentMediaTime();
const CFTimeInterval nextDrawableLatency = (nextDrawableTime - beforeDrawableTime);
// rolling mean weight (lerp):
static const NSTimeInterval a = 0.25;
#if TRACE_DISPLAY_ON
const CFTimeInterval nextDrawableLatency = (nextDrawableTime - beforeDrawableTime);
if (nextDrawableLatency > 0.0) {
if (self.perfCountersEnabled) {
[self addStatCallback:1 value:1000.0 * nextDrawableLatency]; // See MTLLayer.STAT_NAMES[1]
}
#if TRACE_DISPLAY_ON
self.avgNextDrawableTime = nextDrawableLatency * a + self.avgNextDrawableTime * (1.0 - a);
}
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
"[%.6lf] MTLLayer_blitTexture: drawable(%d) presented"
" - nextDrawableLatency = %.3lf ms - average = %.3lf ms",
CACurrentMediaTime(), mtlDrawable.drawableID,
1000.0 * nextDrawableLatency, 1000.0 * self.avgNextDrawableTime
);
J2dRlsTraceLn(J2D_TRACE_VERBOSE,
"[%.6lf] MTLLayer_blitTexture: drawable(%d) presented"
" - nextDrawableLatency = %.3lf ms - average = %.3lf ms",
CACurrentMediaTime(), mtlDrawable.drawableID,
1000.0 * nextDrawableLatency, 1000.0 * self.avgNextDrawableTime
);
#endif
}
// Keep Fence from now:
releaseFence = NO;
@@ -389,8 +393,17 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
return;
}
const CFTimeInterval beforeMethod = CACurrentMediaTime();
(*env)->CallVoidMethod(env, javaLayerLocalRef, jm_drawInMTLContext);
CHECK_EXCEPTION();
const CFTimeInterval drawInMTLContextLatency = (CACurrentMediaTime() - beforeMethod);
if (drawInMTLContextLatency > 0.0) {
if (self.perfCountersEnabled) {
[self addStatCallback:0 value:1000.0 * drawInMTLContextLatency]; // See MTLLayer.STAT_NAMES[0]
}
}
(*env)->DeleteLocalRef(env, javaLayerLocalRef);
}
@@ -516,6 +529,20 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
}
}
- (void) addStatCallback:(int)type value:(double)value {
// attach the current thread to the JVM if necessary, and get an env
JNIEnv* env = [ThreadUtilities getJNIEnvUncached];
GET_MTL_LAYER_CLASS();
DECLARE_METHOD(jm_addStatFrame, jc_JavaLayer, "addStat", "(ID)V");
jobject javaLayerLocalRef = (*env)->NewLocalRef(env, self.javaLayer);
if (javaLayerLocalRef != NULL) {
(*env)->CallVoidMethod(env, javaLayerLocalRef, jm_addStatFrame, (jint)type, (jdouble)value);
CHECK_EXCEPTION();
(*env)->DeleteLocalRef(env, javaLayerLocalRef);
}
}
- (void) countFrameDroppedCallback {
// attach the current thread to the JVM if necessary, and get an env
JNIEnv* env = [ThreadUtilities getJNIEnvUncached];

View File

@@ -53,10 +53,14 @@ import java.awt.event.TextEvent;
import java.awt.im.InputContext;
import java.awt.im.InputMethodRequests;
import java.awt.image.BufferStrategy;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.Raster;
import java.awt.image.SampleModel;
import java.awt.image.VolatileImage;
import java.awt.image.WritableRaster;
import java.awt.peer.ComponentPeer;
import java.awt.peer.ContainerPeer;
import java.awt.peer.LightweightPeer;
@@ -89,6 +93,7 @@ import javax.accessibility.AccessibleStateSet;
import javax.swing.JComponent;
import javax.swing.JRootPane;
import com.jetbrains.exported.JBRApi;
import sun.awt.AWTAccessor;
import sun.awt.AppContext;
import sun.awt.ComponentFactory;
@@ -99,6 +104,7 @@ import sun.awt.EmbeddedFrame;
import sun.awt.RequestFocusController;
import sun.awt.SubRegionShowable;
import sun.awt.SunToolkit;
import sun.awt.SurfacePixelGrabber;
import sun.awt.dnd.SunDropTargetEvent;
import sun.awt.im.CompositionArea;
import sun.awt.image.VSyncedBSManager;
@@ -10559,4 +10565,79 @@ public abstract class Component implements ImageObserver, MenuContainer,
}
return p.updateCustomTitleBarHitTest(allowNativeActions);
}
@JBRApi.Provides("Screenshoter#getWindowBackbufferArea")
private static BufferedImage getWindowBackbufferArea(Window window, int x, int y, int width, int height) {
Objects.requireNonNull(window);
if (x < 0 || y < 0) {
throw new IllegalArgumentException("Negative coordinates are not allowed");
}
if (width <= 0 || height <= 0) {
throw new IllegalArgumentException("The size must be positive");
}
Image fullBackbuffer = window.getBackBuffer();
if (fullBackbuffer == null) {
return null;
}
var bufferWidth = fullBackbuffer.getWidth(null);
var bufferHeight = fullBackbuffer.getHeight(null);
if (x >= width) {
throw new IllegalArgumentException(String.format("x coordinate (%d) is out of bounds (%d)", x, bufferWidth));
}
if (y >= height) {
throw new IllegalArgumentException(String.format("y coordinate (%d) is out of bounds (%d)", y, bufferHeight));
}
if ((long) x + width > bufferWidth) {
width = bufferWidth - x;
}
if ((long) y + height > bufferHeight) {
height = bufferHeight - y;
}
if (fullBackbuffer instanceof BufferedImage bufferedImage) {
return bufferedImage.getSubimage(x, y, width, height);
} else {
ColorModel colorModel = window.getGraphicsConfiguration().getColorModel();
SampleModel sampleModel = colorModel.createCompatibleSampleModel(width, height);
WritableRaster raster = Raster.createWritableRaster(sampleModel, null);
BufferedImage image = new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), null);
image.getGraphics().drawImage(fullBackbuffer,
0, 0, width, height,
x, y, x + width, y + height,
null);
return image;
}
}
@JBRApi.Provides("Screenshoter#getWindowSurfaceArea")
private static BufferedImage getWindowSurfaceArea(Window window, int x, int y, int width, int height) {
Objects.requireNonNull(window);
if (x < 0 || y < 0) {
throw new IllegalArgumentException("Negative coordinates are not allowed");
}
if (width <= 0 || height <= 0) {
throw new IllegalArgumentException("The size must be positive");
}
ComponentPeer peer = window.peer;
if (peer == null || !window.isVisible()) {
return null;
}
if (peer instanceof SurfacePixelGrabber spg) {
// TODO: translate coordinates, maybe?
return spg.getClientAreaSnapshot(x, y, width, height);
}
return null;
}
}

View File

@@ -34,7 +34,6 @@ import java.awt.event.WindowFocusListener;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.awt.geom.Path2D;
import java.awt.geom.Point2D;
import java.awt.im.InputContext;
import java.awt.image.BufferStrategy;
import java.awt.peer.ComponentPeer;
@@ -44,6 +43,7 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OptionalDataException;
import java.io.PrintStream;
import java.io.Serial;
import java.io.Serializable;
import java.lang.annotation.Native;
@@ -53,12 +53,15 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EventListener;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.HashMap;
import java.util.Objects;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -69,11 +72,14 @@ import javax.accessibility.AccessibleState;
import javax.accessibility.AccessibleStateSet;
import com.jetbrains.exported.JBRApi;
import jdk.internal.misc.InnocuousThread;
import sun.awt.AWTAccessor;
import sun.awt.AppContext;
import sun.awt.DebugSettings;
import sun.awt.SunToolkit;
import sun.awt.util.IdentityArrayList;
import sun.awt.util.ThreadGroupUtils;
import sun.java2d.marlin.stats.StatDouble;
import sun.java2d.pipe.Region;
import sun.util.logging.PlatformLogger;
@@ -1153,45 +1159,51 @@ public class Window extends Container implements Accessible {
}
void doDispose() {
class DisposeAction implements Runnable {
public void run() {
disposing = true;
try {
// Check if this window is the fullscreen window for the
// device. Exit the fullscreen mode prior to disposing
// of the window if that's the case.
GraphicsDevice gd = getGraphicsConfiguration().getDevice();
if (gd.getFullScreenWindow() == Window.this) {
gd.setFullScreenWindow(null);
}
final class DisposeAction implements Runnable {
public void run() {
final Window window = Window.this;
Object[] ownedWindowArray;
synchronized(ownedWindowList) {
ownedWindowArray = new Object[ownedWindowList.size()];
ownedWindowList.copyInto(ownedWindowArray);
}
for (int i = 0; i < ownedWindowArray.length; i++) {
Window child = (Window) (((WeakReference)
(ownedWindowArray[i])).get());
if (child != null) {
child.disposeImpl();
// dump stats if needed:
AWTAccessor.getWindowAccessor().dumpStats(window, true, null);
disposing = true;
try {
// Check if this window is the fullscreen window for the
// device. Exit the fullscreen mode prior to disposing
// of the window if that's the case.
GraphicsDevice gd = getGraphicsConfiguration().getDevice();
if (gd.getFullScreenWindow() == window) {
gd.setFullScreenWindow(null);
}
}
hide();
beforeFirstShow = true;
removeNotify();
synchronized (inputContextLock) {
if (inputContext != null) {
inputContext.dispose();
inputContext = null;
Object[] ownedWindowArray;
synchronized(ownedWindowList) {
ownedWindowArray = new Object[ownedWindowList.size()];
ownedWindowList.copyInto(ownedWindowArray);
}
for (int i = 0; i < ownedWindowArray.length; i++) {
Window child = (Window) (((WeakReference)
(ownedWindowArray[i])).get());
if (child != null) {
child.disposeImpl();
}
}
hide();
beforeFirstShow = true;
removeNotify();
synchronized (inputContextLock) {
if (inputContext != null) {
inputContext.dispose();
inputContext = null;
}
}
clearCurrentFocusCycleRootOnHide();
} finally {
disposing = false;
}
clearCurrentFocusCycleRootOnHide();
} finally {
disposing = false;
}
}
}
boolean fireWindowClosedEvent = isDisplayable();
DisposeAction action = new DisposeAction();
if (EventQueue.isDispatchThread()) {
@@ -3950,6 +3962,7 @@ public class Window extends Container implements Accessible {
private float getHeight() { return height; }
private void setHeight(float height) {
if (height <= 0.0f) throw new IllegalArgumentException("TitleBar height must be positive");
if (this.height == height) return;
this.height = height;
notifyUpdate();
}
@@ -3958,13 +3971,17 @@ public class Window extends Container implements Accessible {
}
private void putProperties(Map<String, ?> m) {
if (properties == null) properties = new HashMap<>();
properties.putAll(m);
notifyUpdate();
boolean needsUpdate = false;
for (Map.Entry<String, ?> e : m.entrySet()) {
Object old = properties.put(e.getKey(), e.getValue());
if (!needsUpdate && !Objects.equals(old, e.getValue())) needsUpdate = true;
}
if (needsUpdate) notifyUpdate();
}
private void putProperty(String key, Object value) {
if (properties == null) properties = new HashMap<>();
properties.put(key, value);
notifyUpdate();
Object old = properties.put(key, value);
if (!Objects.equals(old, value)) notifyUpdate();
}
private float getLeftInset() { return insets[0]; }
private float getRightInset() { return insets[1]; }
@@ -4159,8 +4176,36 @@ public class Window extends Container implements Accessible {
return value;
}
private final static String STATS_ALL_SUFFIX = ".all";
private final static String SYSTEM_PROPERTY_COUNTERS;
private final static boolean USE_COUNTERS;
private final static boolean TRACE_ALL_COUNTERS;
private final static boolean TRACE_STD_ERR;
private final static int TRACE_CAPACITY;
private final static boolean TRACE_COUNTERS = true;
private final static boolean DUMP_STATS = true;
// thread dump interval (ms)
static final long DUMP_INTERVAL = 10 * 1000L;
private static PrintStream getTraceStdStream() {
// get live std stream:
return TRACE_STD_ERR ? System.err : System.out;
}
static {
String counters = System.getProperty("awt.window.counters");
SYSTEM_PROPERTY_COUNTERS = System.getProperty("awt.window.counters");
USE_COUNTERS = (SYSTEM_PROPERTY_COUNTERS != null);
TRACE_ALL_COUNTERS = USE_COUNTERS && (Objects.equals(SYSTEM_PROPERTY_COUNTERS, "")
|| Objects.equals(SYSTEM_PROPERTY_COUNTERS, "stderr")
|| Objects.equals(SYSTEM_PROPERTY_COUNTERS, "stdout"));
TRACE_STD_ERR = USE_COUNTERS && SYSTEM_PROPERTY_COUNTERS.contains("stderr");
TRACE_CAPACITY = USE_COUNTERS ? 8 : 0;
AWTAccessor.setWindowAccessor(new AWTAccessor.WindowAccessor() {
public void updateWindow(Window window) {
@@ -4197,100 +4242,201 @@ public class Window extends Container implements Accessible {
public boolean countersEnabled(Window w) {
// May want to selectively enable or disable counters per window
return counters != null;
return USE_COUNTERS;
}
public void bumpCounter(Window w, String counterName) {
Objects.requireNonNull(w);
Objects.requireNonNull(counterName);
private final static long NANO_IN_SEC = java.util.concurrent.TimeUnit.SECONDS.toNanos(1);
PerfCounter newCounter;
long curTimeNanos = System.nanoTime();
synchronized (w.perfCounters) {
newCounter = w.perfCounters.compute(counterName, (k, v) ->
v == null
? new PerfCounter(curTimeNanos, 1L)
: new PerfCounter(curTimeNanos, v.value + 1));
}
PerfCounter prevCounter;
synchronized (w.perfCountersPrev) {
prevCounter = w.perfCountersPrev.putIfAbsent(counterName, newCounter);
}
if (prevCounter != null) {
long nanosInSecond = java.util.concurrent.TimeUnit.SECONDS.toNanos(1);
long timeDeltaNanos = curTimeNanos - prevCounter.updateTimeNanos;
if (timeDeltaNanos > nanosInSecond) {
long valPerSecond = (long) ((double) (newCounter.value - prevCounter.value)
* nanosInSecond / timeDeltaNanos);
boolean traceAllCounters = Objects.equals(counters, "")
|| Objects.equals(counters, "stdout")
|| Objects.equals(counters, "stderr");
boolean traceEnabled = traceAllCounters || (counters != null && counters.contains(counterName));
if (traceEnabled) {
if (counters.contains("stderr")) {
System.err.println(counterName + " per second: " + valPerSecond);
} else {
System.out.println(counterName + " per second: " + valPerSecond);
}
}
if (perfLog.isLoggable(PlatformLogger.Level.FINE)) {
perfLog.fine(counterName + " per second: " + valPerSecond);
public void incrementCounter(final Window w, final String counterName) {
if (USE_COUNTERS) {
Objects.requireNonNull(w);
Objects.requireNonNull(counterName);
final long curTimeNanos = System.nanoTime();
// use try-catch to avoid throwing runtime exception to native JNI callers!
try {
PerfCounter newCounter, prevCounter;
synchronized (w.perfCounters) {
newCounter = w.perfCounters.compute(counterName, (_, v) ->
v == null
? new PerfCounter(curTimeNanos, 1L)
: new PerfCounter(curTimeNanos, v.value + 1));
}
synchronized (w.perfCountersPrev) {
w.perfCountersPrev.put(counterName, newCounter);
prevCounter = w.perfCountersPrev.putIfAbsent(counterName, newCounter);
}
if (prevCounter != null) {
final long timeDeltaNanos = curTimeNanos - prevCounter.updateTimeNanos;
if (timeDeltaNanos > NANO_IN_SEC) {
final double valPerSecond = (double) (newCounter.value - prevCounter.value)
* NANO_IN_SEC / timeDeltaNanos;
synchronized (w.perfCountersPrev) {
w.perfCountersPrev.put(counterName, newCounter);
}
addStat(w, counterName, valPerSecond);
if (TRACE_COUNTERS) {
dumpCounter(counterName, valPerSecond);
}
}
}
} catch (RuntimeException re) {
perfLog.severe("incrementCounter: failed", re);
}
}
}
public void addStat(final Window w, final String statName, final double value) {
if (USE_COUNTERS && Double.isFinite(value)) {
Objects.requireNonNull(w);
Objects.requireNonNull(statName);
// use try-catch to avoid throwing runtime exception to native JNI callers!
try {
synchronized (w.perfStats) {
StatDouble stat = w.perfStats.computeIfAbsent(statName, StatDouble::new);
stat.add(value);
stat = w.perfStats.computeIfAbsent(statName + STATS_ALL_SUFFIX, StatDouble::new);
stat.add(value);
}
} catch (RuntimeException re) {
perfLog.severe("addStat: failed", re);
}
}
}
public long getCounter(final Window w, final String counterName) {
if (USE_COUNTERS) {
Objects.requireNonNull(w);
Objects.requireNonNull(counterName);
synchronized (w.perfCounters) {
PerfCounter counter = w.perfCounters.get(counterName);
return counter != null ? counter.value : -1L;
}
}
return -1L;
}
public double getCounterPerSecond(final Window w, final String counterName) {
if (USE_COUNTERS) {
Objects.requireNonNull(w);
Objects.requireNonNull(counterName);
PerfCounter newCounter, prevCounter;
synchronized (w.perfCounters) {
newCounter = w.perfCounters.get(counterName);
}
synchronized (w.perfCountersPrev) {
prevCounter = w.perfCountersPrev.get(counterName);
}
if (newCounter != null && prevCounter != null) {
final long timeDeltaNanos = newCounter.updateTimeNanos - prevCounter.updateTimeNanos;
// Note that this time delta will usually be above one second.
if (timeDeltaNanos > 0L) {
return (double) (newCounter.value - prevCounter.value) * NANO_IN_SEC / timeDeltaNanos;
}
}
}
return Double.NaN;
}
public void dumpStats(final Window w, final boolean reset, StringBuilder sb) {
if (USE_COUNTERS) {
synchronized (w.perfStats) {
boolean header = false;
for (final StatDouble stat : w.perfStats.values()) {
if (stat.shouldLog()) {
final boolean traceEnabled = TRACE_ALL_COUNTERS || SYSTEM_PROPERTY_COUNTERS.contains(stat.name);
if (!header) {
header = true;
doLog(String.format("* Window['%s'@%s]:",
(w instanceof Frame ? ((Frame) w).getTitle() : ""),
Integer.toHexString(System.identityHashCode(w))),
traceEnabled);
}
// format:
if (sb == null) {
sb = new StringBuilder(128);
}
sb.setLength(0);
sb.append(" - ");
stat.toString(sb);
doLog(sb.toString(), traceEnabled);
if (reset && !stat.name.endsWith(STATS_ALL_SUFFIX)) {
stat.reset();
} else {
stat.updateLastLogCount();
}
}
}
}
}
}
public long getCounter(Window w, String counterName) {
Objects.requireNonNull(w);
Objects.requireNonNull(counterName);
synchronized (w.perfCounters) {
PerfCounter counter = w.perfCounters.get(counterName);
return counter != null ? counter.value : -1L;
private static void dumpCounter(final String counterName, final double valPerSecond) {
if (USE_COUNTERS) {
doLog(String.format("%s per second: %.2f", counterName, valPerSecond),
TRACE_ALL_COUNTERS || SYSTEM_PROPERTY_COUNTERS.contains(counterName));
}
}
public long getCounterPerSecond(Window w, String counterName) {
Objects.requireNonNull(w);
Objects.requireNonNull(counterName);
PerfCounter newCounter;
PerfCounter prevCounter;
synchronized (w.perfCounters) {
newCounter = w.perfCounters.get(counterName);
private static void doLog(final String msg, final boolean traceEnabled) {
if (traceEnabled) {
getTraceStdStream().println(msg);
}
synchronized (w.perfCountersPrev) {
prevCounter = w.perfCountersPrev.get(counterName);
if (perfLog.isLoggable(PlatformLogger.Level.FINE)) {
perfLog.fine(msg);
}
if (newCounter != null && prevCounter != null) {
long timeDeltaNanos = newCounter.updateTimeNanos - prevCounter.updateTimeNanos;
// Note that this time delta will usually be above one second.
if (timeDeltaNanos > 0) {
long nanosInSecond = java.util.concurrent.TimeUnit.SECONDS.toNanos(1);
long valPerSecond = (long) ((double) (newCounter.value - prevCounter.value)
* nanosInSecond / timeDeltaNanos);
return valPerSecond;
}
}
return -1;
}
}); // WindowAccessor
if (USE_COUNTERS) {
final Runnable dumper = new Runnable() {
private final static StringBuilder sb = new StringBuilder(128);
@Override
public void run() {
getTraceStdStream().printf("--- WindowStats dump at: %s ---\n", new java.util.Date());
final AWTAccessor.WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
for (Window window : Window.getWindows()) {
// dump stats if needed:
windowAccessor.dumpStats(window, true, sb);
}
getTraceStdStream().println("-----");
}
};
final Thread hook = InnocuousThread.newSystemThread("WindowStatsHook", dumper);
hook.setDaemon(true);
hook.setContextClassLoader(null);
Runtime.getRuntime().addShutdownHook(hook);
if (DUMP_STATS) {
final Timer statTimer = new Timer("WindowStats", true);
statTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
dumper.run();
}
}, DUMP_INTERVAL, DUMP_INTERVAL);
}
}
} // static
// a window doesn't need to be updated in the Z-order.
@Override
void updateZOrder() {}
private record PerfCounter(Long updateTimeNanos, Long value) {}
private record PerfCounter(long updateTimeNanos, long value) {}
private transient final Map<String, PerfCounter> perfCounters = new HashMap<>(4);
private transient final Map<String, PerfCounter> perfCountersPrev = new HashMap<>(4);
private transient final HashMap<String, PerfCounter> perfCounters = (USE_COUNTERS) ? new HashMap<>(TRACE_CAPACITY) : null;
private transient final HashMap<String, PerfCounter> perfCountersPrev = (USE_COUNTERS) ? new HashMap<>(TRACE_CAPACITY) : null;
private transient final LinkedHashMap<String, StatDouble> perfStats = (USE_COUNTERS) ? new LinkedHashMap<>(TRACE_CAPACITY) : null;
} // class Window

View File

@@ -27,10 +27,7 @@ package javax.swing;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.VolatileImage;
import java.awt.peer.WindowPeer;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.applet.*;
@@ -43,14 +40,12 @@ import sun.java2d.SunGraphicsEnvironment;
import com.sun.java.swing.SwingUtilities3;
import java.awt.geom.AffineTransform;
import java.util.stream.Collectors;
import sun.java2d.SunGraphics2D;
import sun.java2d.pipe.Region;
import sun.swing.SwingAccessor;
import sun.swing.SwingUtilities2;
import sun.swing.SwingUtilities2.RepaintListener;
import java.util.stream.Collectors;
/**
* This class manages repaint requests, allowing the number
@@ -755,7 +750,7 @@ public class RepaintManager
.filter(Objects::nonNull)
.distinct()
.forEach(w -> AWTAccessor.getWindowAccessor()
.bumpCounter(w, "swing.RepaintManager.updateWindows"));
.incrementCounter(w, "swing.RepaintManager.updateWindows"));
if (Toolkit.getDefaultToolkit() instanceof SunToolkit sunToolkit &&
sunToolkit.needUpdateWindow()) {
@@ -774,14 +769,14 @@ public class RepaintManager
for (Window window : windows) {
AWTAccessor.getWindowAccessor().updateWindow(window);
AWTAccessor.getWindowAccessor().bumpCounter(window, "swing.RepaintManager.updateWindows");
AWTAccessor.getWindowAccessor().incrementCounter(window, "swing.RepaintManager.updateWindows");
}
} else {
dirtyComponents.keySet().stream()
.map(c -> c instanceof Window w ? w : SwingUtilities.getWindowAncestor(c))
.filter(Objects::nonNull)
.forEach(w -> AWTAccessor.getWindowAccessor()
.bumpCounter(w, "swing.RepaintManager.updateWindows"));
.incrementCounter(w, "swing.RepaintManager.updateWindows"));
}
}

View File

@@ -748,6 +748,27 @@ public class BasicTreeUI extends TreeUI
return bounds;
}
/**
* A potentially faster version of {@link #getPathBounds(JTree, TreePath)}
* which calculates only {@code y} and {@code height}
* of the bounding {@code Rectangle}
*/
private Rectangle getVerticalPathBounds(TreePath path) {
if (tree == null || treeState == null) {
return null;
}
int rowHeight = treeState.getRowHeight();
if (rowHeight <= 0) {
return getPathBounds(tree, path);
}
int row = treeState.getRowForPath(path);
if (row < 0) {
return null;
}
return new Rectangle(0, tree.getInsets().top + row * rowHeight,
0, rowHeight);
}
/**
* Returns the path for passed in row. If row is not visible
* null is returned.
@@ -4381,17 +4402,21 @@ public class BasicTreeUI extends TreeUI
updateSize();
}
else if (treeState.isExpanded(parentPath)) {
// Changed nodes are visible
// Find the minimum index, we only need paint from there
// down.
int minIndex = indices[0];
for (int i = indices.length - 1; i > 0; i--) {
minIndex = Math.min(indices[i], minIndex);
TreePath minPath = null;
Rectangle minBounds = null;
if (tree.isShowing()) {
// Changed nodes are visible
// Find the minimum index, we only need paint from there
// down.
int minIndex = indices[0];
for (int i = indices.length - 1; i > 0; i--) {
minIndex = Math.min(indices[i], minIndex);
}
Object minChild = treeModel.getChild(
parentPath.getLastPathComponent(), minIndex);
minPath = parentPath.pathByAddingChild(minChild);
minBounds = getVerticalPathBounds(minPath);
}
Object minChild = treeModel.getChild(
parentPath.getLastPathComponent(), minIndex);
TreePath minPath = parentPath.pathByAddingChild(minChild);
Rectangle minBounds = getPathBounds(tree, minPath);
// Forward to the treestate
treeState.treeNodesChanged(e);
@@ -4399,20 +4424,19 @@ public class BasicTreeUI extends TreeUI
// Mark preferred size as bogus.
updateSize0();
// And repaint
Rectangle newMinBounds = getPathBounds(tree, minPath);
if (minBounds == null || newMinBounds == null) {
return;
}
if (indices.length == 1 &&
newMinBounds.height == minBounds.height) {
tree.repaint(0, minBounds.y, tree.getWidth(),
minBounds.height);
}
else {
tree.repaint(0, minBounds.y, tree.getWidth(),
tree.getHeight() - minBounds.y);
if (minBounds != null) {
// And repaint
Rectangle newMinBounds = getVerticalPathBounds(minPath);
if (newMinBounds != null) {
if (indices.length == 1 &&
newMinBounds.height == minBounds.height) {
tree.repaint(0, minBounds.y, tree.getWidth(),
minBounds.height);
} else {
tree.repaint(0, minBounds.y, tree.getWidth(),
tree.getHeight() - minBounds.y);
}
}
}
}
else {

View File

@@ -37,7 +37,6 @@ import java.awt.event.InputEvent;
import java.awt.event.InvocationEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.geom.Point2D;
import java.awt.image.BufferStrategy;
import java.awt.peer.ComponentPeer;
@@ -329,10 +328,15 @@ public final class AWTAccessor {
*/
Window[] getOwnedWindows(Window w);
/* JBR Window counters API */
boolean countersEnabled(Window w);
void bumpCounter(Window w, String counterName);
void incrementCounter(Window w, String counterName);
void addStat(Window w, String statName, double value);
long getCounter(Window w, String counterName);
long getCounterPerSecond(Window w, String counterName);
double getCounterPerSecond(Window w, String counterName);
void dumpStats(Window w, boolean reset, StringBuilder sb);
}
/**

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2025 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.
*/
package sun.awt;
import java.awt.image.BufferedImage;
public interface SurfacePixelGrabber {
BufferedImage getClientAreaSnapshot(int x, int y, int width, int height);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@ package sun.java2d.marlin;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentLinkedQueue;
import jdk.internal.misc.InnocuousThread;
import jdk.internal.ref.CleanerFactory;
import sun.java2d.marlin.ArrayCacheConst.CacheStats;
import static sun.java2d.marlin.MarlinUtils.logInfo;
@@ -383,21 +385,13 @@ public final class RendererStats implements MarlinConst {
= new ConcurrentLinkedQueue<>();
private RendererStatsHolder() {
final Thread hook = new Thread(
MarlinUtils.getRootThreadGroup(),
new Runnable() {
@Override
public void run() {
dump();
}
},
"MarlinStatsHook"
);
final Thread hook = InnocuousThread.newSystemThread("MarlinStatsHook", () -> dump());
hook.setDaemon(true);
hook.setContextClassLoader(null);
Runtime.getRuntime().addShutdownHook(hook);
if (USE_DUMP_THREAD) {
final Timer statTimer = new Timer("RendererStats");
final Timer statTimer = new Timer("RendererStats", true);
statTimer.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {

View File

@@ -0,0 +1,128 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright 2025 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.
*/
package sun.java2d.marlin.stats;
import static sun.java2d.marlin.stats.StatLong.trimTo3Digits;
/**
* Statistics on double values
*/
public final class StatDouble {
// rolling mean weight (lerp):
private final static double EMA_ALPHA = 0.25;
private final static double EMA_ONE_MINUS_ALPHA = 1.0 - EMA_ALPHA;
public final String name;
private long count, lastLogCount;
private double min, max, mean, ema_mean = 0.0, squaredError;
public StatDouble(final String name) {
this.name = name;
reset();
}
public void reset() {
count = 0L;
lastLogCount = 0L;
min = Double.POSITIVE_INFINITY;
max = Double.NEGATIVE_INFINITY;
mean = 0.0;
// skip ema_mean = 0.0;
squaredError = 0.0;
}
public void add(final double val) {
count++;
if (val < min) {
min = val;
}
if (val > max) {
max = val;
}
// Exponential smoothing (EMA):
ema_mean = EMA_ALPHA * val + EMA_ONE_MINUS_ALPHA * ema_mean;
// Welford's algorithm:
final double oldMean = mean;
mean += (val - mean) / count;
squaredError += (val - mean) * (val - oldMean);
}
public boolean shouldLog() {
return (count > lastLogCount);
}
public void updateLastLogCount() {
this.lastLogCount = this.count;
}
public long count() {
return count;
}
public double min() {
return (count != 0L) ? min : Double.NaN;
}
public double max() {
return (count != 0L) ? max : Double.NaN;
}
public double mean() {
return (count != 0L) ? mean : Double.NaN;
}
public double ema() {
return (count != 0L) ? ema_mean : Double.NaN;
}
public double variance() {
return (count != 0L) ? (squaredError / (count - 1L)) : Double.NaN;
}
public double stddev() {
return (count != 0L) ? Math.sqrt(variance()) : Double.NaN;
}
public double total() {
return (count != 0L) ? (mean() * count) : Double.NaN;
}
@Override
public String toString() {
return toString(new StringBuilder(128)).toString();
}
public StringBuilder toString(final StringBuilder sb) {
sb.append(name).append('[').append(count);
sb.append("] sum: ").append(trimTo3Digits(total()));
sb.append(" avg: ").append(trimTo3Digits(mean()));
sb.append(" stddev: ").append(trimTo3Digits(stddev()));
sb.append(" ema: ").append(trimTo3Digits(ema()));
sb.append(" [").append(trimTo3Digits(min())).append(" - ").append(trimTo3Digits(max())).append("]");
return sb;
}
}

View File

@@ -31,20 +31,18 @@ package sun.java2d.marlin.stats;
public class StatLong {
public final String name;
public long count = 0L;
public long sum = 0L;
public long min = Integer.MAX_VALUE;
public long max = Integer.MIN_VALUE;
public long count, sum, min, max;
public StatLong(final String name) {
this.name = name;
reset();
}
public void reset() {
count = 0L;
sum = 0L;
min = Integer.MAX_VALUE;
max = Integer.MIN_VALUE;
min = Long.MAX_VALUE;
max = Long.MIN_VALUE;
}
public void add(final int val) {
@@ -78,7 +76,7 @@ public class StatLong {
sb.append(name).append('[').append(count);
sb.append("] sum: ").append(sum).append(" avg: ");
sb.append(trimTo3Digits(((double) sum) / count));
sb.append(" [").append(min).append(" | ").append(max).append("]");
sb.append(" [").append(min).append(" - ").append(max).append("]");
return sb;
}
@@ -89,7 +87,7 @@ public class StatLong {
* @return double value with only 3 decimal digits
*/
public static double trimTo3Digits(final double value) {
return ((long) (1e3d * value)) / 1e3d;
return Double.isFinite(value) ? ((long) (1e3d * value)) / 1e3d : Double.NaN;
}
}

View File

@@ -31,7 +31,6 @@ import sun.util.logging.PlatformLogger;
import java.awt.Toolkit;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public final class VKEnv {
@@ -109,16 +108,20 @@ public final class VKEnv {
state = newState;
if (Options.verbose || log.isLoggable(PlatformLogger.Level.FINE)) {
String message;
StringBuilder msg = new StringBuilder("Vulkan rendering enabled: ");
if (isVulkanEnabled()) {
message = "Vulkan rendering enabled: YES" +
"\n presentation enabled: " + (isPresentationEnabled() ? "YES" : "NO") +
"\n accelerated surface data enabled: " + (isSurfaceDataAccelerated() ? "YES" : "NO") +
"\n devices:" + Stream.of(devices).map(d -> (d == defaultDevice ?
"\n *" : "\n ") + d.getName()).collect(Collectors.joining());
msg.append("YES")
.append("\n Presentation enabled: ").append(isPresentationEnabled() ? "YES" : "NO")
.append("\n Accelerated surface data enabled: ").append(isSurfaceDataAccelerated() ? "YES" : "NO")
.append("\n Devices:");
for (int i = 0; i < devices.length; i++) {
VKGPU d = devices[i];
msg.append(d == defaultDevice ? "\n *" : "\n ").append(i).append(": ").append(d.getName());
}
} else {
message = "Vulkan rendering enabled: NO";
msg.append("NO");
}
String message = msg.toString();
if (Options.verbose) {
System.err.println(message);
}

View File

@@ -137,7 +137,7 @@ public abstract class VKSurfaceData extends SurfaceData
}
}
protected BufferedImage getSnapshot(int x, int y, int width, int height) {
public BufferedImage getSnapshot(int x, int y, int width, int height) {
BufferedImage image = getFormat().createCompatibleImage(width, height, getTransparency());
SurfaceData sd = SurfaceData.getPrimarySurfaceData(image);
Blit blit = Blit.getFromCache(getSurfaceType(), CompositeType.SrcNoEa, sd.getSurfaceType());

View File

@@ -169,7 +169,8 @@ void VKBlitLoops_Blit(JNIEnv *env, SurfaceDataOps* src, jshort srctype, jint fil
VKDevice* device = context->surface->device;
BlitSrcType type = decodeSrcType(device, srctype);
VKTexturePoolHandle* imageHandle = VKTexturePool_GetTexture(device->texturePool, sw, sh, type.format);
VKTexturePoolHandle* imageHandle =
VKTexturePool_GetTexture(VKRenderer_GetTexturePool(device->renderer), sw, sh, type.format);
VKImage* image = VKTexturePoolHandle_GetTexture(imageHandle);
VkDeviceSize dataSize = sh * sw * srcInfo.pixelStride;

View File

@@ -272,7 +272,6 @@ void VKDevice_CheckAndAdd(VKEnv* vk, VkPhysicalDevice physicalDevice) {
void VKDevice_Reset(VKDevice* device) {
if (device == NULL) return;
VKRenderer_Destroy(device->renderer);
VKTexturePool_Dispose(device->texturePool);
VKAllocator_Destroy(device->allocator);
ARRAY_FREE(device->enabledExtensions);
ARRAY_FREE(device->enabledLayers);
@@ -392,11 +391,4 @@ Java_sun_java2d_vulkan_VKGPU_init(JNIEnv *env, jclass jClass, jlong jDevice) {
JNU_ThrowByName(env, "java/lang/RuntimeException", "Vulkan: Cannot create renderer");
return;
}
device->texturePool = VKTexturePool_InitWithDevice(device);
if (!device->texturePool) {
VKDevice_Reset(device);
JNU_ThrowByName(env, "java/lang/RuntimeException", "Vulkan: Cannot create texture pool");
return;
}
}

View File

@@ -59,7 +59,6 @@ struct VKDevice {
VKAllocator* allocator;
VKRenderer* renderer;
VKTexturePool* texturePool;
DEVICE_FUNCTION_TABLE(DECL_PFN)
SWAPCHAIN_DEVICE_FUNCTION_TABLE(DECL_PFN)

View File

@@ -94,6 +94,7 @@ typedef struct {
struct VKRenderer {
VKDevice* device;
VKPipelineContext* pipelineContext;
VKTexturePool* texturePool;
POOL(VkCommandBuffer, commandBufferPool);
POOL(VkCommandBuffer, secondaryCommandBufferPool);
@@ -193,6 +194,9 @@ VKRenderingContext *VKRenderer_GetContext() {
return &context;
}
VKTexturePool *VKRenderer_GetTexturePool(VKRenderer* renderer) {
return renderer->texturePool;
}
/**
* Helper function for POOL_TAKE macro.
*/
@@ -368,6 +372,12 @@ VKRenderer* VKRenderer_Create(VKDevice* device) {
return NULL;
}
renderer->texturePool = VKTexturePool_InitWithDevice(device);
if (!renderer->texturePool) {
VKRenderer_Destroy(renderer);
return NULL;
}
// Create command pool
// TODO we currently have single command pool with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
// we may need to consider having multiple pools to avoid resetting buffers one-by-one
@@ -438,6 +448,9 @@ void VKRenderer_Destroy(VKRenderer* renderer) {
device->vkDestroyDescriptorPool(device->handle, renderer->descriptorPools[i], NULL);
}
ARRAY_FREE(renderer->descriptorPools);
VKTexturePool_Dispose(renderer->texturePool);
for (uint32_t i = 0; i < ARRAY_SIZE(renderer->imageDescriptorPools); i++) {
device->vkDestroyDescriptorPool(device->handle, renderer->imageDescriptorPools[i], NULL);
}

View File

@@ -29,6 +29,7 @@
#include "VKTypes.h"
#include "VKPipelines.h"
#include "VKTexturePool.h"
#define NO_CLIP ((VkRect2D) {{0, 0}, {0x7FFFFFFFU, 0x7FFFFFFFU}})
@@ -147,5 +148,6 @@ void VKRenderer_DrawImage(VKImage* image, VkFormat format,
float dx1, float dy1, float dx2, float dy2);
VKRenderingContext* VKRenderer_GetContext();
VKTexturePool* VKRenderer_GetTexturePool(VKRenderer* );
#endif //VKRenderer_h_Included

View File

@@ -292,7 +292,15 @@ VkBool32 VKSD_ConfigureWindowSurface(VKWinSDOps* vkwinsdo) {
}
static void VKSD_OnDispose(JNIEnv* env, SurfaceDataOps* ops) {
// We are being called from the disposer thread, RQ might be working in parallel.
// VKRenderQueue.lock/unlock is equivalent to AWT_LOCK/AWT_UNLOCK,
// but those are only available in the toolkit-specific part of AWT, so we call RQ there.
jobject rq = JNU_CallStaticMethodByName(env, NULL,
"sun/java2d/vulkan/VKRenderQueue", "getInstance", "()Lsun/java2d/vulkan/VKRenderQueue;").l;
JNU_CallMethodByName(env, NULL, rq, "lock", "()V");
VKSD_ResetSurface((VKSDOps*) ops);
JNU_CallMethodByName(env, NULL, rq, "unlock", "()V");
(*env)->DeleteLocalRef(env, rq);
}
JNIEXPORT VKSDOps* VKSD_CreateSurface(JNIEnv* env, jobject vksd, jint type, jint format, jint backgroundRGB,

View File

@@ -40,35 +40,44 @@ import java.awt.RenderingHints;
import java.awt.geom.Ellipse2D;
public class DefaultFrameDecoration extends FullFrameDecorationHelper {
private static final int HEIGHT = 30;
private static final int BORDER_SIZE = 1;
private static final int HEIGHT = 28 + BORDER_SIZE;
private static final int BUTTON_ICON_SIZE = 4;
private static final int BUTTON_CIRCLE_RADIUS = 10;
private static final int BUTTON_SIZE = 16;
private static final int BUTTONS_RIGHT_PADDING = 7;
private static final int BUTTONS_PADDING = 8;
private static final Font FONT = new Font(Font.DIALOG, Font.BOLD, 12);
private static final Color ACTIVE_BACKGROUND = new Color(0xebebeb);
private static final Color ACTIVE_BACKGROUND_DARK = new Color(0x222222);
private static final Color INACTIVE_BACKGROUND = new Color(0xfafafa);
private static final Color INACTIVE_BACKGROUND_DARK = new Color(0x2c2c2c);
private static final Color ACTIVE_BACKGROUND = new Color(0xedeeef);
private static final Color ACTIVE_BACKGROUND_DARK = new Color(0x31363b);
private static final Color INACTIVE_BACKGROUND = new Color(0xdcddde);
private static final Color INACTIVE_BACKGROUND_DARK = new Color(0x292d31);
private static final Color ICON_BACKGROUND = ACTIVE_BACKGROUND;
private static final Color ICON_BACKGROUND_DARK = ACTIVE_BACKGROUND_DARK;
private static final Color ICON_HOVERED_BACKGROUND = new Color(0xd1d1d1);
private static final Color ICON_HOVERED_BACKGROUND_DARK = new Color(0x373737);
private static final Color ICON_PRESSED_BACKGROUND = new Color(0xc0c0c0);
private static final Color ICON_PRESSED_BACKGROUND_DARK = new Color(0x565656);
private static final Color ACTIVE_FOREGROUND = Color.darkGray;
private static final Color ACTIVE_FOREGROUND_DARK = new Color(0xf7f7f7);
private static final Color INACTIVE_FOREGROUND = Color.gray;
private static final Color INACTIVE_FOREGROUND_DARK = new Color(0xb5b5b5);
private static final Color ICON_HOVERED_BACKGROUND = new Color(0x232629);
private static final Color ICON_HOVERED_BACKGROUND_DARK = new Color(0xfcfcfc);
private static final Color ICON_HOVERED_FOREGROUND = new Color(0xcacdcf);
private static final Color ICON_HOVERED_FOREGROUND_DARK = new Color(0x43484c);
private static final Color ICON_PRESSED_BACKGROUND = new Color(0xa6a8ab);
private static final Color ICON_PRESSED_BACKGROUND_DARK = new Color(0x6e7175);
private static final Color CLOSE_ICON_PRESSED_BACKGROUND = new Color(0x6d2229);
private static final Color CLOSE_ICON_PRESSED_BACKGROUND_DARK = new Color(0x6d2229);
private static final Color CLOSE_ICON_HOVERED_BACKGROUND = new Color(0xff98a2);
private static final Color CLOSE_ICON_HOVERED_INACTIVE_BACKGROUND = new Color(0xda4453);
private static final Color CLOSE_ICON_HOVERED_INACTIVE_BACKGROUND_DARK = new Color(0xda4453);
private static final Color CLOSE_ICON_HOVERED_BACKGROUND_DARK = new Color(0xff98a2);
private static final Color ACTIVE_FOREGROUND = new Color(0x2d3033);
private static final Color ACTIVE_FOREGROUND_DARK = new Color(0xf1f1f1);
private static final Color INACTIVE_FOREGROUND = ACTIVE_FOREGROUND;
private static final Color INACTIVE_FOREGROUND_DARK = ACTIVE_FOREGROUND_DARK;
private static final Color ACTIVE_BACKGROUND_TOP = new Color(0xfbfbfb);
private static final Color ACTIVE_BACKGROUND_TOP_DARK = new Color(0x313131);
private static final Color INACTIVE_BACKGROUND_TOP = new Color(0xfefefe);
private static final Color INACTIVE_BACKGROUND_TOP_DARK = new Color(0x3a3a3a);
private static final Color ACTIVE_BORDER = new Color(0x9e9e9e);
private static final Color ACTIVE_BORDER_DARK = new Color(0x080808);
private static final Color INACTIVE_BORDER = new Color(0xbcbcbc);
private static final Color INACTIVE_BORDER_DARK = new Color(0x121212);
private static final int BORDER_SIZE = 1;
private static final Color ACTIVE_BACKGROUND_TOP = new Color(0xa9abac);
private static final Color ACTIVE_BACKGROUND_TOP_DARK = new Color(0x4c565f);
private static final Color INACTIVE_BACKGROUND_TOP = new Color(0xb7b8b9);
private static final Color INACTIVE_BACKGROUND_TOP_DARK = new Color(0x424952);
private static final Color ACTIVE_BORDER = ACTIVE_BACKGROUND_TOP;
private static final Color ACTIVE_BORDER_DARK = ACTIVE_BACKGROUND_TOP_DARK;
private static final Color INACTIVE_BORDER = INACTIVE_BACKGROUND_TOP;
private static final Color INACTIVE_BORDER_DARK = INACTIVE_BACKGROUND_TOP_DARK;
private static final int SIGNIFICANT_DRAG_DISTANCE = 4;
public DefaultFrameDecoration(WLDecoratedPeer peer, boolean showMinimize, boolean showMaximize) {
@@ -96,64 +105,27 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
return new Dimension(getButtonSpaceWidth(), HEIGHT);
}
private Point getCloseButtonCenter() {
int width = peer.getWidth();
return width >= HEIGHT ? new Point(width - HEIGHT / 2, HEIGHT / 2) : null;
}
private Point getMaximizeButtonCenter() {
if (!hasMaximizeButton()) return null;
int width = peer.getWidth();
return width >= 2 * HEIGHT ? new Point(width - HEIGHT * 3 / 2, HEIGHT / 2) : null;
}
private Point getMinimizeButtonCenter() {
if (!hasMinimizeButton()) return null;
int width = peer.getWidth();
int buttonSpaceWidth = getButtonSpaceWidth();
return width >= buttonSpaceWidth ? new Point(width - buttonSpaceWidth + HEIGHT / 2, HEIGHT / 2) : null;
}
@Override
protected Rectangle getCloseButtonBounds() {
int width = peer.getWidth();
if (width >= HEIGHT) {
return new Rectangle(width - HEIGHT / 2 - BUTTON_CIRCLE_RADIUS,
HEIGHT / 2 - BUTTON_CIRCLE_RADIUS,
BUTTON_CIRCLE_RADIUS * 2,
BUTTON_CIRCLE_RADIUS * 2);
} else {
return null;
}
int x = peer.getWidth() - BUTTON_SIZE - BUTTONS_RIGHT_PADDING - BORDER_SIZE;
int y = (int) Math.floor((HEIGHT - BUTTON_SIZE + 1f) / 2);
return new Rectangle(x, y, BUTTON_SIZE, BUTTON_SIZE);
}
@Override
protected Rectangle getMaximizeButtonBounds() {
if (!hasMaximizeButton()) return null;
int width = peer.getWidth();
if (width >= 2 * HEIGHT) {
return new Rectangle(width - HEIGHT * 3 / 2 - BUTTON_CIRCLE_RADIUS,
HEIGHT / 2 - BUTTON_CIRCLE_RADIUS,
BUTTON_CIRCLE_RADIUS * 2,
BUTTON_CIRCLE_RADIUS * 2);
} else {
return null;
}
int x = peer.getWidth() - BUTTON_SIZE * 2 - BUTTONS_RIGHT_PADDING
- BUTTONS_PADDING - BORDER_SIZE;
int y = (int) Math.floor((HEIGHT - BUTTON_SIZE + 1f) / 2);
return x > 0 ? new Rectangle(x, y, BUTTON_SIZE, BUTTON_SIZE) : null;
}
@Override
protected Rectangle getMinimizeButtonBounds() {
if (!hasMinimizeButton()) return null;
int width = peer.getWidth();
int buttonSpaceWidth = getButtonSpaceWidth();
if (width >= buttonSpaceWidth) {
return new Rectangle(width - buttonSpaceWidth + HEIGHT / 2 - BUTTON_CIRCLE_RADIUS,
HEIGHT / 2 - BUTTON_CIRCLE_RADIUS,
BUTTON_CIRCLE_RADIUS * 2,
BUTTON_CIRCLE_RADIUS * 2);
} else {
return null;
}
int x = peer.getWidth() - BUTTON_SIZE * 3 - BUTTONS_RIGHT_PADDING
- BUTTONS_PADDING * 2 - BORDER_SIZE;
int y = (int) Math.floor((HEIGHT - BUTTON_SIZE + 1f) / 2);
return x > 0 ? new Rectangle(x, y, BUTTON_SIZE, BUTTON_SIZE) : null;
}
@Override
@@ -170,7 +142,7 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
final int numButtons = 1
+ (hasMaximizeButton() ? 1 : 0)
+ (hasMinimizeButton() ? 1 : 0);
return numButtons * HEIGHT;
return numButtons * BUTTON_SIZE + (numButtons - 1) * BUTTONS_PADDING + BUTTONS_RIGHT_PADDING;
}
private Color getBackgroundColor(boolean isActive) {
@@ -217,13 +189,33 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
}
}
private Color getButtonForeground(boolean isHovered) {
if (isHovered) {
return isDarkTheme() ? ICON_HOVERED_FOREGROUND_DARK : ICON_HOVERED_FOREGROUND;
} else {
return isDarkTheme() ? ACTIVE_FOREGROUND_DARK : ACTIVE_FOREGROUND;
}
}
private Color getClosePressedBackground() {
return isDarkTheme() ? CLOSE_ICON_PRESSED_BACKGROUND_DARK : CLOSE_ICON_PRESSED_BACKGROUND;
}
private Color getCloseHoveredBackground(boolean isActive) {
if (isActive) {
return isDarkTheme() ? CLOSE_ICON_HOVERED_BACKGROUND_DARK : CLOSE_ICON_HOVERED_BACKGROUND;
} else {
return isDarkTheme() ? CLOSE_ICON_HOVERED_INACTIVE_BACKGROUND_DARK : CLOSE_ICON_HOVERED_INACTIVE_BACKGROUND;
}
}
@Override
protected void paintBorder(Graphics2D g2d) {
int width = peer.getWidth();
int height = peer.getHeight();
g2d.setColor(getBorderColor(isActive()));
g2d.setStroke(new BasicStroke(BORDER_SIZE));
g2d.drawRect(0, 0, width - BORDER_SIZE, height - BORDER_SIZE);
g2d.drawRect(0, 0, width, height);
}
@Override
@@ -250,17 +242,11 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
// The title bar
g.fillRoundRect(0, 0, width, HEIGHT + radius + 1, radius, radius);
// The top bevel of the title bar
g.setColor(getBackgroundTopColor(active));
g.drawLine(radius / 2, 1, width - radius / 2, 1);
g.drawArc(1, 1, (radius - 1), (radius - 1), 90, 60);
g.drawArc(width - radius, 1, (radius - 1), (radius - 1), 45, 45);
// The border
var oldStroke = g.getStroke();
g.setColor(getBorderColor(active));
g.setStroke(new BasicStroke(BORDER_SIZE));
g.drawRoundRect(0, 0, width - BORDER_SIZE, HEIGHT + radius + 1, radius, radius);
g.drawRoundRect(0, 0, width, HEIGHT + radius + 1, radius, radius);
g.setStroke(oldStroke);
g.drawLine(0, HEIGHT - 1, width, HEIGHT - 1);
} else {
@@ -270,32 +256,35 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
// The top bevel of the title bar
g.setColor(getBackgroundTopColor(active));
g.drawLine(BORDER_SIZE, BORDER_SIZE, width - BORDER_SIZE, BORDER_SIZE);
g.drawLine(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, HEIGHT - BORDER_SIZE);
g.drawLine(BORDER_SIZE, BORDER_SIZE, width, BORDER_SIZE);
g.drawLine(BORDER_SIZE, BORDER_SIZE, BORDER_SIZE, HEIGHT);
// The border
var oldStroke = g.getStroke();
g.setColor(getBorderColor(active));
g.setStroke(new BasicStroke(BORDER_SIZE));
g.drawRect(0, 0, width - BORDER_SIZE, HEIGHT - BORDER_SIZE);
g.drawRect(0, 0, width, HEIGHT);
g.setStroke(oldStroke);
}
paintTitle(g, title, foregroundColor, width);
Point closeButtonCenter = getCloseButtonCenter();
if (closeButtonCenter != null) {
paintButtonBackground(g, closeButtonCenter, closeButton);
paintCloseButton(g, closeButtonCenter, foregroundColor);
Rectangle closeButtonBounds = getCloseButtonBounds();
if (closeButtonBounds != null) {
paintCloseButtonBackground(g, closeButtonBounds, closeButton);
Color buttonColor = getButtonForeground(closeButton.hovered);
paintCloseButton(g, closeButtonBounds, buttonColor);
}
Point maximizedButtonCenter = getMaximizeButtonCenter();
if (maximizedButtonCenter != null) {
paintButtonBackground(g, maximizedButtonCenter, maximizeButton);
paintMaximizeButton(g, maximizedButtonCenter, foregroundColor);
Rectangle maximizedButtonBounds = getMaximizeButtonBounds();
if (maximizedButtonBounds != null) {
paintButtonBackground(g, maximizedButtonBounds, maximizeButton);
Color buttonColor = getButtonForeground(maximizeButton.hovered);
paintMaximizeButton(g, maximizedButtonBounds, buttonColor);
}
Point minimizedButtonCenter = getMinimizeButtonCenter();
if (minimizedButtonCenter != null) {
paintButtonBackground(g, minimizedButtonCenter, minimizeButton);
paintMinimizeButton(g, minimizedButtonCenter, foregroundColor);
Rectangle minimizedButtonBounds = getMinimizeButtonBounds();
if (minimizedButtonBounds != null) {
paintButtonBackground(g, minimizedButtonBounds, minimizeButton);
Color buttonColor = getButtonForeground(minimizeButton.hovered);
paintMinimizeButton(g, minimizedButtonBounds, buttonColor);
}
g.setClip(null);
}
@@ -304,7 +293,7 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
g.setColor(foregroundColor);
g.setFont(FONT);
FontMetrics fm = g.getFontMetrics();
int leftMargin = HEIGHT / 2 - BUTTON_CIRCLE_RADIUS; // same as space between close button and right window edge
int leftMargin = HEIGHT / 2 - BUTTON_SIZE; // same as space between close button and right window edge
int availableWidth = width - getButtonSpaceWidth() - leftMargin;
String text = SwingUtilities2.clipStringIfNecessary(null, fm, title, availableWidth);
int textWidth = fm.stringWidth(text);
@@ -313,48 +302,60 @@ public class DefaultFrameDecoration extends FullFrameDecorationHelper {
(HEIGHT - fm.getHeight()) / 2 + fm.getAscent());
}
private void paintButtonBackground(Graphics2D g, Point center, ButtonState state) {
if (isActive()) {
private void paintCloseButtonBackground(Graphics2D g, Rectangle bounds, ButtonState state) {
if (!isActive() && !state.hovered && !state.pressed) return;
g.setColor(state.pressed ? getClosePressedBackground() :
state.hovered ? getCloseHoveredBackground(isActive()) : getIconBackground());
g.fill(new Ellipse2D.Float(bounds.x, bounds.y, bounds.width, bounds.height));
}
private void paintButtonBackground(Graphics2D g, Rectangle bounds, ButtonState state) {
if (state.hovered || state.pressed) {
g.setColor(state.pressed ? getIconPressedBackground() :
state.hovered ? getIconHoveredBackground() : getIconBackground());
g.fill(new Ellipse2D.Float(center.x - BUTTON_CIRCLE_RADIUS + .5f,
center.y - BUTTON_CIRCLE_RADIUS + .5f,
2 * BUTTON_CIRCLE_RADIUS, 2 * BUTTON_CIRCLE_RADIUS));
g.fill(new Ellipse2D.Float(bounds.x, bounds.y, bounds.width, bounds.height));
}
}
private void paintCloseButton(Graphics2D g, Point center, Color foregroundColor) {
private static Point centerOf(Rectangle rect) {
return new Point((int) Math.floor(rect.x + rect.width / 2f),
(int) Math.floor(rect.y + rect.height / 2f));
}
private void paintCloseButton(Graphics2D g, Rectangle bounds, Color foregroundColor) {
g.setColor(foregroundColor);
Point center = centerOf(bounds);
g.drawLine(center.x - BUTTON_ICON_SIZE, center.y - BUTTON_ICON_SIZE,
center.x + BUTTON_ICON_SIZE, center.y + BUTTON_ICON_SIZE);
g.drawLine(center.x - BUTTON_ICON_SIZE, center.y + BUTTON_ICON_SIZE,
center.x + BUTTON_ICON_SIZE, center.y - BUTTON_ICON_SIZE);
}
private void paintMaximizeButton(Graphics2D g, Point center, Color foregroundColor) {
private void paintMaximizeButton(Graphics2D g, Rectangle bounds, Color foregroundColor) {
g.setColor(foregroundColor);
Point center = centerOf(bounds);
int size = BUTTON_ICON_SIZE + 1;
if (peer.getState() == Frame.MAXIMIZED_BOTH) {
g.drawLine(center.x - BUTTON_ICON_SIZE, center.y,
center.x, center.y - BUTTON_ICON_SIZE);
g.drawLine(center.x, center.y - BUTTON_ICON_SIZE,
center.x + BUTTON_ICON_SIZE, center.y);
g.drawLine(center.x - BUTTON_ICON_SIZE, center.y,
center.x, center.y + BUTTON_ICON_SIZE);
g.drawLine(center.x, center.y + BUTTON_ICON_SIZE,
center.x + BUTTON_ICON_SIZE, center.y);
g.drawLine(center.x - size, center.y, center.x, center.y - size);
g.drawLine(center.x, center.y - size, center.x + size, center.y);
g.drawLine(center.x - size, center.y, center.x, center.y + size);
g.drawLine(center.x, center.y + size, center.x + size, center.y);
} else {
g.drawLine(center.x - BUTTON_ICON_SIZE, center.y + BUTTON_ICON_SIZE / 2,
center.x, center.y - BUTTON_ICON_SIZE / 2);
g.drawLine(center.x, center.y - BUTTON_ICON_SIZE / 2,
center.x + BUTTON_ICON_SIZE, center.y + BUTTON_ICON_SIZE / 2);
g.drawLine(center.x - size, (int) (center.y + size / 2f),
center.x, (int) (center.y - size / 2f));
g.drawLine(center.x, (int) (center.y - size / 2f),
center.x + size, (int) (center.y + size / 2f));
}
}
private void paintMinimizeButton(Graphics2D g, Point center, Color foregroundColor) {
private void paintMinimizeButton(Graphics2D g, Rectangle bounds, Color foregroundColor) {
g.setColor(foregroundColor);
g.drawLine(center.x - BUTTON_ICON_SIZE, center.y - BUTTON_ICON_SIZE / 2,
center.x, center.y + BUTTON_ICON_SIZE / 2);
g.drawLine(center.x, center.y + BUTTON_ICON_SIZE / 2,
center.x + BUTTON_ICON_SIZE, center.y - BUTTON_ICON_SIZE / 2);
Point center = centerOf(bounds);
int size = BUTTON_ICON_SIZE + 1;
g.drawLine(center.x - size, (int) (center.y - size / 2f),
center.x, (int) (center.y + size / 2f));
g.drawLine(center.x, (int) (center.y + size / 2f),
center.x + size, (int) (center.y - size / 2f));
}
}

View File

@@ -76,8 +76,10 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
@Override
public void paint(Graphics g) {
// Determine buttons' bounds, etc.
nativePrePaint(nativePtr, peer.getWidth());
super.paint(g);
nativePrePaint(nativePtr, peer.getWidth(), peer.getHeight());
if (peer.getWidth() >= titleBarMinWidth && peer.getHeight() >= titleBarHeight) {
super.paint(g);
}
}
@Override
@@ -85,6 +87,9 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
int width = peer.getWidth();
int height = titleBarHeight;
assert width >= titleBarMinWidth;
assert peer.getHeight() >= titleBarHeight;
double scale = ((WLGraphicsConfig) peer.getGraphicsConfiguration()).getEffectiveScale();
g2d.setBackground(new Color(0, true));
g2d.clearRect(0, 0, width, height);
@@ -217,5 +222,5 @@ public class GtkFrameDecoration extends FullFrameDecorationHelper {
String title, int buttonsState);
private native int nativeGetIntProperty(long nativePtr, String name);
private native void nativeNotifyConfigured(long nativePtr, boolean active, boolean maximized, boolean fullscreen);
private native void nativePrePaint(long nativePtr, int width);
private native void nativePrePaint(long nativePtr, int width, int height);
}

View File

@@ -88,8 +88,8 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.wl.focus.WLComponentPeer");
private static final PlatformLogger popupLog = PlatformLogger.getLogger("sun.awt.wl.popup.WLComponentPeer");
private static final int MINIMUM_WIDTH = 1;
private static final int MINIMUM_HEIGHT = 1;
protected static final int MINIMUM_WIDTH = 1;
protected static final int MINIMUM_HEIGHT = 1;
private final Object stateLock = new Object();
@@ -135,7 +135,12 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
log.fine("WLComponentPeer: target=" + target + " with size=" + wlSize);
}
shadow = new Shadow(targetIsWlPopup() ? ShadowImage.POPUP_SHADOW_SIZE : ShadowImage.WINDOW_SHADOW_SIZE);
boolean shadowEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.wl.Shadow", "true"));
if (shadowEnabled) {
shadow = new ShadowImpl(targetIsWlPopup() ? ShadowImage.POPUP_SHADOW_SIZE : ShadowImage.WINDOW_SHADOW_SIZE);
} else {
shadow = new NilShadow();
}
// TODO
// setup parent window for target
}
@@ -852,8 +857,10 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
public Dimension getMinimumSize() {
int shadowSize = (int) Math.ceil(shadow.getSize() * 4);
return new Dimension(shadowSize, shadowSize);
int shadowSize = shadow != null ? (int) Math.ceil(shadow.getSize() * 4) : 0;
return shadowSize == 0
? new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT)
: new Dimension(shadowSize, shadowSize);
}
void showWindowMenu(long serial, int x, int y) {
@@ -1611,6 +1618,14 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
return new Dimension(javaUnitsToSurfaceSize(d.width), javaUnitsToSurfaceSize(d.height));
}
int javaUnitsToBufferUnits(int value) {
return (int) Math.floor(value * effectiveScale);
}
int javaSizeToBufferSize(int value) {
return (int) Math.ceil(value * effectiveScale);
}
/**
* Converts a point in the device (screen) space into coordinates on this surface
*/
@@ -1741,9 +1756,12 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
private Dimension constrainSize(int width, int height) {
Dimension maxBounds = getMaxBufferBounds();
Dimension minSize = getMinimumSize();
minSize.width = Math.max(MINIMUM_WIDTH, minSize.width);
minSize.height = Math.max(MINIMUM_HEIGHT, minSize.height);
return new Dimension(
Math.max(Math.min(width, maxBounds.width), MINIMUM_WIDTH),
Math.max(Math.min(height, maxBounds.height), MINIMUM_HEIGHT));
Math.max(Math.min(width, maxBounds.width), minSize.width),
Math.max(Math.min(height, maxBounds.height), minSize.height));
}
private Dimension constrainSize(Dimension bounds) {
@@ -1812,6 +1830,20 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
return result;
}
private interface Shadow {
int getSize();
void updateSurfaceSize();
void resizeToParentWindow();
void createSurface();
void commitSurface();
void dispose();
void hide();
void updateSurfaceData();
void paint();
void commitSurfaceData();
void notifyConfigured(boolean active, boolean maximized, boolean fullscreen);
}
private static class ShadowImage {
private static final Color activeColor = new Color(0, 0, 0, 0xA0);
private static final Color inactiveColor = new Color(0, 0, 0, 0x40);
@@ -1916,7 +1948,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
}
private class Shadow implements WLSurfaceSizeListener {
private class ShadowImpl implements WLSurfaceSizeListener, Shadow {
private WLSubSurface shadowSurface; // protected by AWT lock
private SurfaceData shadowSurfaceData; // protected by AWT lock
private boolean needsRepaint = true; // protected by AWT lock
@@ -1924,7 +1956,7 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
private final WLSize shadowWlSize = new WLSize(); // protected by stateLock
private boolean isActive; // protected by AWT lock
public Shadow(int shadowSize) {
public ShadowImpl(int shadowSize) {
this.shadowSize = shadowSize;
shadowWlSize.deriveFromJavaSize(wlSize.getJavaWidth() + shadowSize * 2, wlSize.getJavaHeight() + shadowSize * 2);
shadowSurfaceData = ((WLGraphicsConfig) getGraphicsConfiguration()).createSurfaceData(this, shadowWlSize.getPixelWidth(), shadowWlSize.getPixelHeight());
@@ -2039,6 +2071,20 @@ public class WLComponentPeer implements ComponentPeer, WLSurfaceSizeListener {
}
}
private static class NilShadow implements Shadow {
@Override public int getSize() { return 0; }
@Override public void updateSurfaceSize() { }
@Override public void resizeToParentWindow() { }
@Override public void createSurface() { }
@Override public void commitSurface() { }
@Override public void dispose() { }
@Override public void hide() { }
@Override public void updateSurfaceData() { }
@Override public void paint() { }
@Override public void commitSurfaceData() { }
@Override public void notifyConfigured(boolean active, boolean maximized, boolean fullscreen) { }
}
private class WLSize {
/**
* Represents the full size of the component in "client" units as returned by Component.getSize().

View File

@@ -88,7 +88,7 @@ public class WLDataDevice {
private static native void dispatchDataSourceQueueImpl(long nativePtr);
private static native void setSelectionImpl(int protocol, long nativePtr, long dataOfferNativePtr, long serial);
private static native void startDragImpl(long nativePtr, long dataOfferNativePtr,
long originSurfaceNativePtr, long iconNativePtr, long serial);
long originSurfaceNativePtr, long serial);
public boolean isProtocolSupported(int protocol) {
return isProtocolSupportedImpl(nativePtr, protocol);
@@ -98,8 +98,8 @@ public class WLDataDevice {
setSelectionImpl(protocol, nativePtr, (source == null) ? 0 : source.getNativePtr(), serial);
}
public void startDrag(WLDataSource source, long originSurfaceNativePtr, long iconNativePtr, long serial) {
startDragImpl(nativePtr, source.getNativePtr(), originSurfaceNativePtr, iconNativePtr, serial);
public void startDrag(WLDataSource source, long originSurfaceNativePtr, long serial) {
startDragImpl(nativePtr, source.getNativePtr(), originSurfaceNativePtr, serial);
}
public WLClipboard getSystemClipboard() {

View File

@@ -25,7 +25,10 @@
package sun.awt.wl;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.datatransfer.Transferable;
import java.awt.image.BufferedImage;
import java.util.HashSet;
public class WLDataSource {
@@ -44,6 +47,8 @@ public class WLDataSource {
private static native void setDnDActionsImpl(long nativePtr, int actions);
private static native void setDnDIconImpl(long nativePtr, int scale, int width, int height, int offsetX, int offsetY, int[] pixels);
WLDataSource(WLDataDevice dataDevice, int protocol, Transferable data) {
var wlDataTransferer = (WLDataTransferer) WLDataTransferer.getInstance();
@@ -91,6 +96,31 @@ public class WLDataSource {
setDnDActionsImpl(nativePtr, actions);
}
public void setDnDIcon(Image image, int scale, int offsetX, int offsetY) {
if (nativePtr == 0) {
throw new IllegalStateException("Native pointer is null");
}
int width = image.getWidth(null);
int height = image.getHeight(null);
int[] pixels = new int[width * height];
if (image instanceof BufferedImage) {
// NOTE: no need to ensure that the BufferedImage is TYPE_INT_ARGB,
// getRGB() does pixel format conversion automatically
((BufferedImage) image).getRGB(0, 0, width, height, pixels, 0, width);
} else {
BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = bufferedImage.createGraphics();
g.drawImage(image, 0, 0, null);
g.dispose();
bufferedImage.getRGB(0, 0, width, height, pixels, 0, width);
}
setDnDIconImpl(nativePtr, scale, width, height, offsetX, offsetY, pixels);
}
public synchronized void destroy() {
if (nativePtr != 0) {
destroyImpl(nativePtr);

View File

@@ -63,7 +63,7 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
d = new DefaultFrameDecoration(this, showMinimize, showMaximize);
}
} else {
if (isGTKAvailable()) {
if (!WLToolkit.isKDE() && isGTKAvailable()) {
d = new GtkFrameDecoration(this, showMinimize, showMaximize);
} else {
d = new DefaultFrameDecoration(this, showMinimize, showMaximize);
@@ -134,10 +134,11 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
@Override
public Dimension getMinimumSize() {
final Dimension parentMinimumSize = super.getMinimumSize();
final Dimension decorMinimumSize = getDecoration().getMinimumSize();
var d = getDecoration();
final Dimension decorMinimumSize = d != null ? d.getMinimumSize() : new Dimension(0, 0);
final Dimension frameMinimumSize
= (decorMinimumSize.getWidth() == 0 && decorMinimumSize.getHeight() == 0)
? new Dimension(1, 1)
? new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT)
: decorMinimumSize;
return new Rectangle(parentMinimumSize)
.union(new Rectangle(frameMinimumSize))

View File

@@ -92,21 +92,33 @@ public class WLDragSourceContextPeer extends SunDragSourceContextPeer {
this.dataDevice = dataDevice;
}
private long getComponentWlSurfacePtr() {
private WLComponentPeer getPeer() {
var comp = getComponent();
while (comp != null) {
var peer = AWTAccessor.getComponentAccessor().getPeer(comp);
if (peer instanceof WLComponentPeer wlPeer) {
return wlPeer.getSurface().getWlSurfacePtr();
return wlPeer;
}
comp = comp.getParent();
}
return null;
}
return 0;
private WLMainSurface getSurface() {
WLComponentPeer peer = getPeer();
if (peer != null) {
return peer.getSurface();
}
return null;
}
@Override
protected void startDrag(Transferable trans, long[] formats, Map<Long, DataFlavor> formatMap) {
var mainSurface = getSurface();
if (mainSurface == null) {
return;
}
// formats and formatMap are unused, because WLDataSource already references the same DataTransferer singleton
var source = new WLDragSource(trans);
@@ -115,10 +127,17 @@ public class WLDragSourceContextPeer extends SunDragSourceContextPeer {
source.setDnDActions(waylandActions);
var dragImage = getDragImage();
if (dragImage != null) {
var dragImageOffset = getDragImageOffset();
source.setDnDIcon(dragImage,
mainSurface.getGraphicsDevice().getDisplayScale(),
dragImageOffset.x, dragImageOffset.y);
}
long eventSerial = WLToolkit.getInputState().pointerButtonSerial();
var wlSurface = getComponentWlSurfacePtr();
dataDevice.startDrag(source, wlSurface, 0, eventSerial);
dataDevice.startDrag(source, mainSurface.getWlSurfacePtr(), eventSerial);
}
@Override

View File

@@ -52,7 +52,8 @@ public class WLRoundedCornersManager implements RoundedCornersManager {
public static int roundCornerRadiusFor(RoundedCornerKind kind) {
return switch (kind) {
case DEFAULT, FULL -> 24;
case DEFAULT -> 12;
case FULL -> 24;
case NONE -> 0;
case SMALL -> 8;
};

View File

@@ -86,6 +86,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.Semaphore;
@@ -138,6 +139,8 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
private static Boolean sunAwtDisableGtkFileDialogs = null;
private static final boolean isKDE;
private static native void initIDs(long displayPtr);
static {
@@ -147,6 +150,8 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
VKEnv.init(display);
initIDs(display);
}
String desktop = System.getenv("XDG_CURRENT_DESKTOP");
isKDE = desktop != null && desktop.toLowerCase().contains("kde");
initialized = true;
}
@@ -434,6 +439,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
final WLInputState newInputState = inputState.updatedFromKeyboardLeaveEvent(serial, surfacePtr);
final WLWindowPeer peer = peerFromSurface(surfacePtr);
if (peer != null && peer.getTarget() instanceof Window window) {
((WLToolkit) Toolkit.getDefaultToolkit()).ungrab(window);
final WindowEvent winLostFocusEvent = new WindowEvent(window, WindowEvent.WINDOW_LOST_FOCUS);
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusedWindow(null);
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusOwner(null);
@@ -945,15 +951,25 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
@Override
public void grab(Window w) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Not implemented: WLToolkit.grab()");
// There is no input grab in Wayland for client applications, only
// the compositor can control grabs. But we need UngrabEvent
// for popup/tooltip management, so we do input grab accounting here
// and in ungrab() below.
Objects.requireNonNull(w);
var peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer instanceof WLWindowPeer windowPeer) {
windowPeer.grab();
}
}
@Override
public void ungrab(Window w) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Not implemented: WLToolkit.ungrab()");
Objects.requireNonNull(w);
var peer = AWTAccessor.getComponentAccessor().getPeer(w);
if (peer instanceof WLWindowPeer windowPeer) {
windowPeer.ungrab();
}
}
/**
@@ -1076,4 +1092,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
return WLCursorManager.getInstance();
}
public static boolean isKDE() {
return isKDE;
}
}

View File

@@ -25,7 +25,11 @@
package sun.awt.wl;
import sun.awt.AWTAccessor;
import sun.awt.SurfacePixelGrabber;
import sun.awt.UngrabEvent;
import sun.java2d.SunGraphics2D;
import sun.java2d.vulkan.VKSurfaceData;
import sun.java2d.wl.WLSMSurfaceData;
import javax.swing.JRootPane;
import javax.swing.RootPaneContainer;
@@ -36,18 +40,21 @@ import java.awt.Dialog;
import java.awt.Font;
import java.awt.GraphicsConfiguration;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.SystemColor;
import java.awt.Window;
import java.awt.event.WindowEvent;
import java.awt.geom.Path2D;
import java.awt.image.BufferedImage;
import java.awt.peer.ComponentPeer;
import java.awt.peer.WindowPeer;
import java.lang.ref.WeakReference;
public class WLWindowPeer extends WLComponentPeer implements WindowPeer {
public class WLWindowPeer extends WLComponentPeer implements WindowPeer, SurfacePixelGrabber {
private static Font defaultFont;
private Dialog blocker;
private static WLWindowPeer grabbingWindow; // fake, kept for UngrabEvent only
// If this window gets focus from Wayland, we need to transfer focus synthFocusOwner, if any
private WeakReference<Component> synthFocusOwner = new WeakReference<>(null);
@@ -94,6 +101,8 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer {
@Override
protected void wlSetVisible(boolean v) {
if (!v) ungrab();
if (v && targetIsWlPopup() && shouldBeFocusedOnShowing()) {
requestWindowFocus();
}
@@ -197,6 +206,7 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer {
@Override
public void dispose() {
ungrab();
resetCornerMasks();
super.dispose();
}
@@ -236,6 +246,82 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer {
synthFocusOwner = new WeakReference<>(c);
}
public void grab() {
if (grabbingWindow != null && !isGrabbing()) {
grabbingWindow.ungrab();
}
grabbingWindow = this;
}
public void ungrab() {
if (isGrabbing()) {
grabbingWindow = null;
WLToolkit.postEvent(new UngrabEvent(getTarget()));
}
}
private boolean isGrabbing() {
return this == grabbingWindow;
}
@Override
public BufferedImage getClientAreaSnapshot(int x, int y, int width, int height) {
// Move the coordinate system to the client area
Insets insets = getInsets();
x += insets.left;
y += insets.top;
if (width <= 0 || height <= 0) {
return null;
}
if (x < 0 || y < 0) {
// Shouldn't happen, but better avoid accessing surface data outside the range
throw new IllegalArgumentException("Negative coordinates are not allowed");
}
if (x >= getWidth()) {
throw new IllegalArgumentException(String.format("x coordinate (%d) is out of bounds (%d)", x, getWidth()));
}
if (y >= getHeight()) {
throw new IllegalArgumentException(String.format("y coordinate (%d) is out of bounds (%d)", y, getHeight()));
}
if ((long) x + width > getWidth()) {
width = getWidth() - x;
}
if ((long) y + height > getHeight()) {
height = getHeight() - y;
}
// At this point the coordinates and size are in Java units;
// need to convert them into pixels.
Rectangle bounds = new Rectangle(
javaUnitsToBufferUnits(x),
javaUnitsToBufferUnits(y),
javaSizeToBufferSize(width),
javaSizeToBufferSize(height)
);
Rectangle bufferBounds = getBufferBounds();
if (bounds.x >= bufferBounds.width) {
bounds.x = bufferBounds.width - 1;
}
if (bounds.y >= bufferBounds.height) {
bounds.y = bufferBounds.height - 1;
}
if (bounds.x + bounds.width > bufferBounds.width) {
bounds.width = bufferBounds.width - bounds.x;
}
if (bounds.y + bounds.height > bufferBounds.height) {
bounds.height = bufferBounds.height - bounds.y;
}
if (surfaceData instanceof VKSurfaceData vksd) {
return vksd.getSnapshot(bounds.x, bounds.y, bounds.width, bounds.height);
} else if (surfaceData instanceof WLSMSurfaceData smsd) {
return smsd.getSnapshot(bounds.x, bounds.y, bounds.width, bounds.height);
}
return null;
}
private boolean canPaintRoundedCorners() {
int roundedCornerSize = WLRoundedCornersManager.roundCornerRadiusFor(roundedCornerKind);
// Note: You would normally get a transparency-capable color model when using

View File

@@ -26,19 +26,25 @@
package sun.java2d.wl;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Component;
import java.awt.Window;
import java.awt.GraphicsConfiguration;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.Raster;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.util.Objects;
import sun.awt.AWTAccessor;
import sun.awt.wl.WLComponentPeer;
import sun.awt.wl.WLGraphicsConfig;
import sun.awt.wl.WLSMGraphicsConfig;
import sun.java2d.SurfaceData;
import sun.java2d.loops.Blit;
import sun.java2d.loops.CompositeType;
import sun.java2d.loops.SurfaceType;
import sun.util.logging.PlatformLogger;
@@ -124,16 +130,20 @@ public class WLSMSurfaceData extends SurfaceData implements WLSurfaceDataExt, WL
return gc;
}
public BufferedImage getSnapshot(int x, int y, int width, int height) {
ColorModel colorModel = getColorModel();
SampleModel sampleModel = colorModel.createCompatibleSampleModel(width, height);
WritableRaster raster = Raster.createWritableRaster(sampleModel, null);
BufferedImage image = new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), null);
SurfaceData sd = SurfaceData.getPrimarySurfaceData(image);
Blit blit = Blit.getFromCache(getSurfaceType(), CompositeType.SrcNoEa, sd.getSurfaceType());
blit.Blit(this, sd, AlphaComposite.Src, null, x, y, 0, 0, width, height);
return image;
}
@Override
public Raster getRaster(int x, int y, int w, int h) {
// Can do something like the following:
// Raster r = getColorModel().createCompatibleWritableRaster(w, h);
// copy surface data to this raster
// save a reference to this raster
// return r;
// then in flush() check if raster was modified and take pixels from there
// This is obviously suboptimal and shouldn't be used in performance-critical situations.
throw new UnsupportedOperationException("Not implemented yet");
return getSnapshot(x, y, w, h).getRaster().createTranslatedChild(x, y);
}
@Override
@@ -189,7 +199,7 @@ public class WLSMSurfaceData extends SurfaceData implements WLSurfaceDataExt, WL
private void countNewFrame() {
// Called from the native code when this surface data has been sent to the Wayland server
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().bumpCounter(window, "java2d.native.frames");
AWTAccessor.getWindowAccessor().incrementCounter(window, "java2d.native.frames");
}
}
@@ -198,7 +208,7 @@ public class WLSMSurfaceData extends SurfaceData implements WLSurfaceDataExt, WL
// the Wayland server, but that attempt was not successful. This can happen, for example,
// when those attempts are too frequent.
if (target instanceof Window window) {
AWTAccessor.getWindowAccessor().bumpCounter(window, "java2d.native.framesDropped");
AWTAccessor.getWindowAccessor().incrementCounter(window, "java2d.native.framesDropped");
}
}

View File

@@ -684,7 +684,7 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_GtkFrameDecoration_nativePaintTitleBar
}
JNIEXPORT void JNICALL Java_sun_awt_wl_GtkFrameDecoration_nativePrePaint(JNIEnv *env, jobject obj,
jlong ptr, jint width) {
jlong ptr, jint width, jint height) {
assert (ptr != 0);
GtkFrameDecorationDescr* decor = jlong_to_ptr(ptr);
@@ -714,6 +714,12 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_GtkFrameDecoration_nativePrePaint(JNIEnv
(*env)->SetIntField(env, obj, TitleBarHeightFID, pref_height);
(*env)->SetIntField(env, obj, TitleBarMinWidthFID, min_width);
if (width < min_width || height < pref_height) {
// Avoid gtk warnings in case of insufficient space
p_gdk_threads_leave();
return;
}
GtkAllocation ha = {0, 0, width, pref_height};
p_gtk_widget_size_allocate(decor->titlebar, &ha);

View File

@@ -72,6 +72,9 @@ struct DataSource
struct wl_data_source *wlDataSource;
struct zwp_primary_selection_source_v1 *zwpPrimarySelectionSource;
};
struct wl_surface* dragIcon;
struct wl_buffer* dragIconBuffer;
};
// native part of WLDataOffer, remains alive until WLDataOffer.destroy() is called
@@ -937,7 +940,7 @@ Java_sun_awt_wl_WLDataDevice_setSelectionImpl(JNIEnv *env,
JNIEXPORT void JNICALL
Java_sun_awt_wl_WLDataDevice_startDragImpl(JNIEnv *env, jclass clazz, jlong dataDeviceNativePtr,
jlong dataSourceNativePtr, jlong wlSurfacePtr,
jlong iconPtr, jlong serial)
jlong serial)
{
struct DataDevice *dataDevice = jlong_to_ptr(dataDeviceNativePtr);
assert(dataDevice != NULL);
@@ -946,7 +949,10 @@ Java_sun_awt_wl_WLDataDevice_startDragImpl(JNIEnv *env, jclass clazz, jlong data
assert(source != NULL);
wl_data_device_start_drag(dataDevice->wlDataDevice, source->wlDataSource, jlong_to_ptr(wlSurfacePtr),
jlong_to_ptr(iconPtr), serial);
source->dragIcon, serial);
if (source->dragIcon != NULL) {
wl_surface_commit(source->dragIcon);
}
}
JNIEXPORT jlong JNICALL
@@ -1045,6 +1051,14 @@ Java_sun_awt_wl_WLDataSource_destroyImpl(JNIEnv *env, jclass clazz, jlong native
zwp_primary_selection_source_v1_destroy(source->zwpPrimarySelectionSource);
}
if (source->dragIconBuffer) {
wl_buffer_destroy(source->dragIconBuffer);
}
if (source->dragIcon) {
wl_surface_destroy(source->dragIcon);
}
free(source);
}
@@ -1058,6 +1072,70 @@ Java_sun_awt_wl_WLDataSource_setDnDActionsImpl(JNIEnv *env,
DataSource_setDnDActions(source, actions);
}
JNIEXPORT void JNICALL Java_sun_awt_wl_WLDataSource_setDnDIconImpl
(JNIEnv * env, jclass clazz, jlong nativePtr, jint scale,
jint width, jint height, jint offsetX, jint offsetY, jintArray pixels)
{
struct DataSource *source = jlong_to_ptr(nativePtr);
size_t pixelCount = (size_t)((*env)->GetArrayLength(env, pixels));
size_t byteSize = pixelCount * 4U;
if (byteSize >= INT32_MAX) {
return;
}
jint *shmPixels = NULL;
struct wl_shm_pool *pool = CreateShmPool(byteSize, "WLDataSource_DragIcon", (void**)&shmPixels, NULL);
if (!pool) {
return;
}
(*env)->GetIntArrayRegion(env, pixels, 0, pixelCount, shmPixels);
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
// Wayland requires little-endian data
for (size_t i = 0; i < pixelCount; i++) {
uint32_t value = (uint32_t)shmPixels[i];
shmPixels[i] = (jint)((value & 0xFFU) << 24 |
(value & 0xFF00U) << 8 |
(value & 0xFF0000U) >> 8 |
(value & 0xFF000000U) >> 24 & 0xFFU);
}
#endif
source->dragIconBuffer = wl_shm_pool_create_buffer(pool, 0, width, height, width * 4, WL_SHM_FORMAT_ARGB8888);
wl_shm_pool_destroy(pool);
if (!source->dragIconBuffer) {
return;
}
source->dragIcon = wl_compositor_create_surface(wl_compositor);
if (!source->dragIcon) {
wl_buffer_destroy(source->dragIconBuffer);
source->dragIconBuffer = NULL;
return;
}
#if WL_SURFACE_OFFSET_SINCE_VERSION >= 5
int wl_compositor_version = wl_compositor_get_version(wl_compositor);
if (wl_compositor_version >= 5) {
wl_surface_attach(source->dragIcon, source->dragIconBuffer, 0, 0);
wl_surface_offset(source->dragIcon, offsetX, offsetY);
} else {
wl_surface_attach(source->dragIcon, source->dragIconBuffer, offsetX, offsetY);
}
#else
wl_surface_attach(source->dragIcon, source->dragIconBuffer, offsetX, offsetY);
#endif
if (scale >= 1) {
wl_surface_set_buffer_scale(source->dragIcon, scale);
}
wl_surface_damage_buffer(source->dragIcon, 0, 0, width, height);
// NOTE: we still need to commit the surface, this is done immediately after start_drag
}
JNIEXPORT void JNICALL
Java_sun_awt_wl_WLDataOffer_destroyImpl(JNIEnv *env, jclass clazz, jlong nativePtr)
{

View File

@@ -536,7 +536,12 @@ registry_global(void *data, struct wl_registry *wl_registry,
if (strcmp(interface, wl_shm_interface.name) == 0) {
wl_shm = wl_registry_bind( wl_registry, name, &wl_shm_interface, 1);
} else if (strcmp(interface, wl_compositor_interface.name) == 0) {
wl_compositor = wl_registry_bind(wl_registry, name, &wl_compositor_interface, 4);
#if WL_SURFACE_OFFSET_SINCE_VERSION >= 5
uint32_t chosen_version = (version >= 5) ? 5 : 4;
#else
uint32_t chosen_version = 4;
#endif
wl_compositor = wl_registry_bind(wl_registry, name, &wl_compositor_interface, chosen_version);
} else if (strcmp(interface, wl_subcompositor_interface.name) == 0) {
wl_subcompositor = wl_registry_bind(wl_registry, name, &wl_subcompositor_interface, 1);
} else if (strcmp(interface, xdg_wm_base_interface.name) == 0) {

View File

@@ -0,0 +1,173 @@
/*
* Copyright 2024 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.
*/
package sun.awt.windows;
import sun.awt.AWTAccessor;
import sun.java2d.SunGraphicsEnvironment;
import javax.swing.*;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.im.InputMethodRequests;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.ref.WeakReference;
/**
* Provides caret tracking support for assistive tools that don't work with Java Access Bridge.
* Specifically, it's targeted for the built-in Windows Magnifier.
* This class listens to caret change events of the currently focused JTextComponent
* and forwards them to the native code, which then sends them as Win32 IAccessible events.
* <p>
* A typical high-level scenario of the interaction with the magnifier:
* <ol>
* <li>Magnifier sends a WM_GETOBJECT window message to get accessible content of the window.</li>
* <li>The message is handled in AwtComponent native class (awt_Component.cpp),
* which calls {@link #startCaretNotifier}.</li>
* <li>We start listening for keyboard focus change events.</li>
* <li>If at some point focus gets to a {@link JTextComponent}, we subscribe to its caret events.</li>
* <li>When the caret changes, we need to move the magnifier viewport to the new caret location.
* To achieve this, we create a Win32 IAccessible object for the caret (see AccessibleCaret.cpp)
* and send an event that its location was changed (EVENT_OBJECT_LOCATIONCHANGE).</li>
* <li>Magnifier receives this event and sends the WM_GETOBJECT message with the OBJID_CARET argument
* to get the caret object and its location property. After that, it moves the viewport to the returned location.
* </li>
* <li>When the {@link JTextComponent} loses focus, we stop listening to caret events
* and release the IAccessible caret object.</li>
* </ol>
* </p>
* <p>
* The feature is enabled by default
* and can be toggled by setting the sun.awt.windows.use.native.caret.accessibility.events property.
* </p>
*/
@SuppressWarnings("unused") // Used from the native side through JNI.
class AccessibleCaretLocationNotifier implements PropertyChangeListener, CaretListener {
private volatile static AccessibleCaretLocationNotifier caretNotifier;
private static final boolean nativeCaretEventsEnabled =
Boolean.parseBoolean(System.getProperty("sun.awt.windows.use.native.caret.accessibility.events", "true"));
private WeakReference<JTextComponent> currentFocusedComponent;
private long currentHwnd;
@SuppressWarnings("unused") // Called from the native through JNI.
public static void startCaretNotifier(long hwnd) {
if (nativeCaretEventsEnabled && caretNotifier == null) {
SwingUtilities.invokeLater(() -> {
if (caretNotifier == null) {
caretNotifier = new AccessibleCaretLocationNotifier(hwnd);
KeyboardFocusManager cfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
cfm.addPropertyChangeListener("focusOwner", caretNotifier);
if (cfm.getFocusOwner() instanceof JTextComponent textComponent) {
caretNotifier.propertyChange(new PropertyChangeEvent(caretNotifier, "focusOwner", null, textComponent));
}
}
});
}
}
public AccessibleCaretLocationNotifier(long hwnd) {
currentHwnd = hwnd;
}
private static native void updateNativeCaretLocation(long hwnd, int x, int y, int width, int height);
private static native void releaseNativeCaret(long hwnd);
@Override
public void propertyChange(PropertyChangeEvent e) {
Window w = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
if (w != null) {
WWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w);
if (wp != null) {
long hwnd = wp.getHWnd();
if (currentHwnd != hwnd) {
currentHwnd = hwnd;
}
}
}
Object newFocusedComponent = e.getNewValue();
if (currentFocusedComponent != null) {
JTextComponent currentComponentStrong = currentFocusedComponent.get();
if (currentComponentStrong != null && newFocusedComponent != currentComponentStrong) {
currentComponentStrong.removeCaretListener(this);
currentFocusedComponent.clear();
currentFocusedComponent = null;
releaseNativeCaret(currentHwnd);
}
}
if (newFocusedComponent instanceof JTextComponent textComponent) {
currentFocusedComponent = new WeakReference<>(textComponent);
textComponent.addCaretListener(this);
// Trigger the caret event when the text component receives focus to notify about the initial caret location
caretUpdate(new CaretEvent(textComponent) {
// Dot and mark won't be used, so we can set any values.
@Override
public int getDot() { return 0; }
@Override
public int getMark() { return 0; }
});
}
}
@Override
public void caretUpdate(CaretEvent e) {
if (!(e.getSource() instanceof JTextComponent textComponent)) {
return;
}
SwingUtilities.invokeLater(() -> {
if (!textComponent.isShowing()) return;
InputMethodRequests imr = textComponent.getInputMethodRequests();
if (imr == null) return;
Rectangle caretRectangle = imr.getTextLocation(null);
if (caretRectangle == null) return;
caretRectangle.width = 1;
Container parent = textComponent.getParent();
if (parent != null && parent.isShowing()) {
// Make sure we don't go outside of parent bounds, which can happen in the case of scrollable components.
Rectangle parentBounds = parent.getBounds();
parentBounds.setLocation(parent.getLocationOnScreen());
if (!parentBounds.contains(caretRectangle)) {
caretRectangle = parentBounds.intersection(caretRectangle);
if (caretRectangle.isEmpty()) return;
}
}
caretRectangle = SunGraphicsEnvironment.toDeviceSpaceAbs(caretRectangle);
updateNativeCaretLocation(AccessibleCaretLocationNotifier.this.currentHwnd,
(int) caretRectangle.getX(), (int) caretRectangle.getY(),
(int) caretRectangle.getWidth(), (int) caretRectangle.getHeight());
});
}
}

View File

@@ -831,11 +831,11 @@ public class D3DSurfaceData extends SurfaceData implements AccelSurface {
if (sd.getPeer().getTarget() instanceof Window window) {
switch (D3DRenderQueue.getFramePresentedStatus()) {
case 1:
AWTAccessor.getWindowAccessor().bumpCounter(window, "java2d.native.framesPresentRequested");
AWTAccessor.getWindowAccessor().incrementCounter(window, "java2d.native.framesPresentRequested");
break;
case 0:
default:
AWTAccessor.getWindowAccessor().bumpCounter(window, "java2d.native.framesPresentFailed");
AWTAccessor.getWindowAccessor().incrementCounter(window, "java2d.native.framesPresentFailed");
}
}
}

View File

@@ -0,0 +1,317 @@
/*
* Copyright (c) 2024, JetBrains s.r.o.. All rights reserved.
* 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.
*/
#include "AccessibleCaret.h"
#include "debug_assert.h" // DASSERT
#include "sun_awt_windows_AccessibleCaretLocationNotifier.h"
#include <atomic> // std::atomic
/**
* This class implements Win32 IAccessible interface in a similar way to the system text caret.
*/
static std::atomic<AccessibleCaret *> GLOBAL_INSTANCE{nullptr};
AccessibleCaret* AccessibleCaret::getInstanceIfPresent() noexcept {
return GLOBAL_INSTANCE.load();
}
AccessibleCaret* AccessibleCaret::getOrCreateInstance() {
bool unused;
return AccessibleCaret::getOrCreateInstance(unused);
}
AccessibleCaret* AccessibleCaret::getOrCreateInstance(bool& instanceIsNew) {
instanceIsNew = false;
AccessibleCaret* result = GLOBAL_INSTANCE.load();
if (result == nullptr) {
AccessibleCaret* newInstance = new AccessibleCaret();
if (GLOBAL_INSTANCE.compare_exchange_strong(result, newInstance)) {
result = newInstance;
instanceIsNew = true;
} else {
DASSERT(result != nullptr);
delete newInstance;
}
}
DASSERT(result != nullptr);
return result;
}
bool AccessibleCaret::releaseInstanceIfPresent() {
AccessibleCaret* instance = GLOBAL_INSTANCE.exchange(nullptr);
if (instance != nullptr) {
instance->Release();
return true;
}
return false;
}
AccessibleCaret::AccessibleCaret()
: m_refCount(1), m_x(0), m_y(0), m_width(0), m_height(0) {
InitializeCriticalSection(&m_caretLocationLock);
}
AccessibleCaret::~AccessibleCaret() {
DeleteCriticalSection(&m_caretLocationLock);
// If the destroyed object is being referred by the singleton variable, the latter should be cleared.
// This case should never happen, but if it does, it's better not to leave a dangling pointer.
AccessibleCaret* self = this;
(void)GLOBAL_INSTANCE.compare_exchange_strong(self, nullptr);
}
// IUnknown methods
IFACEMETHODIMP_(ULONG) AccessibleCaret::AddRef() {
return InterlockedIncrement(&m_refCount);
}
IFACEMETHODIMP_(ULONG) AccessibleCaret::Release() {
ULONG count = InterlockedDecrement(&m_refCount);
if (count == 0) {
delete this;
}
return count;
}
IFACEMETHODIMP AccessibleCaret::QueryInterface(REFIID riid, void **ppInterface) {
if (ppInterface == nullptr) {
return E_POINTER;
}
if (riid == IID_IUnknown || riid == IID_IDispatch || riid == IID_IAccessible) {
*ppInterface = static_cast<IAccessible *>(this);
AddRef();
return S_OK;
}
*ppInterface = nullptr;
return E_NOINTERFACE;
}
// IDispatch methods
IFACEMETHODIMP AccessibleCaret::GetTypeInfoCount(UINT *pctinfo) {
return E_NOTIMPL;
}
IFACEMETHODIMP AccessibleCaret::GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo) {
return E_NOTIMPL;
}
IFACEMETHODIMP AccessibleCaret::GetIDsOfNames(REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid,
DISPID *rgdispid) {
return E_NOTIMPL;
}
IFACEMETHODIMP AccessibleCaret::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags,
DISPPARAMS *pdispparams, VARIANT *pvarResult, EXCEPINFO *pexcepinfo,
UINT *puArgErr) {
return E_NOTIMPL;
}
// IAccessible methods
IFACEMETHODIMP AccessibleCaret::get_accParent(IDispatch **ppdispParent) {
if (ppdispParent == nullptr) {
return E_POINTER;
}
*ppdispParent = nullptr;
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::get_accChildCount(long *pcountChildren) {
if (pcountChildren == nullptr) {
return E_POINTER;
}
*pcountChildren = 0;
return S_OK;
}
IFACEMETHODIMP AccessibleCaret::get_accChild(VARIANT varChild, IDispatch **ppdispChild) {
if (ppdispChild == nullptr) {
return E_POINTER;
}
*ppdispChild = nullptr;
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::get_accName(VARIANT varChild, BSTR *pszName) {
if (pszName == nullptr) {
return E_POINTER;
}
*pszName = SysAllocString(L"Edit"); // Same name as the system caret.
return S_OK;
}
IFACEMETHODIMP AccessibleCaret::get_accValue(VARIANT varChild, BSTR *pszValue) {
return DISP_E_MEMBERNOTFOUND;
}
IFACEMETHODIMP AccessibleCaret::get_accDescription(VARIANT varChild, BSTR *pszDescription) {
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::get_accRole(VARIANT varChild, VARIANT *pvarRole) {
if (pvarRole == nullptr) {
return E_POINTER;
}
pvarRole->vt = VT_I4;
pvarRole->lVal = ROLE_SYSTEM_CARET;
return S_OK;
}
IFACEMETHODIMP AccessibleCaret::get_accState(VARIANT varChild, VARIANT *pvarState) {
if (pvarState == nullptr) {
return E_POINTER;
}
pvarState->vt = VT_I4;
pvarState->lVal = 0; // The state without any flags, corresponds to "normal".
return S_OK;
}
IFACEMETHODIMP AccessibleCaret::get_accHelp(VARIANT varChild, BSTR *pszHelp) {
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::get_accHelpTopic(BSTR *pszHelpFile, VARIANT varChild, long *pidTopic) {
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKeyboardShortcut) {
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::get_accFocus(VARIANT *pvarChild) {
if (pvarChild == nullptr) {
return E_POINTER;
}
pvarChild->vt = VT_EMPTY;
return S_OK;
}
IFACEMETHODIMP AccessibleCaret::get_accSelection(VARIANT *pvarChildren) {
return DISP_E_MEMBERNOTFOUND;
}
IFACEMETHODIMP AccessibleCaret::get_accDefaultAction(VARIANT varChild, BSTR *pszDefaultAction) {
return S_FALSE;
}
IFACEMETHODIMP AccessibleCaret::accSelect(long flagsSelect, VARIANT varChild) {
return DISP_E_MEMBERNOTFOUND;
}
IFACEMETHODIMP AccessibleCaret::accLocation(long *pxLeft, long *pyTop, long *pcxWidth, long *pcyHeight,
VARIANT varChild) {
if (pxLeft == nullptr || pyTop == nullptr || pcxWidth == nullptr || pcyHeight == nullptr) {
return E_POINTER;
}
EnterCriticalSection(&m_caretLocationLock);
*pxLeft = m_x;
*pyTop = m_y;
*pcxWidth = m_width;
*pcyHeight = m_height;
LeaveCriticalSection(&m_caretLocationLock);
return S_OK;
}
IFACEMETHODIMP AccessibleCaret::accNavigate(long navDir, VARIANT varStart, VARIANT *pvarEndUpAt) {
return DISP_E_MEMBERNOTFOUND;
}
IFACEMETHODIMP AccessibleCaret::accHitTest(long xLeft, long yTop, VARIANT *pvarChild) {
return DISP_E_MEMBERNOTFOUND;
}
IFACEMETHODIMP AccessibleCaret::accDoDefaultAction(VARIANT varChild) {
return DISP_E_MEMBERNOTFOUND;
}
IFACEMETHODIMP AccessibleCaret::put_accName(VARIANT varChild, BSTR szName) {
return E_NOTIMPL;
}
IFACEMETHODIMP AccessibleCaret::put_accValue(VARIANT varChild, BSTR szValue) {
return DISP_E_MEMBERNOTFOUND;
}
void AccessibleCaret::setLocation(long x, long y, long width, long height) {
EnterCriticalSection(&m_caretLocationLock);
m_x = x;
m_y = y;
m_width = width;
m_height = height;
LeaveCriticalSection(&m_caretLocationLock);
}
extern "C" {
/*
* Class: sun_awt_windows_AccessibleCaretLocationNotifier
* Method: updateNativeCaretLocation
* Signature: (JIIII)V
*/
JNIEXPORT void JNICALL Java_sun_awt_windows_AccessibleCaretLocationNotifier_updateNativeCaretLocation(
JNIEnv *env, jclass jClass,
jlong jHwnd, jint x, jint y, jint width, jint height) {
HWND hwnd = reinterpret_cast<HWND>(jHwnd);
bool caretIsNew = false;
AccessibleCaret* caret = AccessibleCaret::getOrCreateInstance(caretIsNew);
if (caretIsNew) {
// Notify with Object ID "OBJID_CARET".
// After that, an assistive tool will send a WM_GETOBJECT message with this ID,
// and we can return the caret instance.
NotifyWinEvent(EVENT_OBJECT_CREATE, hwnd, OBJID_CARET, CHILDID_SELF);
NotifyWinEvent(EVENT_OBJECT_SHOW, hwnd, OBJID_CARET, CHILDID_SELF);
}
caret->setLocation(x, y, width, height);
NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, hwnd, OBJID_CARET, CHILDID_SELF);
}
/*
* Class: sun_awt_windows_AccessibleCaretLocationNotifier
* Method: releaseNativeCaret
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_sun_awt_windows_AccessibleCaretLocationNotifier_releaseNativeCaret(
JNIEnv *env, jclass jClass, jlong jHwnd) {
if (AccessibleCaret::releaseInstanceIfPresent()) {
HWND hwnd = reinterpret_cast<HWND>(jHwnd);
NotifyWinEvent(EVENT_OBJECT_HIDE, hwnd, OBJID_CARET, CHILDID_SELF);
NotifyWinEvent(EVENT_OBJECT_DESTROY, hwnd, OBJID_CARET, CHILDID_SELF);
}
}
} /* extern "C" */

View File

@@ -0,0 +1,85 @@
/*
* Copyright (c) 2024, JetBrains s.r.o.. All rights reserved.
* 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.
*/
#ifndef ACCESSIBLECARET_H
#define ACCESSIBLECARET_H
#include <oleacc.h>
#include <windows.h> // ULONG, CRITICAL_SECTION
class AccessibleCaret : public IAccessible {
public:
static AccessibleCaret* getInstanceIfPresent() noexcept;
static AccessibleCaret* getOrCreateInstance();
static AccessibleCaret* getOrCreateInstance(bool& instanceIsNew);
static bool releaseInstanceIfPresent();
// IUnknown methods.
IFACEMETHODIMP_(ULONG) AddRef();
IFACEMETHODIMP_(ULONG) Release();
IFACEMETHODIMP QueryInterface(REFIID riid, void **ppInterface);
// IDispatch methods.
IFACEMETHODIMP GetTypeInfoCount(UINT *pctinfo);
IFACEMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo **pptinfo);
IFACEMETHODIMP GetIDsOfNames(REFIID riid, __in_ecount(cNames)
OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid);
IFACEMETHODIMP Invoke(DISPID dispidMember, REFIID riid, LCID lcid,
WORD wFlags, DISPPARAMS *pdispparams, VARIANT *pvarResult,
EXCEPINFO *pexcepinfo, UINT *puArgErr);
// IAccessible methods
IFACEMETHODIMP get_accParent(IDispatch **ppdispParent);
IFACEMETHODIMP get_accChildCount(long *pcountChildren);
IFACEMETHODIMP get_accChild(VARIANT varChild, IDispatch **ppdispChild);
IFACEMETHODIMP get_accName(VARIANT varChild, BSTR *pszName);
IFACEMETHODIMP get_accValue(VARIANT varChild, BSTR *pszValue);
IFACEMETHODIMP get_accDescription(VARIANT varChild, BSTR *pszDescription);
IFACEMETHODIMP get_accRole(VARIANT varChild, VARIANT *pvarRole);
IFACEMETHODIMP get_accState(VARIANT varChild, VARIANT *pvarState);
IFACEMETHODIMP get_accHelp(VARIANT varChild, BSTR *pszHelp);
IFACEMETHODIMP get_accHelpTopic(BSTR *pszHelpFile, VARIANT varChild, long *pidTopic);
IFACEMETHODIMP get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKeyboardShortcut);
IFACEMETHODIMP get_accFocus(VARIANT *pvarChild);
IFACEMETHODIMP get_accSelection(VARIANT *pvarChildren);
IFACEMETHODIMP get_accDefaultAction(VARIANT varChild, BSTR *pszDefaultAction);
IFACEMETHODIMP accSelect(long flagsSelect, VARIANT varChild);
IFACEMETHODIMP accLocation(long *pxLeft, long *pyTop, long *pcxWidth, long *pcyHeight, VARIANT varChild);
IFACEMETHODIMP accNavigate(long navDir, VARIANT varStart, VARIANT *pvarEndUpAt);
IFACEMETHODIMP accHitTest(long xLeft, long yTop, VARIANT *pvarChild);
IFACEMETHODIMP accDoDefaultAction(VARIANT varChild);
IFACEMETHODIMP put_accName(VARIANT varChild, BSTR szName);
IFACEMETHODIMP put_accValue(VARIANT varChild, BSTR szValue);
void setLocation(long x, long y, long width, long height);
private:
AccessibleCaret();
~AccessibleCaret();
ULONG m_refCount;
int m_x, m_y, m_width, m_height;
CRITICAL_SECTION m_caretLocationLock;
};
#endif //ACCESSIBLECARET_H

View File

@@ -50,6 +50,7 @@
#include "awt_Win32GraphicsDevice.h"
#include "Hashtable.h"
#include "ComCtl32Util.h"
#include "AccessibleCaret.h"
#include <Region.h>
@@ -2037,6 +2038,32 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
if (::IsWindow(AwtWindow::GetModalBlocker(GetHWnd()))) {
mr = mrConsume;
}
break;
}
case WM_GETOBJECT:
{
// We've got a WM_GETOBJECT message which was likely sent by an assistive tool.
// Therefore, we can start generating native caret accessibility events.
DWORD objId = static_cast<DWORD>(static_cast<DWORD_PTR>(lParam));
if (objId == OBJID_CLIENT) {
JNIEnv *env = (JNIEnv *) JNU_GetEnv(jvm, JNI_VERSION_1_2);
if (env != nullptr) {
jclass cls = env->FindClass("sun/awt/windows/AccessibleCaretLocationNotifier");
if (cls != nullptr) {
jmethodID mid = env->GetStaticMethodID(cls, "startCaretNotifier", "(J)V");
if (mid != nullptr) {
env->CallStaticVoidMethod(cls, mid, reinterpret_cast<jlong>(GetHWnd()));
}
}
}
} else if (objId == OBJID_CARET) {
AccessibleCaret *caret = AccessibleCaret::getInstanceIfPresent();
if (caret != nullptr) {
retValue = LresultFromObject(IID_IAccessible, wParam, caret);
mr = mrConsume;
}
}
break;
}
}
@@ -2450,7 +2477,7 @@ void AwtComponent::WmTouchHandler(const TOUCHINPUT& touchInput)
const jint scrollModifiers = modifiers & ~java_awt_event_InputEvent_SHIFT_DOWN_MASK;
SendMouseWheelEventFromTouch(p, scrollModifiers, sun_awt_event_TouchEvent_TOUCH_UPDATE, deltaY);
}
const jint deltaX = ScaleDownX(static_cast<int>(m_lastTouchPoint.x - p.x));
if (deltaX != 0) {
const jint scrollModifiers = modifiers | java_awt_event_InputEvent_SHIFT_DOWN_MASK;

View File

@@ -63,8 +63,10 @@ public abstract class HotSpotVirtualMachine extends VirtualMachine {
static {
String s = VM.getSavedProperty("jdk.attach.allowAttachSelf");
ALLOW_ATTACH_SELF = "".equals(s) || Boolean.parseBoolean(s);
// For now the default is false because it makes jstack hang with
// buffer overflow on lengthy outputs, which occur often in automatic tests.
String s2 = VM.getSavedProperty("jdk.attach.allowStreamingOutput");
ALLOW_STREAMING_OUTPUT = !("false".equals(s2));
ALLOW_STREAMING_OUTPUT = "".equals(s2) || Boolean.parseBoolean(s2);
}
private final boolean selfAttach;

View File

@@ -89,9 +89,12 @@ vmTestbase/jit/misctests/JitBug1/JitBug1.java JBR-8801 linux-aarch64,windows-all
vmTestbase/jit/misctests/Pi/Pi.java JBR-8854 linux-aarch64
vmTestbase/jit/misctests/t5/t5.java JBR-8854 linux-aarch64
vmTestbase/jit/misctests/putfield00802/putfield00802.java JBR-8801 linux-aarch64,windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002/TestDescription.java JBR-8743 windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003/TestDescription.java JBR-8743 windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi004/TestDescription.java JBR-8743,JBR-8744 windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi001/Multi001.java JBR-8545 windows-aarch64,windows-x64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002/TestDescription.java JBR-8927,JBR-8545 windows-aarch64,windows-x64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003/TestDescription.java JBR-8927,JBR-8545 windows-aarch64,windows-x64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi004/TestDescription.java JBR-8927,JBR-8545 windows-aarch64,windows-x64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java JBR-8927,JBR-8545 windows-aarch64,windows-x64
#############################################################################

View File

@@ -345,11 +345,10 @@ vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id1 8324756 generic
vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java 7199837 generic-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi001/Multi001.java JBR-8545, windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002/TestDescription.java JBR-8743 windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003/TestDescription.java JBR-8743 windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi004/TestDescription.java JBR-8743 windows-all
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java 8076494,JBR-8927 windows-x64,windows-aarch64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi001/Multi001.java JBR-8545 windows-aarch64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi002/TestDescription.java JBR-8927,JBR-8545 windows-aarch64
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi003/TestDescription.java JBR-8927,JBR-8545 windows-aarch64
mTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java JBR-8927,JBR-8545 windows-aarch64
vmTestbase/nsk/monitoring/ThreadMXBean/findMonitorDeadlockedThreads/find006/TestDescription.java 8310144 macosx-aarch64

View File

@@ -447,14 +447,8 @@ jdk_editpad = \
jbr_all = \
jb \
-jb/java/awt/wayland/VulkanBlitTest.java \
-jb/java/awt/wayland/RobotGetPixelsTest.java \
-jb/java/awt/wayland/ImageTransformTest.java \
-jb/java/awt/wayland/VulkanGCCompatibilityTest.java \
-jb/java/awt/wayland/RobotGetPixelTest.java \
-jb/java/awt/wayland/RobotGetOOBPixelsTest.java \
-jb/java/awt/wayland/VulkanCompositeTest.java \
-jb/java/awt/wayland/VulkanMaskFillTest.java
-jb/java/awt/vulkan \
-jb/java/awt/wayland/vulkan \
jdk_desktop = \
:jdk_desktop_part1 \
@@ -823,6 +817,7 @@ jdk_since_checks = \
jdk_awt_wayland = \
:jdk_awt \
jb/java/awt/wayland \
-jb/java/awt/wayland/vulkan \
jb/java/awt/Focus/ActivateAfterHide.java \
-com/apple/eawt \
-com/apple/laf \

View File

@@ -35,6 +35,7 @@ public class DetectingOSThemeTest {
private static final String LIGHT_THEME_NAME = "Light";
private static final String DARK_THEME_NAME = "Dark";
private static final String UNDEFINED_THEME_NAME = "Undefined";
private static boolean isKDE = false;
private static String currentTheme() {
Boolean val = (Boolean) Toolkit.getDefaultToolkit().getDesktopProperty("awt.os.theme.isDark");
@@ -44,8 +45,14 @@ public class DetectingOSThemeTest {
return (val) ? DARK_THEME_NAME : LIGHT_THEME_NAME;
}
private static void setOsDarkTheme(String val) {
try {
private static void setOsDarkTheme(String val) throws Exception {
if (isKDE) {
if (val.equals(DARK_THEME_NAME)) {
Runtime.getRuntime().exec("plasma-apply-colorscheme BreezeDark");
} else {
Runtime.getRuntime().exec("plasma-apply-colorscheme BreezeLight");
}
} else {
if (val.equals(DARK_THEME_NAME)) {
Runtime.getRuntime().exec("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'");
Runtime.getRuntime().exec("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'");
@@ -53,14 +60,13 @@ public class DetectingOSThemeTest {
Runtime.getRuntime().exec("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita'");
Runtime.getRuntime().exec("gsettings set org.gnome.desktop.interface color-scheme 'default'");
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private static String currentTheme = null;
public static void main(String[] args) throws Exception {
isKDE = "KDE".equals(System.getenv("XDG_CURRENT_DESKTOP"));
currentTheme = currentTheme();
if (currentTheme.equals(UNDEFINED_THEME_NAME)) {
throw new RuntimeException("Test Failed! Cannot detect current OS theme");

View File

@@ -0,0 +1,72 @@
/*
* Copyright 2025 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.
*/
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeCellRenderer;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.util.Objects;
/*
* @test
* @summary regression test for JBR-9365 Unnecessary operations on tree node update
*/
public class NodeUpdatePerformance {
private static int countBefore;
private static int countAfter;
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(() -> {
DefaultMutableTreeNode root = new DefaultMutableTreeNode();
DefaultMutableTreeNode child = new DefaultMutableTreeNode();
root.add(child);
DefaultTreeModel model = new DefaultTreeModel(root);
JTree tree = new JTree(model);
tree.setRowHeight(10);
tree.setLargeModel(true);
OurRenderer renderer = new OurRenderer();
tree.setCellRenderer(renderer);
countBefore = renderer.invocationCount;
model.valueForPathChanged(new TreePath(child.getPath()), "newValue");
countAfter = renderer.invocationCount;
});
if (countBefore != countAfter) {
throw new RuntimeException("Unexpected renderer access: countBefore=" + countBefore + ", countAfter=" + countAfter);
}
}
private static class OurRenderer extends JLabel implements TreeCellRenderer {
private int invocationCount;
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
invocationCount++;
setText(Objects.toString(value));
return this;
}
}
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2025 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.
*/
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import javax.swing.JFrame;
import javax.swing.JLabel;
/**
* @test
* @summary Verifies that a small window does not generate GTK warnings in Wayland
* @requires os.family == "linux"
* @key headful
* @library /test/lib
* @run main WLFrameMinSize
*/
public class WLFrameMinSize {
private static JFrame frame;
public static void main(String[] args) throws Exception {
if (args.length > 0 && args[0].equals("--test")) {
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
frame = new JFrame("WLFrameMinSize");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new JLabel("a"));
frame.pack();
frame.setVisible(true);
}
});
Thread.sleep(2000);
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
frame.dispose();
}
});
} else {
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
WLFrameMinSize.class.getName(),
"--test");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldNotContain("Gtk-WARNING");
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* Copyright 2025 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.
*/
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.GridLayout;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
import java.util.concurrent.CompletableFuture;
/**
* @test
* @summary Verifies popups and tooltips are disposed of when switching to a different window
* @requires os.family == "linux"
* @key headful
* @run main/manual WLUngrab
*/
public class WLUngrab {
static final CompletableFuture<RuntimeException> swingError = new CompletableFuture<>();
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(WLUngrab::showUI);
swingError.get();
}
private static void showUI() {
JFrame frame = new JFrame("Ungrab test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
JMenu menu1 = new JMenu("Test menu");
menu1.add(new JMenuItem("item 1"));
menu1.add(new JMenuItem("item 2"));
menu1.addSeparator();
JMenu submenu = new JMenu("submenu...");
submenu.add(new JMenuItem("subitem1"));
submenu.add(new JMenuItem("subitem2"));
submenu.add(new JMenuItem("subitem3"));
menu1.add(submenu);
menuBar.add(menu1);
JMenu menu2 = new JMenu("Another");
menu2.add(new JMenuItem("test"));
menuBar.add(menu2);
frame.setJMenuBar(menuBar);
JLabel label = new JLabel("Right-click here for a popup-menu.");
final JPopupMenu popup = new JPopupMenu();
popup.add(new JMenuItem("popup menu item"));
popup.add(new JMenuItem("popup menu item 2"));
popup.add(new JMenuItem("popup menu item 3"));
label.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
if (e.isPopupTrigger()) {
popup.show(e.getComponent(),
e.getX(), e.getY());
}
}
});
JPanel content = new JPanel();
var layout = new GridLayout(3, 2, 10, 10);
content.setLayout(layout);
content.add(label);
JButton button = new JButton("Hover here for a tooltip");
button.setToolTipText("<html><h1>TOOLTIP</h2><p>tooltip text</p></html>");
content.add(button);
JButton passButton = new JButton("Pass");
passButton.addActionListener(e -> {swingError.complete(null);});
JButton failButton = new JButton("Fail");
failButton.addActionListener(e -> {swingError.completeExceptionally(new RuntimeException("The tester has pressed FAILED"));});
content.add(failButton);
content.add(passButton);
content.add(new JLabel("<html><h1>INSTRUCTIONS</h1>" +
"<p>Make a tooltip, popup, or pulldown menu appear.</p>" +
"<p>Switch to a different application window.</p>" +
"<p>Switch back to this window.</p>" +
"<p>Press Pass iff the tooltip/popup/menu was closed upon switching back.</p>" +
"<p>Otherwise press Fail.</p></html>"));
frame.setContentPane(content);
frame.pack();
frame.setVisible(true);
}
}

View File

@@ -36,6 +36,7 @@ java/awt/Window/GrabSequence/GrabSequence.java 6848409,JBR-8584 macosx-all,linux
javax/accessibility/JFileChooserAccessibleDescriptionTest.java JBR-5397,JBR-7379 macosx-all,windows-x64
javax/accessibility/SlowPanelIteration/SlowPanelIteration.java JBR-870,JBR-5397 windows-x64,linux-x64,macosx-all
javax/swing/event/FocusEventCauseTest.java JBR-7381 windows-x64
javax/swing/JButton/4796987/bug4796987.java JBR-9345 windows-x64
javax/swing/JButton/8151303/PressedIconTest.java JBR-5210,JBR-5510,JBR-5397 windows-all,linux-all,macosx-all
javax/swing/JComboBox/4743225/bug4743225.java JBR-5210,JBR-5397 windows-all,macosx-all
javax/swing/JComboBox/6559152/bug6559152.java JBR-5397,JBR-7382 macosx-all,windows-x64
@@ -57,9 +58,10 @@ javax/swing/text/StyledEditorKit/4506788/bug4506788.java JBR-7386 windows-x64
jb/java/awt/CustomTitleBar/DialogNativeControlsTest.java JBR-9083 windows-x64
jb/java/awt/Desktop/AboutHandlerTest.java nobug macosx-all,linux-all,windows-all
jb/java/awt/Focus/FrameAfterPopup.java JBR-9161 windows-x64
jb/java/awt/Focus/NewFrameAfterDialogTest.java JBR-7387 windows-x64
jb/java/awt/Focus/ChainOfPopupsFocusTest.java JBR-8407 windows-x64
jb/java/awt/Focus/FrameAfterPopup.java JBR-9161 windows-x64
jb/java/awt/Focus/MaximizedCustomDecorationsTest.java JBR-9346 windows-x64
jb/java/awt/Focus/NewFrameAfterDialogTest.java JBR-7387 windows-x64
# VoiceOver on MacOS
java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java JBR-5397 macosx-all

View File

@@ -13,7 +13,7 @@ javax/swing/JComponent/7154030/bug7154030.java JBR-7713 macosx-aarch64
javax/swing/JDialog/Transparency/TransparencyTest.java JBR-7554 macosx-aarch64
javax/swing/JSplitPane/4820080/JSplitPaneDragColorTest.java JBR-7247 macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java JBR-7404 macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java JBR-8327 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java JBR-8327 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
javax/swing/plaf/aqua/CustomComboBoxFocusTest.java JBR-5190 macosx-all
javax/swing/SwingGraphics/TranslateTest.java JBR-7510 macosx-aarch64

View File

@@ -112,15 +112,20 @@
############################################################################
java/awt/dnd/RemoveDropTargetCrashTest/RemoveDropTargetCrashTest.java JBR-8960 windows-x64
java/awt/Focus/ModalDialogInFocusEventTest.java JBR-7818 linux-6.14.0-1010-aws
java/awt/Focus/ModalDialogInFocusEventTest.java JBR-7818 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-8542 windows-all timeout
java/awt/Graphics2D/TextPerf.java JBR-8541 linux-all,windows-all
java/awt/GridBagLayout/ComponentShortage.java 8355280,JBR-9347 windows-all,linux-all,macosx-x64
java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogTest/EnqueueWithDialogTest.java JBR-7077 linux-all,windows-all
java/awt/MenuItem/EnableTest.java JBR-8543 windows-all timeout
java/awt/Robot/NonEmptyErrorStream.java JBR-6275 macosx-all
java/awt/Modal/MultipleDialogs/MixOfModalAndNonModalDialogs.java JBR-9317 linux-6.16.7-100.fc41.x86_64
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5510,JBR-6275,JBR-8299,JBR-9259 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7,macosx-all,linux-5.18.2-arch1-1,linux-aarch64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/border/TestTitledBorderLeak.java JBR-9272 macosx-14.8
javax/swing/JButton/TestMnemonicAction.java JBR-6508 windows-all,linux-all,macosx-all
javax/swing/JComboBox/8072767/bug8072767.java JBR-5540 windows-all,macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java JBR-7404 macosx-all
javax/swing/plaf/synth/7158712/bug7158712.java 8322653,JBR-9061 macosx-all,linux-6.8.0-1033-aws
javax/swing/plaf/synth/7158712/bug7158712.java 8322653,JBR-9061 macosx-all,linux-6.8.0-1033-aws,linux-6.8.0-1036-aws
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330,JBR-6274 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-all
jb/build/ResolveSymbolsTest/ResolveSymbolsRealEnv.java JBR-8544 linux-all

View File

@@ -27,7 +27,7 @@ java/awt/Robot/CheckCommonColors/CheckCommonColors.java 8253184,JBR-5510,JBR-544
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184,JBR-5442 windows-all,linux-all
java/awt/Robot/InfiniteLoopException.java 8342638,JBR-8830 windows-x64,windows-all,linux-all
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-5390 macosx-all,linux-all
java/awt/Robot/NonEmptyErrorStream.java JBR-5442,8340330,JBR-5510,JBR-8299 linux-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,linux-5.18.2-arch1-1,linux-aarch64
java/awt/Robot/NonEmptyErrorStream.java JBR-5442,8340330,JBR-5510,JBR-8299 linux-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7,linux-5.18.2-arch1-1,linux-aarch64
java/awt/Robot/RobotMoveMultiscreen.java JBR-5442 linux-all
java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java JBR-6065 windows-all
java/awt/Window/SlowMotion/SlowMotion.java JBR-5442 linux-all
@@ -108,7 +108,6 @@ java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665,8253184,JBR-551
java/awt/Paint/PaintNativeOnUpdate.java 8253184,JBR-5510 windows-all,linux-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184,NOBUG windows-all,linux-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java NOBUG linux-all
java/awt/Window/8159168/SetShapeTest.java 8253184,JBR-5510 windows-all,linux-all
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java JBR-5510 linux-all
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-5510 linux-all
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8253184,JBR-5510 windows-all,linux-all

View File

@@ -24,6 +24,7 @@ java/awt/font/TextLayout/VisibleAdvance.java JBR-8766 linux-all
java/awt/FontMetrics/ExtremeFontSizeTest.java JBR-7823 linux-all
java/awt/Graphics2D/DrawString/IgnoredWhitespaceTest.java JBR-9086 linux-all
java/awt/Graphics2D/DrawString/RotTransText.java JBR-8767 linux-all
java/awt/Graphics/NativeWin32Clear.java JBR-8689 linux-x64
java/awt/Graphics/XORPaint.java#id2 JBR-7373 linux-x64
java/awt/image/DrawImage/SimpleManagedImage.java JBR-8769 linux-all
java/awt/image/DrawImage/SimpleUnmanagedImage.java JBR-8769 linux-all

View File

@@ -134,6 +134,7 @@ java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayout
java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java 8016266 linux-all
java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all
java/awt/Focus/InactiveFocusRace.java 8023263,JBR-8586 linux-all,windows-x64
java/awt/Focus/InputVerifierTest3/InputVerifierTest3.java JBR-7311 linux-6.8.0-1036-aws
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all
java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all
java/awt/Focus/LabelScrollBarFocus.java JBR-8027 linux-all
@@ -147,7 +148,7 @@ java/awt/Frame/DisposeTest.java JBR-7937,JBR-7938,JBR-8718 macosx-aarch64,window
java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all
java/awt/Frame/MaximizeUndecoratedTest.java JBR-8064 linux-all
java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java JBR-7509 macosx-all
java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java JBR-7947 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java 8340374,JBR-7947 macosx-all
java/awt/Frame/MaximizedToOppositeScreen/MaximizedToOppositeScreenBig.java JBR-5303 windows-all
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
java/awt/Frame/InitialIconifiedTest.java 7144049,8203920 macosx-all,linux-all
@@ -204,7 +205,7 @@ java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java JBR-5210,JBR-6126
java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150,JBR-4880,8253184,JBR-5510 macosx-all,windows-all,linux-5.18.2-arch1-1
java/awt/grab/GrabOnUnfocusableToplevel/GrabOnUnfocusableToplevel.java 8169109,JBR-4880 linux-all,windows-all
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-9207 linux-6.15.8-100.fc41.x86_64
java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-9207 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405,8253184 generic-all
java/awt/Mixing/AWT_Mixing/MixingFrameResizing.java 8049405,8253184 generic-all
java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java 8294264 windows-x64
@@ -328,7 +329,7 @@ java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java 8150540,JBR-3107 wind
java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java 8150540,JBR-3107 windows-all,macosx-all,linux-all
java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java 8150540,JBR-3107 windows-all,linux-all
java/awt/Window/8027025/Test8027025.java 8253184 windows-all
java/awt/Window/8159168/SetShapeTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
java/awt/Window/8159168/SetShapeTest.java 8253184 windows-all
java/awt/Window/HandleWindowDestroyTest/HandleWindowDestroyTest.java JBR-6540 macosx-x64
java/awt/Window/SetWindowLocationByPlatformTest/SetWindowLocationByPlatformTest.java 8253184,JBR-5728 windows-all,linux-all
java/awt/Window/ShapedAndTranslucentWindows/SetShape.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
@@ -338,7 +339,7 @@ java/awt/Window/ShapedAndTranslucentWindows/ShapedTranslucentWindowClick.java 80
java/awt/Window/ShapedAndTranslucentWindows/TranslucentChoice.java 8253184 windows-all
java/awt/Window/ShapedAndTranslucentWindows/TranslucentWindowClick.java 8253184 windows-all
java/awt/Window/setLocRelativeTo/SetLocationRelativeToTest.java 8253184 windows-all
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-5510,JBR-9192 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-9192 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8253184,JBR-5510,JBR-6463 windows-all,linux-all
java/awt/Window/ShapedAndTranslucentWindows/FocusAWTTest.java 8222328 windows-all,linux-all,macosx-all
java/awt/Window/ShapedAndTranslucentWindows/Shaped.java 8222328 windows-all,linux-all,macosx-all
@@ -353,14 +354,9 @@ java/awt/Window/Grab/GrabTest.java 8253184 windows-all
java/awt/Window/GrabSequence/GrabSequence.java 6848409 macosx-all,linux-all
java/awt/Window/LocationAtScreenCorner/LocationAtScreenCorner.java 8203371 linux-all
java/awt/FontClass/FontAccess.java JBR-5225 windows-all
java/awt/font/ComplexEmoji.java JBR-5009 linux-aarch64
java/awt/font/Emoji/ComplexEmoji.java JBR-8282 generic-all
java/awt/font/Emoji/EmojiVariation.java JBR-8716 linux-5.18.2-arch1-1
java/awt/font/EmojiVariation.java JBR-5009,JBR-5510 linux-aarch64,linux-5.18.2-arch1-1
java/awt/font/FontScaling/StretchedFontTest.java JBR-6225 macosx-all
java/awt/font/GlyphVector/LayoutCompatTest.java JBR-8437 linux-aarch64
java/awt/font/JNICheck/JNICheck.sh JBR-5011 linux-all
java/awt/font/OutlineTextRendererEmoji.java JBR-5009 linux-aarch64
java/awt/font/TextLayout/ArabicDiacriticTest.java JBR-6760 linux-i386
java/awt/font/TextLayout/DecorationBoundsTest.java JBR-6760 linux-i386
java/awt/font/TextLayout/FormatCharAdvanceTest.java JBR-8289 macosx-all
@@ -383,7 +379,7 @@ java/awt/image/multiresolution/MultiresolutionIconTest.java 8252812 windows-all,
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
java/awt/print/Headless/HeadlessPrinterJob.java 8196088 windows-all
sun/awt/datatransfer/SuplementaryCharactersTransferTest.java 8011371 generic-all
sun/awt/font/TestArabicHebrew.java JBR-8826,JBR-9210 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64
sun/awt/font/TestArabicHebrew.java JBR-8826,JBR-9210 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
sun/awt/font/TestDevTransform.java JBR-7882 linux-all,windows-all
sun/awt/shell/ShellFolderMemoryLeak.java 8197794 windows-all
sun/awt/windows/TestPen.java JBR-8718 linux-5.18.2-arch1-1
@@ -397,8 +393,8 @@ sun/java2d/loops/XORClearRect.java JBR-8718 linux-5.18.2-arch1-1
java/awt/Graphics/GDIResourceExhaustionTest.java JBR-8719 linux-5.18.2-arch1-1
java/awt/Graphics/NativeWin32Clear.java JBR-8689 linux-aarch64,linux-5.18.2-arch1-1
java/awt/Graphics/XORPaint.java#id1 JBR-8642 macosx-aarch64
java/awt/Graphics/XORPaint.java#id2 JBR-5510 linux-5.18.2-arch1-1
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354,JBR-9206 macosx-all,windows-all,linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64
java/awt/Graphics/XORPaint.java#id2 JBR-9348 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354,JBR-9206 macosx-all,windows-all,linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Graphics2D/DrawString/DisposerTest.java JBR-5010,JBR-5510 linux-aarch64,linux-5.18.2-arch1-1
java/awt/Graphics2D/DrawString/DrawRotatedStringUsingRotatedFont.java 8266283 generic-all
sun/java2d/SunGraphics2D/DrawImageBilinear.java 8297175 linux-all
@@ -447,7 +443,7 @@ java/awt/Frame/MiscUndecorated/FrameCloseTest.java JBR-5210 windows-all
java/awt/Frame/MiscUndecorated/RepaintTest.java 8266244,JBR-5786 macosx-aarch64,generic-all
java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java 8253184 windows-all
java/awt/Robot/InfiniteLoopException.java 8342638 windows-all,linux-all
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5510,JBR-8299,JBR-9259 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,linux-5.18.2-arch1-1,linux-aarch64,linux-6.15.8-100.fc41.x86_64
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5510,JBR-8299,JBR-9259 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7,linux-5.18.2-arch1-1,linux-aarch64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Robot/RobotExtraButton/RobotExtraButton.java JBR-6554 linux-all
java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 7186009,8253184 macosx-all,windows-all
java/awt/Modal/FileDialog/FileDialogAppModal2Test.java 7186009,8253184 macosx-all,windows-all
@@ -600,7 +596,7 @@ java/awt/Modal/MultipleDialogs/MultipleDialogs5Test.java 8198665,8253184 macosx-
java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326,8253184,JBR-6305 macosx-all,windows-all,linux-x64
java/awt/Mouse/EnterExitEvents/DragWindowTest.java 8253184 windows-all
java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java 8253184,JBR-5811 windows-all,linux-all
java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021,8253184,JBR-9208 macosx-all,windows-all,linux-6.15.8-100.fc41.x86_64
java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021,8253184,JBR-9208 macosx-all,windows-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java 8051455 macosx-all
java/awt/Mouse/ExtraMouseClick/ExtraMouseClick.java 8253184,JBR-5709 windows-all,linux-all
java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java 8253184,JBR-6752 windows-all,linux-all
@@ -735,8 +731,8 @@ java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java 8253184 windows-all
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 linux-all,windows-all
java/awt/xembed/server/RunTestXEmbed.java 7034201 linux-all
java/awt/Modal/ModalFocusTransferTests/FocusTransferDialogsDocModalTest.java 8164473 linux-all
java/awt/Frame/DecoratedFrameInsets/DecoratedFrameInsetsTest.java JBR-5205,JBR-9204 linux-5.4.0-1103-aws,linux-6.15.8-100.fc41.x86_64
java/awt/Frame/DynamicLayout/DynamicLayout.java JBR-9205 linux-6.15.8-100.fc41.x86_64
java/awt/Frame/DecoratedFrameInsets/DecoratedFrameInsetsTest.java JBR-5205,JBR-9204 linux-5.4.0-1103-aws,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Frame/DynamicLayout/DynamicLayout.java JBR-9205 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/GraphicsDevice/CheckDisplayModes.java JBR-8183 macosx-x64
java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java 7099223,8274106 macosx-all,linux-all,windows-all
@@ -761,7 +757,7 @@ java/awt/Paint/bug8024864.java JBR-6544 generic-all
java/awt/Paint/ComponentIsNotDrawnAfterRemoveAddTest/ComponentIsNotDrawnAfterRemoveAddTest.java 8253184,JBR-6844 windows-all,linux-5.18.2-arch1-1
java/awt/Paint/ListRepaint.java JBR-5060 linux-all
java/awt/Paint/PaintNativeOnUpdate.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-7035,JBR-9257 windows-all,macosx-all,linux-6.15.8-100.fc41.x86_64
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-7035,JBR-9257 windows-all,macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/GridBagLayout/ComponentShortage.java 8355280 windows-all,linux-all
java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java 8253184 windows-all
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720,8322653 windows-all,macosx-all
@@ -851,9 +847,9 @@ com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all
java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java 8247426 generic-all
sun/management/jdp/JdpDefaultsTest.java 8241865,JBR-9229 linux-aarch64,macosx-all,linux-6.15.8-100.fc41.x86_64
sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8241865,JBR-9229 macosx-all,linux-6.15.8-100.fc41.x86_64
sun/management/jdp/JdpSpecificAddressTest.java 8241865,JBR-9229 macosx-all,linux-6.15.8-100.fc41.x86_64
sun/management/jdp/JdpDefaultsTest.java 8241865,JBR-9229 linux-aarch64,macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8241865,JBR-9229 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
sun/management/jdp/JdpSpecificAddressTest.java 8241865,JBR-9229 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.java JBR-8707 windows-all
sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id0 JBR-8707 windows-all
@@ -895,14 +891,15 @@ java/net/MulticastSocket/Test.java 7145658 macosx-a
# jdk_nio
java/nio/channels/AsynchronousSocketChannel/StressLoopback.java JBR-8817 windows-aarch64
java/nio/channels/DatagramChannel/AdaptorMulticasting.java 8144003,JBR-8455,JBR-8456,8308807,JBR-9219 macosx-all,aix-ppc64,linux-6.15.8-100.fc41.x86_64
java/nio/channels/DatagramChannel/AdaptorMulticasting.java 8144003,JBR-8455,JBR-8456,8308807,JBR-9219 macosx-all,aix-ppc64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/nio/channels/DatagramChannel/BasicMulticastTests.java 8144003 macosx-all
java/nio/channels/DatagramChannel/Loopback.java JBR-9219 linux-6.15.8-100.fc41.x86_64
java/nio/channels/DatagramChannel/Loopback.java JBR-9219 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/nio/channels/DatagramChannel/ManySourcesAndTargets.java 8264385 macosx-aarch64
java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java 8144003,JBR-9218 macosx-all,linux-6.15.8-100.fc41.x86_64
java/nio/channels/DatagramChannel/Promiscuous.java 8144003,JBR-9218 macosx-all,linux-6.15.8-100.fc41.x86_64
java/nio/channels/DatagramChannel/PromiscuousIPv6.java JBR-8828,JBR-9218 macosx-x64,linux-6.15.8-100.fc41.x86_64
java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java 8144003,JBR-9218 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/nio/channels/DatagramChannel/Promiscuous.java 8144003,JBR-9218 macosx-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/nio/channels/DatagramChannel/PromiscuousIPv6.java JBR-8828,JBR-9218 macosx-x64,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/nio/channels/DatagramChannel/Unref.java 8233437 generic-all
java/nio/channels/FileChannel/LargeGatheringWrite.java JBR-9316 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/nio/channels/Selector/LotsOfInterrupts.java#virtual JBR-8940 windows-aarch64
java/nio/channels/Selector/Wakeup.java 6963118 windows-all
@@ -955,7 +952,7 @@ sun/security/smartcardio/TestExclusive.java 8039280 generic-
sun/security/smartcardio/TestMultiplePresent.java 8039280 generic-all
sun/security/smartcardio/TestPresent.java 8039280 generic-all
sun/security/smartcardio/TestTransmit.java 8039280 generic-all
sun/security/ssl/SSLSessionImpl/MultiNSTClient.java JBR-9058 macosx-15.5,macosx-15.6
sun/security/ssl/SSLSessionImpl/MultiNSTClient.java JBR-9058 macosx-15.5,macosx-15.6,macosx-15.7
com/sun/crypto/provider/Cipher/DES/PerformanceTest.java 8039280 generic-all
com/sun/security/auth/callback/TextCallbackHandler/Default.java 8039280 generic-all
com/sun/security/auth/callback/TextCallbackHandler/Password.java 8039280 generic-all
@@ -1084,7 +1081,7 @@ javax/swing/JDialog/Transparency/TransparencyTest.java 8253184,JBR-5510 windows-
javax/swing/JFrame/MaximizeWindowTest.java 8321289,JBR-8292 linux-all
javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java JBR-8837 macosx-all
javax/swing/JLabel/4138746/JLabelMnemonicsTest.java JBR-4949 linux-all,windows-all
javax/swing/JLabel/6596966/bug6596966.java 8197552,JBR-9195 windows-all,linux-6.15.8-100.fc41.x86_64
javax/swing/JLabel/6596966/bug6596966.java 8197552,JBR-9195 windows-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JLabel/7004134/bug7004134.java JBR-5437 linux-all
javax/swing/JLabel/bug4822331.java JBR-7422 windows-all
javax/swing/JList/6462008/bug6462008.java JBR-8063 windows-all
@@ -1127,7 +1124,7 @@ javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 81
javax/swing/JWindow/ShapedAndTranslucentWindows/SetShapeAndClickSwing.java 8013450,8253184 macosx-all,windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java 8024627,8253184 macosx-all,windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentWindowClickSwing.java 8253184 windows-all
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-5510,JBR-9202 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-5510,JBR-9202 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
# The next test below is an intermittent failure
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
javax/swing/JTree/4330357/bug4330357.java 8253184,JBR-6466 windows-all,linux-all
@@ -1157,18 +1154,18 @@ javax/swing/JFormattedTextField/bug4863121.java JBR-7424 windows-all
javax/swing/JFrame/8016356/bug8016356.java JBR-108 windows-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8274106,JBR-5510 macosx-aarch64,linux-5.18.2-arch1-1
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956,JBR-6533 macosx-all,linux-all,windows-all
javax/swing/JSlider/bug4382876.java JBR-8666 linux-6.14.0-1010-aws
javax/swing/JSlider/bug4382876.java JBR-8666 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws
javax/swing/JScrollBar/4708809/bug4708809.java 8169957 windows-x64
javax/swing/JScrollPane/HorizontalMouseWheelOnShiftPressed/HorizontalMouseWheelOnShiftPressed.java 8197552 windows-all
javax/swing/JSplitPane/4885629/bug4885629.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JTabbedPane/4361477/bug4361477.java JBR-5932 linux-all
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922,8197552,JBR-6235 macosx-all,windows-all,linux-all 8064922:macosx-all, 8197552:windows-all
javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java 8253184,JBR-8498,JBR-8718 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,linux-5.18.2-arch1-1
javax/swing/JTabbedPane/TestJTabbedPaneBackgroundColor.java JBR-8718,JBR-8493 linux-5.18.2-arch1-1,macosx-15.4.1,macosx-15.5,macosx-15.6
javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java 8253184,JBR-8498,JBR-8718 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7,linux-5.18.2-arch1-1
javax/swing/JTabbedPane/TestJTabbedPaneBackgroundColor.java JBR-8718,JBR-8493 linux-5.18.2-arch1-1,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
javax/swing/JToggleButton/TestSelectedKey.java JBR-5846 windows-all
javax/swing/JToolBar/4529206/bug4529206.java JBR-5387 linux-all
javax/swing/JToolTip/6219960/bug6219960.java 8253184 windows-all
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-5510,JBR-9201 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-5510,JBR-9201 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/SwingGraphics/TranslateTest.java JBR-8718 linux-5.18.2-arch1-1
javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
javax/swing/text/AbstractDocument/8190763/TestCCEOnEditEvent.java JBR-5799,JBR-8290 windows-all,linux-all
@@ -1186,8 +1183,8 @@ javax/swing/JInternalFrame/6288609/TestJInternalFrameDispose.java JBR-788 window
javax/swing/JInternalFrame/6647340/bug6647340.java 8253184 windows-all
javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java JBR-788 windows-all,linux-all
javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java JBR-5539 windows-all
javax/swing/JInternalFrame/JInternalFrameTest.java JBR-9193 linux-6.15.8-100.fc41.x86_64
javax/swing/JInternalFrame/Test6325652.java JBR-6111,JBR-9194 windows-all,linux-6.15.8-100.fc41.x86_64
javax/swing/JInternalFrame/JInternalFrameTest.java JBR-9193 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JInternalFrame/Test6325652.java JBR-6111,JBR-9194 windows-all,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JInternalFrame/Test6505027.java JBR-5954 linux-all,macosx-all
javax/swing/JInternalFrame/Test6802868.java 8253184 windows-all
javax/swing/JPopupMenu/4634626/bug4634626.java 8253184 windows-all
@@ -1217,13 +1214,14 @@ javax/swing/text/GlyphPainter2/6427244/bug6427244.java JBR-896,JBR-6760 windows-
javax/swing/text/JTextComponent/5074573/bug5074573.java CODETOOLS-7901623,JBR-5386 windows-all,linux-all
javax/swing/text/JTextComponent/6361367/bug6361367.java JBR-521,JBR-6687 windows-all,linux-5.18.2-arch1-1
javax/swing/text/View/8014863/bug8014863.java JBR-5541 windows-all,linux-all
javax/swing/text/View/8048110/bug8048110.java JBR-9256,JBR-9207 windows-all,linux-6.16.7-100.fc41.x86_64
javax/swing/text/View/8156217/FPMethodCalledTest.java JBR-5542 linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
java/awt/Robot/CheckCommonColors/CheckCommonColors.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java JBR-5802 windows-all
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-9209 linux-6.15.8-100.fc41.x86_64
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-9209 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/ColorClass/AlphaColorTest.java JBR-5510 linux-5.18.2-arch1-1
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
@@ -1326,9 +1324,9 @@ jdk/jfr/event/runtime/TestShutdownEvent.java JBR-8781 windows-aarch64
jdk/jfr/jvm/TestDumpOnCrash.java JBR-8780 windows-aarch64
jdk/jfr/jvm/TestWaste.java 8282427 generic-all
jdk/jfr/api/consumer/recordingstream/TestOnEvent.java 8255404 linux-x64
jdk/jfr/api/consumer/streaming/TestOutOfProcessMigration.java JBR-8460 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
jdk/jfr/api/consumer/streaming/TestJVMCrash.java JBR-8459 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
jdk/jfr/api/consumer/streaming/TestJVMExit.java JBR-8460 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
jdk/jfr/api/consumer/streaming/TestOutOfProcessMigration.java JBR-8460 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
jdk/jfr/api/consumer/streaming/TestJVMCrash.java JBR-8459 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
jdk/jfr/api/consumer/streaming/TestJVMExit.java JBR-8460 macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
jdk/jfr/tool/TestPrint.java JBR-8704 macosx-all
############################################################################
@@ -1366,7 +1364,7 @@ javax/swing/JFileChooser/6698013/bug6698013.java 8024419 macosx-all
javax/swing/JColorChooser/8065098/bug8065098.java 8065647 macosx-all
java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all
javax/swing/JTabbedPane/4666224/bug4666224.html 8144124 macosx-all
javax/swing/JTextArea/4697612/bug4697612.java JBR-9200 linux-6.15.8-100.fc41.x86_64
javax/swing/JTextArea/4697612/bug4697612.java JBR-9200 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JTextArea/7049024/bug7049024.java JBR-5836 linux-all
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java 8253184 windows-all
java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 8162380,JBR-4207 generic-all,windows-all
@@ -1445,13 +1443,13 @@ com/sun/java/swing/plaf/windows/AltFocusIssueTest.java
jb/hotspot/AsyncProfilerRunnerTest.java JBR-7175 macosx-all
jb/java/awt/CustomTitleBar/DialogNativeControlsTest.java JBR-8794 windows-aarch64
jb/java/awt/Graphics2D/TextRender/OGLMetalTextRender.java JBR-4091,JBR-5392 windows-aarch64,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6
jb/java/awt/Graphics2D/TextRender/OGLMetalTextRender.java JBR-4091,JBR-5392 windows-aarch64,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-15.4,macosx-15.4.1,macosx-15.5,macosx-15.6,macosx-15.7
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTestLinux.sh JBR-4078 linux-all
jb/java/awt/Font/Font467.java JBR-3960 generic-all
jb/java/awt/image/BufferedFontRenderingTest.java JBR-6493 generic-all
jb/java/awt/keyboard/AltGrMustGenerateAltGrModifierTest4207.java JBR-4207 windows-all
jb/java/awt/Toolkit/AWTThreadingTest.java JBR-4350 macosx-all
jb/java/awt/Toolkit/DetectingOSThemeTest.java JBR-9228 linux-6.15.8-100.fc41.x86_64
jb/java/awt/Toolkit/DetectingOSThemeTest.java JBR-9228 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
jb/java/awt/Toolkit/LWCToolkitInvokeAndWaitTest.java JBR-4896,JBR-5163 macosx-all,
java/awt/Dialog/NonResizableDialogSysMenuResize/NonResizableDialogSysMenuResize.java JBR-4250 windows-all
@@ -1498,7 +1496,7 @@ jb/java/awt/wayland/VulkanBlitTest.java JBR-8394 linux-5.18.2-arch1-1,linux-5.15
jb/java/awt/wayland/VulkanCompositeTest.java JBR-8394 linux-5.18.2-arch1-1,linux-5.15.0-1081-aws,linux-5.15.0-1083-aws,linux-5.15.0-1084-aws
jb/java/awt/wayland/VulkanGCCompatibilityTest.java JBR-8394 linux-5.18.2-arch1-1
jb/java/awt/wayland/VulkanMaskFillTest.java JBR-8394 linux-5.18.2-arch1-1
jb/java/io/IoOverNio/FileTest.java JBR-8723 linux-6.15.8-100.fc41.x86_64
jb/java/io/IoOverNio/FileTest.java JBR-8723 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/text/StyledEditorKit/bug4329418.java
jb/java/jcef/HandleJSQueryTest3314.sh JBR-4866 linux-all
jb/java/jcef/HwFacadeWindowNoFrontTest.java JBR-6556 windows-all
@@ -1538,7 +1536,7 @@ java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Mixing/AWT_Mixing/JInternalFrameOverlapping.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Mixing/LWComboBox.java JBR-7595 linux-6.15.8-100.fc41.x86_64
java/awt/Mixing/LWComboBox.java JBR-7595 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Mixing/LWPopupMenu.java JBR-824 generic-all
java/awt/Mixing/OpaqueTest.java JBR-5707 linux-all
java/awt/Mixing/OverlappingButtons.java JBR-5707 linux-all
@@ -1595,7 +1593,7 @@ java/awt/Toolkit/DesktopProperties/rfe4758438.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java JBR-5765 macosx-all
javax/swing/JMenu/TestDisabledMenuForegroundColor.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-5510,JBR-9199 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-5510,JBR-9199 linux-5.18.2-arch1-1,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JSlider/TestJSliderRendering.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1

View File

@@ -8,6 +8,7 @@ java/awt/dnd/DnDAWTLockTest.java JBR-8745 linux-all
java/awt/dnd/DragOverDropTargetPerformanceTest.java JBR-5799 windows-all
java/awt/dnd/DragSourceGCrashTest.java JBR-8745 linux-all
java/awt/dnd/InterJVMGetDropSuccessTest/InterJVMGetDropSuccessTest.java JBR-8745 linux-all
java/awt/dnd/InterJVMLinkTest.java JBR-9255 linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
java/awt/Dialog/ChoiceModalDialogTest.java JBR-8724 windows-all
java/awt/dnd/MozillaDnDTest.java JBR-6442 linux-all
java/awt/event/ComponentEvent/TextComponentTextEventTest.java JBR-6287 windows-all
@@ -32,7 +33,7 @@ java/awt/Frame/WindowDragTest/WindowDragTest.java JBR-6090 windows-all
java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.java 7124275,JBR-5799 macosx-all,windows-all
java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java JBR-7299,JBR-8728 linux-all,windows-all
java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150,JBR-4880,8253184,JBR-5510,JBR-8725 macosx-all,windows-all,linux-5.18.2-arch1-1,linux-6.8.0-all
java/awt/Graphics/LineClipTest.java JBR-5071 linux-aarch64
java/awt/Graphics/LineClipTest.java JBR-9386 linux-6.16.7-100.fc41.x86_64
java/awt/Graphics/NativeWin32Clear.java JBR-8730 windows-all
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720,8322653,JBR-5071 windows-all,macosx-all,linux-all
java/awt/GridLayout/ComponentPreferredSize/ComponentPreferredSize.java 8238720,8322653,JBR-5071 windows-all,macosx-all,linux-all
@@ -50,10 +51,12 @@ java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-5510,JBR-6134 linu
java/awt/Mixing/MixingOnDialog.java JBR-6134 windows-all
java/awt/Modal/BlockedMouseInputTest2.java JBR-6090 windows-all
java/awt/Mouse/MouseEnterExitTest.java JBR-8096 linux-all,windows-all
java/awt/Mouse/TitleBarDoubleClick/TitleBarDoubleClick.java JBR-7309 linux-6.16.7-100.fc41.x86_64
java/awt/MouseInfo/ContainerResizeMousePositionTest.java JBR-7881,JBR-7915,JBR-8746 macosx-all,linux-all
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-7035,JBR-8726 windows-all,macosx-all,linux-all
java/awt/Robot/ScreenCaptureRobotTest.java#id0 JBR-8784 macosx-all
java/awt/Scrollbar/UnitIncrementTest.java JBR-8733 windows-all
java/awt/TextArea/ScrollbarIntersectionTest/ScrollbarIntersectionTest.java 8253184,JBR-9387 windows-all,linux-6.16.7-100.fc41.x86_64
java/awt/TextField/GetTextTest/GetTextTest.java JBR-8734 windows-all
java/awt/Window/AlwaysOnTop/SyncAlwaysOnTopFieldTest.java JBR-6845 linux-all
java/awt/Window/TopLevelLocation/TopLevelLocation.java JBR-5799 windows-all
@@ -67,7 +70,7 @@ javax/swing/JButton/bug4490179.java JBR-8925 windows-all
javax/swing/JFileChooser/JFileChooserSetLocationTest.java JBR-8098 linux-all,windows-all
javax/swing/JInternalFrame/4202966/IntFrameCoord.java JBR-9006 window-all
javax/swing/JMenu/bug4342646.java JBR-8727 linux-all,windows-all
javax/swing/JPopupMenu/6580930/bug6580930.java JBR-5071 linux-6.8.0-1033-aws
javax/swing/JPopupMenu/6580930/bug6580930.java JBR-5071 linux-6.8.0-1033-aws,linux-6.8.0-1036-aws,linux-6.15.8-100.fc41.x86_64,linux-6.16.7-100.fc41.x86_64
javax/swing/JTable/JTableRightOrientationTest.java JBR-8102 linux-all,windows-all
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8747 linux-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
@@ -85,7 +88,8 @@ jb/java/awt/Window/UndecoratedDialogInTransientsChain.java
jdk/editpad/EditPadTest.java JBR-5712 windows-all
sanity/client/SwingSet/src/ColorChooserDemoTest.java JBR-8354,JBR-8933 linux-all,windows-aarch64,windows-10.0
sanity/client/SwingSet/src/EditorPaneDemoTest.java JBR-5510,JBR-6285 linux-5.18.2-arch1-1,linux-all
sanity/client/SwingSet/src/EditorPaneDemoTest.java JBR-6285 generic-all
sanity/client/SwingSet/src/GridBagLayoutDemoTest.java JBR-6285 generic-all
sanity/client/SwingSet/src/InternalFrameDemoTest.java JBR-6685 linux-all
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001,JBR-6293 linux-all,windows-all
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5204 linux-all,macosx-all,windows-all
@@ -110,7 +114,7 @@ java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java nobug generic-all
java/awt/Graphics/CopyScaledArea/CopyScaledAreaTest.java nobug generic-all
java/awt/Graphics/DrawOvalTest.java nobug generic-all
java/awt/Graphics/XORPaint.java#id1 JBR-8642,nobug macosx-aarch64,windows-all
java/awt/Graphics/XORPaint.java#id2 JBR-5510,nobug linux-5.18.2-arch1-1,windows-all
java/awt/Graphics/XORPaint.java#id2 nobug generic-all
java/awt/Graphics/XORPaint.java#id3 nobug windows-all
java/awt/Graphics/XORPaint.java#id4 nobug windows-all
java/awt/Graphics/XORPaint.java#id5 nobug windows-all
@@ -134,6 +138,7 @@ java/awt/Robot/HiDPIScreenCapture/ScreenCaptureResolutionTest.java nobug generic
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java nobug generic-all
java/awt/Robot/ScreenCaptureRobotTest.java#id1 nobug generic-all
java/awt/Toolkit/ScreenInsetsDPIVariation/ScreenInsetsDPIVariation.java nobug generic-all
java/awt/TrayIcon/RightClickWhenBalloonDisplayed/RightClickWhenBalloonDisplayed.java 8238720,JBR-6931 windows-all,linux-aarch64,linux-6.16.7-100.fc41.x86_64
java/awt/Window/8159168/SetShapeTest.java nobug generic-all
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java nobug generic-all
java/awt/Window/GetScreenLocation/GetScreenLocationTest.java nobug generic-all
@@ -177,6 +182,7 @@ javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7965,JBR-8345 w
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-8345 linux-all
javax/swing/JButton/TestGlyphBreak.java nobug generic-all
javax/swing/JComboBox/6559152/bug6559152.java JBR-8964 windows-all
javax/swing/JComboBox/8033069/bug8033069NoScrollBar.java JBR-9342 windows-x64
javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java nobug generic-all
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java nobug generic-all
javax/swing/JInternalFrame/8069348/bug8069348.java nobug generic-all

View File

@@ -22,9 +22,13 @@ java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Disable.java JBR-9100 l
javax/swing/AbstractButton/bug4147740.java JBR-9100 linux-all
javax/swing/AbstractButton/bug4246045.java JBR-9100 linux-all
javax/swing/border/Test6981576.java JBR-9100 linux-all
java/awt/image/DrawImage/BlitRotateClippedArea.java JBR-9026 linux-all
java/awt/image/DrawImage/EABlitTest.java JBR-9027 linux-all
javax/swing/GraphicsConfigNotifier/StalePreferredSize.java JBR-9031 linux-all
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-8266 linux-x64
javax/swing/GroupLayout/8079640/bug8079640.java JBR-9100 linux-all
javax/swing/JButton/JButtonPaintNPE/JButtonPaintNPE.java JBR-9100 linux-all
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.14.9-arch1-1
javax/swing/JColorChooser/Test4177735.java JBR-9100 linux-all
javax/swing/JComboBox/8019180/Test8019180.java JBR-9100 linux-all
javax/swing/JComboBox/bug4276920.java JBR-9100 linux-all
@@ -39,6 +43,7 @@ javax/swing/JFileChooser/6489130/bug6489130.java JBR-9100 linux-all
javax/swing/JFileChooser/DeserializedJFileChooser/DeserializedJFileChooserTest.java JBR-9100 linux-all
javax/swing/JFileChooser/FileSizeCheck.java JBR-9100 linux-all
javax/swing/JFileChooser/FileViewNPETest.java JBR-9100 linux-all
javax/swing/JFormattedTextField/bug4741926.java JBR-9321 linux-6.14.9-arch1-1
javax/swing/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-9100 linux-all
javax/swing/JFrame/AlwaysOnTop/AlwaysOnTopImeTest.java JBR-9100 linux-all
javax/swing/JFrame/HangNonVolatileBuffer/HangNonVolatileBuffer.java JBR-9100 linux-all
@@ -48,7 +53,7 @@ javax/swing/JLayer/6824395/bug6824395.java JBR-9100 linux-all
javax/swing/JLayer/8041982/bug8041982.java JBR-9100 linux-all
javax/swing/JMenu/8178430/LabelDotTest.java JBR-9100 linux-all
javax/swing/JPanel/bug4907772.java JBR-9100 linux-all
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-9100 linux-all
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1
javax/swing/JProgressBar/8161664/ProgressBarMemoryLeakTest.java JBR-9100 linux-all
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-9100 linux-all
javax/swing/JScrollPane/bug8044371.java JBR-9100 linux-all
@@ -57,7 +62,7 @@ javax/swing/JSlider/TestJSliderRendering.java JBR-9100 linux-all
javax/swing/JSpinner/8008657/bug8008657.java JBR-9100 linux-all
javax/swing/JSpinner/bug4656590.java JBR-9100 linux-all
javax/swing/JSpinner/bug4680204.java JBR-9100 linux-all
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-9100 linux-all
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1
javax/swing/JSplitPane/4816114/bug4816114.java JBR-9100 linux-all
javax/swing/JSplitPane/JSplitPaneTestNegDivSize.java JBR-9100 linux-all
javax/swing/JTabbedPane/7170310/bug7170310.java JBR-9100 linux-all
@@ -78,6 +83,7 @@ javax/swing/JTextPane/JTextPaneDocumentWrapping.java JBR-9100 linux-all
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java JBR-9100 linux-all
javax/swing/JTree/8041705/DefaultTreeCellRendererBorderTest.java JBR-9100 linux-all
javax/swing/JViewport/7107099/bug7107099.java JBR-9100 linux-all
javax/swing/InputVerifier/VerifyTarget/VerifyTargetTest.java JBR-9320 linux-6.14.9-arch1-1
javax/swing/LookAndFeel/8145547/DemandGTK.java JBR-9100 linux-all
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-9100 linux-all
javax/swing/plaf/basic/6866751/bug6866751.java JBR-9100 linux-all

View File

@@ -1,2 +1,10 @@
javax/swing/JFileChooser/6520101/bug6520101.java JBR-8434 linux-all
javax/swing/JMenu/bug4342646.java JBR-8727 linux-all
javax/swing/JTable/JTableRightOrientationTest.java JBR-8102 linux-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8324 linux-all
jb/java/awt/wayland/vulkan/ImageTransformTest.java JBR-8434 linux-all
jb/java/awt/wayland/vulkan/RobotGetPixelsTest.java JBR-8434 linux-all
jb/java/awt/wayland/vulkan/RobotGetPixelTest.java JBR-8434 linux-all
jb/java/awt/wayland/vulkan/VulkanMaskFillTest.java JBR-8434 linux-all

View File

@@ -3,28 +3,24 @@ java/awt/MenuShortcut/FunctionKeyShortcut.java JBR-7932 linux-all
java/awt/Multiscreen/MultiScreenCheckScreenIDTest.java JBR-8263 linux-x64
java/awt/Multiscreen/UpdateGCTest/UpdateGCTest.java JBR-8264 linux-x64
javax/swing/AbstractDocument/bug4549069.java JBR-8267 linux-6.14.0-1010-aws
javax/swing/JComponent/6989617/bug6989617.java JBR-8796 linux-6.14.0-1010-aws
javax/swing/JComponent/6989617/bug6989617.java JBR-8796 linux-6.14.0-1010-aws,linux-6.14.0-1012-aws
javax/swing/JDesktopPane/TestDesktopManagerNPE.java JBR-8449 linux-x64
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-8266 linux-x64
javax/swing/InputVerifier/VerifyTarget/VerifyTargetTest.java JBR-7520 linux-all
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-8265 linux-all
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id2 JBR-8265 linux-all
javax/swing/JEditorPane/bug4325606.java JBR-8267 linux-aarch64
javax/swing/InputVerifier/VerifyTarget/VerifyTargetTest.java JBR-7520,JBR-9320 linux-6.8.0-1036-aws,linux-6.14.9-arch1-1
javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id0 JBR-7928,JBR-9341 linux-6.8.0-1036-aws,linux-6.14.9-arch1-1
javax/swing/JEditorPane/JEditorPaneFontFallback.java JBR-8305 linux-all
javax/swing/JFormattedTextField/bug4741926.java JBR-7530 linux-all
javax/swing/JFormattedTextField/bug4741926.java JBR-7530,JBR-9321 linux-all,linux-6.14.9-arch1-1
javax/swing/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-8790 linux-all
javax/swing/JInternalFrame/bug5009724.java JBR-7087 linux-all
javax/swing/JMenu/JMenuSelectedColorTest.java JBR-8551 linux-all
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1
javax/swing/JPopupMenu/7156657/bug7156657.java JBR-8210 linux-all
javax/swing/JRadioButton/bug4823809.java JBR-7774 linux-all
javax/swing/JSlider/TestJSliderRendering.java JBR-8551 linux-all
javax/swing/JTabbedPane/6495408/bug6495408.java JBR-8267 linux-aarch64
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-9277 linux-6.14.9-arch1-1
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-8551 linux-all
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-8274 linux-all
javax/swing/text/html/CSS/bug8234913.java JBR-8306 linux-all
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8324 linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-8304 linux-all
jb/java/awt/wayland/VulkanMaskFillTest.java JBR-8446 linux-6.8.0-1017-raspi
jb/javax/swing/Popup/WLPopupMoves.java JBR-8296 linux-all
jb/javax/swing/wayland/WLPopupMoves.java JBR-8296 linux-all

View File

@@ -1,2 +1,5 @@
javax/swing/JFileChooser/6520101/bug6520101.java JBR-7140 linux-all
javax/swing/JMenu/bug4342646.java JBR-8727 linux-all
javax/swing/JTable/JTableRightOrientationTest.java JBR-8102 linux-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-8357 linux-all
javax/swing/text/ParagraphView/6364882/bug6364882.java JBR-8324 linux-all