Compare commits

..

17 Commits

Author SHA1 Message Date
Nikita Gubarkov
02d36310f5 Lower Spir-V target version to match Vulkan 1.2 2023-09-06 15:19:44 +02:00
Nikita Gubarkov
afdfd15c92 Make dynamic rendering optional. 2023-09-06 15:19:44 +02:00
Nikita Gubarkov
bd7e216e4f Lower Vulkan version to 1.2 and use dynamic rendering extension. 2023-09-06 15:19:44 +02:00
Nikita Gubarkov
5ac65d371f Make synchronization2 optional. 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
001e63aa13 Separate method for attaching native surface data to Java object. 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
86bb3a5441 Memory management via VMA, vertex buffer pool, shader push constants. 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
85811e97dd Enable logicOp feature for XOR painting mode. 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
4618419f78 Shader compilation, test pipeline.
Shaders are compiled with glslc or glslangValidator and bytecode is inlined directly into libawt_wlawt
2023-09-06 15:19:43 +02:00
Nikita Gubarkov
634910f86c Split command recording into primary and secondary command buffers.
This allows us to record commands "in the past", before current render pass started, which gives possibility for some heavy optimizations:
1. When we suddenly need some texture in the middle of the render pass - no need to stop render pass in order to insert necessary synchronization - we can do it as if we knew it beforehand.
2. When we draw something and then clear the surface - just erase all commands inside current render pass we recorded earlier, so the actual drawing will never happen.
2023-09-06 15:19:43 +02:00
Nikita Gubarkov
544a6771c6 Each device has a single timeline semaphore (basically 64-bit counter), monotonically increasing as device executes our commands, allowing us to track the state of the submitted batches and reuse resources which are no longer in use. 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
a554ca9888 State management, synchronization & layout transition.
Now using dynamic render passes and synchronization2 from Vulkan 1.3
2023-09-06 15:19:43 +02:00
Nikita Gubarkov
71224a9c95 Refactored native surface data hierarchy.
There was a C-style "inheritance" model with VKSDOps having an SurfaceDataOps as its first member and conversions back and forth between them. And then also privOps - pointer to the platform-specific part (WLVK).

This was refactored into plain inheritance:
SurfaceDataOps -> VKSurfaceData -> VKSwapchainSurfaceData -> WLVKSurfaceData

Also replaced pthread mutexes with std::recursive_mutex to move this abstraction up the hierarchy.
2023-09-06 15:19:43 +02:00
Nikita Gubarkov
dc03522baa Moved platform-independent part of WLVKSurfaceData into VKSwapchainSurfaceData 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
57d46f4f82 Make debug messenger part of graphics configuration 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
0e7602d8e1 Report which device was created 2023-09-06 15:19:43 +02:00
Nikita Gubarkov
ebba8f1aba Fixed validation errors (only). Added basic synchronization.
Merged physical and logical device into single entity.
Other refactoring.
2023-09-06 15:19:42 +02:00
Nikita Gubarkov
aa1d84f9e1 Get rid of maxTextureSize in Vulkan code.
This concept was introduced to fix macOS-specific bugs and don't map well to Vulkan implementation, as this value is tied to specific device and texture format, so get rid of it for now and see whether we need it at all.
2023-09-06 15:19:42 +02:00
47 changed files with 301 additions and 2467 deletions

View File

@@ -8,36 +8,15 @@
FROM arm64v8/alpine:3.12
# Install the necessary build tools
RUN apk --no-cache add --update \
alsa-lib-dev=1.2.2-r0 \
autoconf=2.69-r2 \
bash=5.0.17-r0 \
build-base=0.5-r2 \
bzip2=1.0.8-r1 \
cups-dev=2.3.3-r0 \
file=5.38-r0 \
fontconfig=2.13.1-r2 \
fontconfig-dev=2.13.1-r2 \
freetype-dev=2.10.4-r2 \
git=2.26.3-r1 \
grep=3.4-r0 \
libx11-dev=1.6.12-r1 \
libxext-dev=1.3.4-r0 \
libxrandr-dev=1.5.2-r0 \
libxrender-dev=0.9.10-r3 \
libxt-dev=1.2.0-r0 \
libxtst-dev=1.2.3-r3 \
linux-headers=5.4.5-r1 \
rsync=3.1.3-r3 \
tar=1.32-r2 \
wayland-dev=1.18.0-r4 \
zip=3.0-r8
RUN apk --no-cache add --update bash grep tar zip bzip2 rsync fontconfig build-base \
git libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev \
libxtst-dev autoconf freetype-dev cups-dev alsa-lib-dev file \
fontconfig fontconfig-dev linux-headers
# Set up boot JDK for building
COPY boot_jdk_musl_aarch64.tar.gz /jdk20/
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk20/boot_jdk_musl_aarch64.tar.gz
ENV BOOT_JDK=/jdk20
COPY boot_jdk_musl_aarch64.tar.gz /jdk17/
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk17/boot_jdk_musl_aarch64.tar.gz
ENV BOOT_JDK=/jdk17
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser"

View File

@@ -8,35 +8,15 @@
FROM alpine:3.14
# Install the necessary build tools
RUN apk --no-cache add --update \
alsa-lib-dev=1.2.5-r2 \
autoconf=2.71-r0 \
bash=5.1.16-r0 \
build-base=0.5-r3 \
bzip2=1.0.8-r1 \
cups-dev=2.3.3-r3 \
file=5.40-r1 \
fontconfig=2.13.1-r4 \
fontconfig-dev=2.13.1-r4 \
freetype-dev=2.10.4-r3 \
git=2.32.7-r0 \
grep=3.7-r0 \
libx11-dev=1.7.3.1-r0 \
libxext-dev=1.3.4-r0 \
libxrandr-dev=1.5.2-r1 \
libxrender-dev=0.9.10-r3 \
libxt-dev=1.2.1-r0 \
libxtst-dev=1.2.3-r3 \
linux-headers=5.10.41-r0 \
rsync=3.2.5-r0 \
tar=1.34-r1 \
wayland-dev=1.19.0-r0 \
zip=3.0-r9
RUN apk --no-cache add --update bash grep tar zip bzip2 rsync fontconfig build-base \
git libx11-dev libxext-dev libxrandr-dev libxrender-dev libxt-dev \
libxtst-dev autoconf freetype-dev cups-dev alsa-lib-dev file \
fontconfig fontconfig-dev linux-headers
# Set up boot JDK for building
COPY boot_jdk_musl_amd64.tar.gz /jdk20/
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk20/boot_jdk_musl_amd64.tar.gz
ENV BOOT_JDK=/jdk20
COPY boot_jdk_musl_amd64.tar.gz /jdk17/
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk17/boot_jdk_musl_amd64.tar.gz
ENV BOOT_JDK=/jdk17
RUN git config --global user.email "teamcity@jetbrains.com" && \
git config --global user.name "builduser"

View File

@@ -25,8 +25,7 @@ RUN yum -y install centos-release-scl; \
wayland-devel-1.15.0-1.el7 \
wget-1.14-18.el7_6.1 \
which-2.20-7.el7 \
zip-3.0-11.el7 \
python3-3.6.8-17.el7
zip-3.0-11.el7
RUN mkdir .git && \
git config user.email "teamcity@jetbrains.com" && \
@@ -34,24 +33,4 @@ RUN mkdir .git && \
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin::${PATH}"
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
# Build GLSLC
RUN curl -OL https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5-linux-x86_64.tar.gz \
&& echo 138c68addae825b16ed78d792dafef5e0960194833f48bd77e7e0429c6bc081c *cmake-3.27.5-linux-x86_64.tar.gz | sha256sum -c - \
&& tar -xzf cmake-3.27.5-linux-x86_64.tar.gz \
&& rm cmake-3.27.5-linux-x86_64.tar.gz \
&& git clone https://github.com/google/shaderc --branch v2023.6 \
&& cd shaderc \
&& ./utils/git-sync-deps \
&& mkdir build \
&& cd build \
&& /cmake-3.27.5-linux-x86_64/bin/cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DSHADERC_SKIP_TESTS=ON \
-DSHADERC_SKIP_EXAMPLES=ON \
-DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
.. \
&& make install
ENV PATH="/cmake-3.27.5-linux-x86_64/bin::${PATH}"
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"

View File

@@ -4,10 +4,10 @@ set -euo pipefail
set -x
# This script creates a Docker image suitable for building musl AArch64 variant
# of the JetBrains Runtime version 21.
# of the JetBrains Runtime version 17.
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_aarch64.tar.gz
BOOT_JDK_SHA=eec57cf744c2438f695221f041d4804de3033ad33b6dba769d3359813ba3f90d
BOOT_JDK_REMOTE_FILE=zulu17.32.13-ca-jdk17.0.2-linux_musl_aarch64.tar.gz
BOOT_JDK_SHA=6b920559abafbe9bdef386a20ecf3a2f318bc1f0d8359eb1f95aee26606bbc70
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_aarch64.tar.gz
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
@@ -22,7 +22,7 @@ sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build -t jetbrains/runtime:jbr21env_musl_aarch64 -f Dockerfile.musl_aarch64 .
docker build -t jbr17buildenv -f Dockerfile.musl_aarch64 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance

View File

@@ -4,10 +4,10 @@ set -euo pipefail
set -x
# This script creates a Docker image suitable for building musl-x64 variant
# of the JetBrains Runtime version 21.
# of the JetBrains Runtime version 17.
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_x64.tar.gz
BOOT_JDK_SHA=fca5081dd6da847fcd06f5b755e58edae22d6784f21b81bf73da2b538f842c07
BOOT_JDK_REMOTE_FILE=zulu17.32.13-ca-jdk17.0.2-linux_musl_x64.tar.gz
BOOT_JDK_SHA=bcc5342011bd9f3643372aadbdfa68d47463ff0d8621668a0bdf2910614d95c6
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_amd64.tar.gz
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
@@ -22,7 +22,7 @@ sha256sum -c - <<EOF
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
EOF
docker build -t jetbrains/runtime:jbr21env_musl_x64 -f Dockerfile.musl_x64 .
docker build -t jbr17buildenv -f Dockerfile.musl_x64 .
# NB: the resulting container can (and should) be used without the network
# connection (--network none) during build in order to reduce the chance

View File

@@ -25,13 +25,9 @@
package com.jetbrains.internal;
import sun.security.action.GetBooleanAction;
import java.io.Serial;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -101,8 +97,7 @@ import static java.lang.invoke.MethodHandles.Lookup;
* user to directly create proxy object.
*/
public class JBRApi {
@SuppressWarnings("removal")
static final boolean VERBOSE = AccessController.doPrivileged(new GetBooleanAction("jetbrains.api.verbose"));
static final boolean VERBOSE = Boolean.getBoolean("jetbrains.api.verbose");
private static final Map<String, RegisteredProxyInfo> registeredProxyInfoByInterfaceName = new HashMap<>();
private static final Map<String, RegisteredProxyInfo> registeredProxyInfoByTargetName = new HashMap<>();
@@ -210,22 +205,19 @@ public class JBRApi {
return this;
}
@SuppressWarnings("removal")
public Object build() {
return AccessController.doPrivileged((PrivilegedAction<Object>) () -> {
ProxyInfo info = ProxyInfo.resolve(this.info);
if (info == null) return null;
ProxyGenerator generator = new ProxyGenerator(info);
if (!generator.areAllMethodsImplemented()) return null;
generator.defineClasses();
MethodHandle constructor = generator.findConstructor();
generator.init();
try {
return constructor.invoke();
} catch (Throwable e) {
throw new RuntimeException(e);
}
});
ProxyInfo info = ProxyInfo.resolve(this.info);
if (info == null) return null;
ProxyGenerator generator = new ProxyGenerator(info);
if (!generator.areAllMethodsImplemented()) return null;
generator.defineClasses();
MethodHandle constructor = generator.findConstructor();
generator.init();
try {
return constructor.invoke();
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -190,10 +190,6 @@ public final class LWCToolkit extends LWToolkit {
return getKeyboardLayoutList(false).contains(layoutName);
}
public static boolean isKeyboardLayoutInstalled(String layoutName) {
return getKeyboardLayoutList(true).contains(layoutName);
}
// Listens to EDT state in invokeAndWait() and disposes the invocation event
// when EDT becomes free but the invocation event is not yet dispatched (considered lost).
// This prevents a deadlock and makes the invocation return some default result.

View File

@@ -35,7 +35,6 @@
#import "JNIUtilities.h"
#import "jni_util.h"
#import "PropertiesUtilities.h"
#import "sun_lwawt_macosx_CPlatformWindow.h"
#import <Carbon/Carbon.h>
@@ -851,7 +850,7 @@ static void debugPrintNSEvent(NSEvent* event, const char* comment) {
- (BOOL)replaceAccessibleTextSelection:(NSString *)text
{
id focused = [self accessibilityFocusedUIElement];
if (![focused respondsToSelector:@selector(setAccessibilitySelectedText:)]) return NO;
if (![focused respondsToSelector:@selector(setAccessibilitySelectedText)]) return NO;
[focused setAccessibilitySelectedText:text];
return YES;
}
@@ -1097,43 +1096,6 @@ static jclass jc_CInputMethod = NULL;
#define GET_CIM_CLASS_RETURN(ret) \
GET_CLASS_RETURN(jc_CInputMethod, "sun/lwawt/macosx/CInputMethod", ret);
- (NSInteger) windowLevel
{
#ifdef IM_DEBUG
fprintf(stderr, "AWTView InputMethod Selector Called : [windowLevel]\n");
#endif // IM_DEBUG
NSWindow* const ownerWindow = [self window];
if (ownerWindow == nil) {
return NSNormalWindowLevel;
}
const NSWindowLevel ownerWindowLevel = [ownerWindow level];
if ( (ownerWindowLevel != NSNormalWindowLevel) && (ownerWindowLevel != NSFloatingWindowLevel) ) {
// the window level has been overridden, let's believe it
return ownerWindowLevel;
}
AWTWindow* const delegate = (AWTWindow*)[ownerWindow delegate];
if (delegate == nil) {
return ownerWindowLevel;
}
const jint styleBits = [delegate styleBits];
const BOOL isPopup = ( (styleBits & sun_lwawt_macosx_CPlatformWindow_IS_POPUP) != 0 );
if (isPopup) {
return NSPopUpMenuWindowLevel;
}
const BOOL isModal = ( (styleBits & sun_lwawt_macosx_CPlatformWindow_IS_MODAL) != 0 );
if (isModal) {
return NSFloatingWindowLevel;
}
return ownerWindowLevel;
}
- (void) insertText:(id)aString replacementRange:(NSRange)replacementRange
{
#ifdef IM_DEBUG

View File

@@ -36,14 +36,9 @@ import java.util.stream.Collectors;
public class FontExtensions {
private interface FontExtension {
FontExtension INSTANCE = (FontExtension) JBRApi.internalServiceBuilder(MethodHandles.lookup())
.withStatic("getFeatures", "getFeatures", "java.awt.Font")
.withStatic("isComplexRendering", "isComplexRendering", "java.awt.Font")
.withStatic("isKerning", "isKerning", "java.awt.Font")
.build();
.withStatic("getFeatures", "getFeatures", "java.awt.Font").build();
TreeMap<String, Integer> getFeatures(Font font);
boolean isComplexRendering(Font font);
boolean isKerning(Font font);
}
public static String[] featuresToStringArray(Map<String, Integer> features) {
@@ -54,12 +49,4 @@ public class FontExtensions {
public static TreeMap<String, Integer> getFeatures(Font font) {
return FontExtension.INSTANCE.getFeatures(font);
}
public static boolean isComplexRendering(Font font) {
return FontExtension.INSTANCE.isComplexRendering(font);
}
public static boolean isKerning(Font font) {
return FontExtension.INSTANCE.isKerning(font);
}
}

View File

@@ -2719,17 +2719,29 @@ public class Font implements java.io.Serializable
(limit - beginIndex));
}
FontDesignMetrics metrics = FontDesignMetrics.getMetrics(this, frc);
return metrics.charsBounds(chars, beginIndex, limit - beginIndex);
}
// this code should be in textlayout
// quick check for simple text, assume GV ok to use if simple
private static boolean isComplexRendering(Font font) {
return (font.values != null && (font.values.getLigatures() != 0 || font.values.getTracking() != 0 ||
font.values.getBaselineTransform() != null)) || font.anyEnabledFeatures();
}
boolean simple = (values == null ||
(values.getKerning() == 0
&& values.getLigatures() == 0
&& values.getTracking() == 0
&& values.getBaselineTransform() == null)) && !anyEnabledFeatures();
if (simple) {
simple = ! FontUtilities.isComplexText(chars, beginIndex, limit);
}
private static boolean isKerning(Font font) {
return font.values != null && (font.values.getKerning() != 0);
if (simple || ((limit - beginIndex) == 0)) {
FontDesignMetrics metrics = FontDesignMetrics.getMetrics(this, frc);
return metrics.getSimpleBounds(chars, beginIndex, limit-beginIndex);
} else {
// need char array constructor on textlayout
String str = new String(chars, beginIndex, limit - beginIndex);
TextLayout tl = new TextLayout(str, this, frc);
return new Rectangle2D.Float(0, -tl.getAscent(), tl.getAdvance(),
tl.getAscent() + tl.getDescent() +
tl.getLeading());
}
}
/**

View File

@@ -38,11 +38,8 @@ import java.io.ObjectOutputStream;
import java.io.Serial;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.jetbrains.desktop.FontExtensions;
import sun.java2d.Disposer;
import sun.java2d.DisposerRecord;
@@ -435,13 +432,16 @@ public final class FontDesignMetrics extends FontMetrics {
return frc;
}
private float preciseCharWidth(char ch) {
// default metrics for compatibility with legacy code
return (ch < 0x100) ? getLatinCharWidth(ch) : handleCharWidth(ch);
}
public int charWidth(char ch) {
return Math.round(preciseCharWidth(ch));
// default metrics for compatibility with legacy code
float w;
if (ch < 0x100) {
w = getLatinCharWidth(ch);
}
else {
w = handleCharWidth(ch);
}
return (int)(0.5 + w);
}
public int charWidth(int ch) {
@@ -451,111 +451,93 @@ public final class FontDesignMetrics extends FontMetrics {
float w = handleCharWidth(ch);
return Math.round(w);
}
private Rectangle2D.Float textLayoutBounds(Object data, int off, int len) {
String str = data instanceof String ? ((String) data).substring(off, off + len) :
new String((char[]) data, off, len);
TextLayout tl = new TextLayout(str, font, frc);
return new Rectangle2D.Float(0, -tl.getAscent(),
tl.getAdvance(), tl.getAscent() + tl.getDescent() + tl.getLeading());
}
private char getChar(Object data, int i) {
return data instanceof String ? ((String) data).charAt(i) : ((char[]) data)[i];
}
final int ADVANCES_FAST_KEY_LIMIT = 0x100;
private HashMap<Integer, Float> advances = new HashMap<>();
private float[] advancesFast = new float[ADVANCES_FAST_KEY_LIMIT * ADVANCES_FAST_KEY_LIMIT];
private Rectangle2D.Float dataBounds(Object data, int off, int len) {
assert (data instanceof String || data instanceof char[]);
float width = 0;
if (FontExtensions.isComplexRendering(font) && len > 0) {
return textLayoutBounds(data, off, len);
}
float height = ascent + descent + leading;
if (len == 0 || len == 1 && !FontUtilities.isNonSimpleChar(getChar(data, off))) {
width = len > 0 ? preciseCharWidth(getChar(data, off)) : 0f;
return new Rectangle2D.Float(0f, -ascent, width, height);
}
boolean isKerning = FontExtensions.isKerning(font);
float consecutiveDoubleCharacterWidth = 0f;
char prev = 0;
for (int i = off; i < off + len; i++) {
char cur = getChar(data, i);
if (FontUtilities.isNonSimpleChar(cur)) {
return textLayoutBounds(data, off, len);
} else {
// Correct width of string with kerning calculates by text LayoutBounds but it could be slow.
// Below is description of optimized algorithm for correct calculating width of text with kerning:
// proof:
// base: kerningWidth('c1') = plainWidth('c1')
// induction: kerningWidth('c1..cN-1cN') =
// kerningWidth('c1..cN-1') + kerningWidth('cN-1cN') - plainWidth('cN-1')
// final: kerningWidth('c1..cN') = kerningWidth('c1c2') + ... + kerningWidth('cN-1cN')
// - (plainWidth('c2') + ... + plainWidth('cN-1'))
// remark: for reducing calculation of kerningWidth('c1c2') using caching
if (isKerning && i > off) {
// fast path
if (prev < ADVANCES_FAST_KEY_LIMIT && cur < ADVANCES_FAST_KEY_LIMIT) {
int key = (prev << 8) | cur;
if (advancesFast[key] == 0.0f) {
advancesFast[key] = textLayoutBounds(data, i - 1, 2).width;
}
consecutiveDoubleCharacterWidth += advancesFast[key];
// common solution
} else {
int key = (prev << 16) | (0xffff & cur);
advances.putIfAbsent(key, textLayoutBounds(data, i - 1, 2).width);
consecutiveDoubleCharacterWidth += advances.get(key);
}
}
width += preciseCharWidth(cur);
}
prev = cur;
}
if (isKerning) {
width = consecutiveDoubleCharacterWidth -
(width - preciseCharWidth(getChar(data, off)) - preciseCharWidth(getChar(data, off + len - 1)));
}
return new Rectangle2D.Float(0f, -ascent, width, height);
}
public Rectangle2D.Float charsBounds(char[] data, int off, int len) {
return dataBounds(data, off, len);
}
private int dataWidth(Object data, int off, int len) {
return Math.round((float) dataBounds(data, off, len).getWidth());
return (int)(0.5 + w);
}
public int stringWidth(String str) {
if (str == null) {
throw new NullPointerException("str is null");
float width = 0;
if (font.hasLayoutAttributes()) {
/* TextLayout throws IAE for null, so throw NPE explicitly */
if (str == null) {
throw new NullPointerException("str is null");
}
if (str.length() == 0) {
return 0;
}
width = new TextLayout(str, font, frc).getAdvance();
} else {
int length = str.length();
for (int i=0; i < length; i++) {
char ch = str.charAt(i);
if (ch < 0x100) {
width += getLatinCharWidth(ch);
} else if (FontUtilities.isNonSimpleChar(ch)) {
width = new TextLayout(str, font, frc).getAdvance();
break;
} else {
width += handleCharWidth(ch);
}
}
}
return dataWidth(str, 0, str.length());
return (int) (0.5 + width);
}
public int charsWidth(char[] data, int off, int len) {
/* Explicit test needed to satisfy superclass spec */
if (len < 0) {
throw new IndexOutOfBoundsException("len="+len);
float width = 0;
if (font.hasLayoutAttributes()) {
if (len == 0) {
return 0;
}
String str = new String(data, off, len);
width = new TextLayout(str, font, frc).getAdvance();
} else {
/* Explicit test needed to satisfy superclass spec */
if (len < 0) {
throw new IndexOutOfBoundsException("len="+len);
}
int limit = off + len;
for (int i=off; i < limit; i++) {
char ch = data[i];
if (ch < 0x100) {
width += getLatinCharWidth(ch);
} else if (FontUtilities.isNonSimpleChar(ch)) {
String str = new String(data, off, len);
width = new TextLayout(str, font, frc).getAdvance();
break;
} else {
width += handleCharWidth(ch);
}
}
}
return dataWidth(data, off, len);
return (int) (0.5 + width);
}
/**
* This method is called from java.awt.Font only after verifying
* the arguments and that the text is simple and there are no
* layout attributes, font transform etc.
*/
public Rectangle2D getSimpleBounds(char[] data, int off, int len) {
float width = 0;
int limit = off + len;
for (int i=off; i < limit; i++) {
char ch = data[i];
if (ch < 0x100) {
width += getLatinCharWidth(ch);
} else {
width += handleCharWidth(ch);
}
}
float height = ascent + descent + leading;
return new Rectangle2D.Float(0f, -ascent, width, height);
}
/**
* Gets the advance widths of the first 256 characters in the
* {@code Font}. The advance is the
@@ -575,7 +557,7 @@ public final class FontDesignMetrics extends FontMetrics {
if (w == UNKNOWN_WIDTH) {
w = advCache[ch] = handleCharWidth(ch);
}
widths[ch] = Math.round(w);
widths[ch] = (int) (0.5 + w);
}
return widths;
}

View File

@@ -34,8 +34,6 @@
#define VALIDATION_LAYER_NAME "VK_LAYER_KHRONOS_validation"
static const uint32_t REQUIRED_VULKAN_VERSION = VK_MAKE_API_VERSION(0, 1, 2, 0);
bool VKGraphicsEnvironment::_verbose = false;
int VKGraphicsEnvironment::_requested_device_number = -1;
std::unique_ptr<VKGraphicsEnvironment> VKGraphicsEnvironment::_ge_instance = nullptr;
// ========== Graphics environment ==========
@@ -189,33 +187,11 @@ VKGraphicsEnvironment::VKGraphicsEnvironment() :
throw std::runtime_error("Vulkan: No suitable device found");
}
// Create virtual device for a physical device.
// TODO system property for manual choice of GPU
// TODO integrated/discrete presets
// TODO performance/power saving mode switch on the fly?
int _default_device_number = 0; // TODO pick first just to check that virtual device creation works
if (_verbose) {
fprintf(stderr, "Vulkan graphics devices:\n");
}
_requested_device_number = (_requested_device_number == -1) ? 0 : _requested_device_number;
if (_requested_device_number < 0 || _requested_device_number >= static_cast<int>(_devices.size())) {
if (_verbose) {
fprintf(stderr, " Requested device number (%d) not found, fallback to 0\n", _requested_device_number);
}
_requested_device_number = 0;
}
_default_device_number = _requested_device_number;
if (_verbose) {
for (auto devIter = _devices.begin(); devIter != _devices.end(); devIter++) {
auto devNum = std::distance(begin(_devices), devIter);
fprintf(stderr, " %c%ld: %s\n", devNum == _default_device_number ? '*' : ' ',
devNum, (*devIter)->name().c_str());
}
fprintf(stderr, "\n");
}
_default_device = &*_devices[_default_device_number]; // TODO pick first just to check hat virtual device creation works
_default_device = &*_devices[0]; // TODO pick first just to check hat virtual device creation works
_default_device->init();
}
vk::raii::Instance& VKGraphicsEnvironment::vk_instance() {
@@ -438,9 +414,8 @@ void VKDevice::submitCommandBuffer(vk::raii::CommandBuffer&& primary,
waitStages.clear();
}
extern "C" jboolean VK_Init(jboolean verbose, jint requestedDevice) {
VKGraphicsEnvironment::set_verbose(verbose);
VKGraphicsEnvironment::set_requested_device(requestedDevice);
extern "C" jboolean VK_Init() {
if (VKGraphicsEnvironment::graphics_environment() != nullptr) {
return true;
}

View File

@@ -126,10 +126,6 @@ public:
explicit operator bool() const { // Initialized or not
return *((const vk::raii::Device&) *this);
}
const std::string& name() {
return _name;
}
};
class VKGraphicsEnvironment {
@@ -140,13 +136,9 @@ class VKGraphicsEnvironment {
#endif
std::vector<std::unique_ptr<VKDevice>> _devices;
VKDevice* _default_device;
static bool _verbose;
static int _requested_device_number;
static std::unique_ptr<VKGraphicsEnvironment> _ge_instance;
VKGraphicsEnvironment();
public:
static void set_verbose(bool verbose) { _verbose = verbose; }
static void set_requested_device(int requested_device) { _requested_device_number = requested_device; }
static VKGraphicsEnvironment* graphics_environment();
static void dispose();
VKDevice& default_device();
@@ -156,7 +148,7 @@ public:
extern "C" {
#endif //__cplusplus
jboolean VK_Init(jboolean verbose, jint requestedDevice);
jboolean VK_Init();
#ifdef __cplusplus
}

View File

@@ -28,7 +28,7 @@
#ifndef VULKAN_ENABLED
#include "jni.h"
jboolean VK_Init(jboolean verbose, jint requestedDevice) {
jboolean VK_Init() {
return 0;
}

View File

@@ -147,12 +147,15 @@ public class WLComponentPeer implements ComponentPeer {
}
public void postPaintEvent(int x, int y, int w, int h) {
if (isVisible()) {
PaintEvent event = PaintEventDispatcher.getPaintEventDispatcher().
createPaintEvent(target, x, y, w, h);
if (event != null) {
WLToolkit.postEvent(event);
}
if (!hasSurface()) {
log.warning("WLComponentPeer: No surface. Skipping paint request x=" + x + " y=" + y +
" width=" + w + " height=" + h);
return;
}
PaintEvent event = PaintEventDispatcher.getPaintEventDispatcher().
createPaintEvent(target, x, y, w, h);
if (event != null) {
WLToolkit.postEvent(event);
}
}
@@ -165,7 +168,7 @@ public class WLComponentPeer implements ComponentPeer {
}
boolean isVisible() {
return visible && hasSurface();
return visible;
}
boolean hasSurface() {
@@ -229,14 +232,13 @@ public class WLComponentPeer implements ComponentPeer {
protected void wlSetVisible(boolean v) {
this.visible = v;
if (v) {
if (this.visible) {
final String title = getTitle();
final boolean isWlPopup = targetIsWlPopup();
final boolean isPopup = target instanceof Window window && window.getType() == Window.Type.POPUP;
final int thisWidth = getWidth();
final int thisHeight = getHeight();
final boolean isModal = targetIsModal();
performLocked(() -> {
if (isWlPopup) {
if (isPopup) {
Window popup = (Window) target;
final Component popupParent = AWTAccessor.getWindowAccessor().getPopupParent(popup);
final int parentWidth = popupParent.getWidth();
@@ -260,10 +262,7 @@ public class WLComponentPeer implements ComponentPeer {
offsetX, offsetY);
} else {
nativeCreateWLSurface(nativePtr,
getParentNativePtr(target),
target.getX(), target.getY(),
isModal,
title, appID);
getParentNativePtr(target), target.getX(), target.getY(), title, appID);
}
final long wlSurfacePtr = getWLSurface(nativePtr);
WLToolkit.registerWLSurface(wlSurfacePtr, this);
@@ -282,22 +281,6 @@ public class WLComponentPeer implements ComponentPeer {
}
}
/**
* Returns true if our target should be treated as a popup in Wayland's sense,
* i.e. it has to have a parent to position relative to.
*/
private boolean targetIsWlPopup() {
return target instanceof Window window
&& window.getType() == Window.Type.POPUP
&& AWTAccessor.getWindowAccessor().getPopupParent(window) != null;
}
private boolean targetIsModal() {
return target instanceof Dialog dialog
&& (dialog.getModalityType() == Dialog.ModalityType.APPLICATION_MODAL
|| dialog.getModalityType() == Dialog.ModalityType.TOOLKIT_MODAL);
}
void configureWLSurface() {
synchronized (sizeLock) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
@@ -380,7 +363,7 @@ public class WLComponentPeer implements ComponentPeer {
public void setBounds(int x, int y, int width, int height, int op) {
final boolean positionChanged = this.x != x || this.y != y;
if (positionChanged && isVisible()) {
if (positionChanged) {
performLocked(() -> WLRobotPeer.setLocationOfWLSurface(getWLSurface(nativePtr), x, y));
}
this.x = x;
@@ -390,25 +373,23 @@ public class WLComponentPeer implements ComponentPeer {
WLToolkit.postEvent(new ComponentEvent(getTarget(), ComponentEvent.COMPONENT_MOVED));
}
Rectangle oldBounds = getVisibleBounds();
final boolean sizeChanged = oldBounds.width != width || oldBounds.height != height;
if (sizeChanged) {
synchronized (sizeLock) {
synchronized(sizeLock) {
final boolean sizeChanged = this.width != width || this.height != height;
if (sizeChanged) {
this.width = width;
this.height = height;
}
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(String.format("%s is resizing its buffer to %dx%d with %dx scale", this, getBufferWidth(), getBufferHeight(), getBufferScale()));
}
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
getBufferWidth(), getBufferHeight(), getBufferScale());
updateWindowGeometry();
layout();
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(String.format("%s is resizing its buffer to %dx%d with %dx scale", this, getBufferWidth(), getBufferHeight(), getBufferScale()));
}
SurfaceData.convertTo(WLSurfaceDataExt.class, surfaceData).revalidate(
getBufferWidth(), getBufferHeight(), getBufferScale());
updateWindowGeometry();
layout();
WLToolkit.postEvent(new ComponentEvent(getTarget(), ComponentEvent.COMPONENT_RESIZED));
WLToolkit.postEvent(new ComponentEvent(getTarget(), ComponentEvent.COMPONENT_RESIZED));
}
postPaintEvent();
}
postPaintEvent();
}
public Rectangle getVisibleBounds() {
@@ -661,12 +642,6 @@ public class WLComponentPeer implements ComponentPeer {
@Override
public void dispose() {
SurfaceData oldData = surfaceData;
surfaceData = null;
if (oldData != null) {
oldData.invalidate();
}
WLToolkit.targetDisposedPeer(target, this);
performLocked(() -> {
assert(!isVisible());
nativeDisposeFrame(nativePtr);
@@ -844,16 +819,12 @@ public class WLComponentPeer implements ComponentPeer {
performLocked(() -> nativeRequestUnsetFullScreen(nativePtr));
}
final void activate() {
performLocked(() -> nativeActivate(nativePtr));
}
private static native void initIDs();
protected native long nativeCreateFrame();
protected native void nativeCreateWLSurface(long ptr, long parentPtr,
int x, int y, boolean isModal,
int x, int y,
String title, String appID);
protected native void nativeCreateWLPopup(long ptr, long parentPtr,
@@ -882,7 +853,6 @@ public class WLComponentPeer implements ComponentPeer {
private static native void nativeSetCursor(long pData);
private static native long nativeGetPredefinedCursor(String name);
private native void nativeShowWindowMenu(long ptr, int x, int y);
private native void nativeActivate(long ptr);
static long getParentNativePtr(Component target) {
Component parent = target.getParent();
@@ -1032,11 +1002,11 @@ public class WLComponentPeer implements ComponentPeer {
log.fine(String.format("%s configured to %dx%d", this, newWidth, newHeight));
}
boolean isWlPopup = targetIsWlPopup();
final boolean isPopup = target instanceof Window window && window.getType() == Window.Type.POPUP;
if (newWidth != 0 && newHeight != 0) performUnlocked(() ->target.setSize(newWidth, newHeight));
if (newWidth == 0 || newHeight == 0 || isWlPopup) {
if (newWidth == 0 || newHeight == 0 || isPopup) {
// From xdg-shell.xml: "If the width or height arguments are zero,
// it means the client should decide its own window dimension".

View File

@@ -134,11 +134,9 @@ public abstract class WLDecoratedPeer extends WLWindowPeer {
}
void postPaintEvent() {
if (isVisible()) {
// Full re-paint must include window decorations, if any
notifyClientDecorationsChanged();
super.postPaintEvent();
}
// Full re-paint must include window decorations, if any
notifyClientDecorationsChanged();
super.postPaintEvent();
}
final void paintClientDecorations(final Graphics g) {

View File

@@ -127,6 +127,11 @@ public class WLFramePeer extends WLDecoratedPeer implements FramePeer {
throw new UnsupportedOperationException();
}
@Override
public void toFront() {
//throw new UnsupportedOperationException();
}
@Override
public void toBack() {
throw new UnsupportedOperationException();

View File

@@ -73,9 +73,10 @@ public abstract class WLGraphicsConfig extends GraphicsConfiguration {
@Override
public AffineTransform getNormalizingTransform() {
double xScale = device.getResolutionX(this) / 72.0;
double yScale = device.getResolutionY(this) / 72.0;
return new AffineTransform(xScale, 0.0, 0.0, yScale, 0.0, 0.0);
// TODO: may not be able to implement this fully, but we can try
// obtaining physical width/height from wl_output.geometry event.
// Those may be 0, of course.
return getDefaultTransform();
}
@Override

View File

@@ -31,7 +31,6 @@ import sun.java2d.vulkan.WLVKGraphicsConfig;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Window;
@@ -40,7 +39,6 @@ import java.awt.Window;
* in the multi-monitor setup. Whenever those change, this device is re-created.
*/
public class WLGraphicsDevice extends GraphicsDevice {
private static final double MM_IN_INCH = 25.4;
/**
* ID of the corresponding wl_output object received from Wayland.
*/
@@ -62,21 +60,16 @@ public class WLGraphicsDevice extends GraphicsDevice {
*/
private volatile int y; // only changes when the device gets invalidated
private final int widthMm;
private final int heightMm;
// Configs are always the same in size and scale
private volatile GraphicsConfiguration[] configs = null;
private volatile WLGraphicsConfig[] configs = null;
// The default config is an object from the configs array
private volatile WLGraphicsConfig defaultConfig = null;
private WLGraphicsDevice(int id, int x, int y, int widthMm, int heightMm) {
private WLGraphicsDevice(int id, int x, int y) {
this.wlID = id;
this.x = x;
this.y = y;
this.widthMm = widthMm;
this.heightMm = heightMm;
}
int getID() {
@@ -84,30 +77,23 @@ public class WLGraphicsDevice extends GraphicsDevice {
}
void updateConfiguration(String name, int width, int height, int scale) {
this.name = name;
this.name = name == null ? "wl_output." + wlID : name;
WLGraphicsConfig config = defaultConfig;
// Note that all configs are of equal size and scale
if (config == null || config.differsFrom(width, height, scale)) {
GraphicsConfiguration[] newConfigs;
WLGraphicsConfig newDefaultConfig;
if (configs == null || configs[0].differsFrom(width, height, scale)) {
// It is necessary to create a new object whenever config changes as its
// identity is used to detect changes in scale, among other things.
if (WLGraphicsEnvironment.isVulkanEnabled()) {
newDefaultConfig = WLVKGraphicsConfig.getConfig(this, width, height, scale);
newConfigs = new GraphicsConfiguration[1];
newConfigs[0] = newDefaultConfig;
defaultConfig = WLVKGraphicsConfig.getConfig(this, width, height, scale);
configs = new WLGraphicsConfig[1];
configs[0] = defaultConfig;
} else {
// TODO: Actually, Wayland may support a lot more shared memory buffer configurations, need to
// subscribe to the wl_shm:format event and get the list from there.
newDefaultConfig = WLSMGraphicsConfig.getConfig(this, width, height, scale, false);
newConfigs = new GraphicsConfiguration[2];
newConfigs[0] = newDefaultConfig;
newConfigs[1] = WLSMGraphicsConfig.getConfig(this, width, height, scale, true);
defaultConfig = WLSMGraphicsConfig.getConfig(this, width, height, scale, false);
configs = new WLGraphicsConfig[2];
configs[0] = defaultConfig;
configs[1] = WLSMGraphicsConfig.getConfig(this, width, height, scale, true);
}
configs = newConfigs;
defaultConfig = newDefaultConfig;
}
}
@@ -121,17 +107,13 @@ public class WLGraphicsDevice extends GraphicsDevice {
this.x = similarDevice.x;
this.y = similarDevice.y;
int newScale = similarDevice.getScale();
Rectangle newBounds = similarDevice.defaultConfig.getBounds();
final int newScale = similarDevice.getScale();
final Rectangle newBounds = similarDevice.defaultConfig.getBounds();
updateConfiguration(similarDevice.name, newBounds.width, newBounds.height, newScale);
}
public static WLGraphicsDevice createWithConfiguration(int id, String name,
int x, int y,
int width, int height,
int widthMm, int heightMm,
int scale) {
WLGraphicsDevice device = new WLGraphicsDevice(id, x, y, widthMm, heightMm);
public static WLGraphicsDevice createWithConfiguration(int id, String name, int x, int y, int width, int height, int scale) {
final WLGraphicsDevice device = new WLGraphicsDevice(id, x, y);
device.updateConfiguration(name, width, height, scale);
return device;
}
@@ -145,17 +127,11 @@ public class WLGraphicsDevice extends GraphicsDevice {
}
boolean hasSameNameAs(WLGraphicsDevice otherDevice) {
var localName = name;
var otherName = otherDevice.name;
return localName != null && localName.equals(otherName);
return name != null && otherDevice.name != null && name.equals(otherDevice.name);
}
boolean hasSameSizeAs(WLGraphicsDevice modelDevice) {
var config = defaultConfig;
var modelConfig = modelDevice.defaultConfig;
return config != null
&& modelConfig != null
&& config.getBounds().equals(modelConfig.getBounds());
return defaultConfig != null && modelDevice.defaultConfig != null && defaultConfig.getBounds().equals(modelDevice.defaultConfig.getBounds());
}
@Override
@@ -187,27 +163,6 @@ public class WLGraphicsDevice extends GraphicsDevice {
return defaultConfig.getScale();
}
int getResolution() {
Rectangle bounds = defaultConfig.getBounds();
if (bounds.width == 0 || bounds.height == 0) return 0;
double diagonalPixel = Math.sqrt(bounds.width * bounds.width + bounds.height * bounds.height);
double diagonalMm = Math.sqrt(widthMm * widthMm + heightMm * heightMm);
return (int) (diagonalPixel / diagonalMm * MM_IN_INCH);
}
int getResolutionX(WLGraphicsConfig config) {
Rectangle bounds = config.getBounds();
if (bounds.width == 0) return 0;
return (int)((double)bounds.width / widthMm * MM_IN_INCH);
}
int getResolutionY(WLGraphicsConfig config) {
Rectangle bounds = config.getBounds();
if (bounds.height == 0) return 0;
return (int)((double)bounds.height / heightMm * MM_IN_INCH);
}
@Override
public boolean isFullScreenSupported() {
return true;
@@ -256,13 +211,8 @@ public class WLGraphicsDevice extends GraphicsDevice {
@Override
public String toString() {
var config = defaultConfig;
return String.format("WLGraphicsDevice: '%s' id=%d at (%d, %d) with %s",
name, wlID, x, y,
config != null ? config : "<no configs>");
}
public Insets getInsets() {
return new Insets(0, 0, 0, 0);
return String.format("WLGraphicsDevice: id=%d at (%d, %d) with %s",
wlID, x, y,
defaultConfig != null ? defaultConfig : "<no configs>");
}
}

View File

@@ -45,43 +45,23 @@ public class WLGraphicsEnvironment extends SunGraphicsEnvironment {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.wl.WLGraphicsEnvironment");
private static boolean vulkanEnabled = false;
private static boolean verboseVulkanStatus = false;
private static boolean vulkanRequested = false;
private static int vulkanRequestedDeviceNumber = -1;
@SuppressWarnings("removal")
private static String vulkanOption =
private static boolean vulkanRequested =
AccessController.doPrivileged(
(PrivilegedAction<String>) () -> System.getProperty("sun.java2d.vulkan", ""));
@SuppressWarnings("removal")
private static String vulkanOptionDeviceNumber =
AccessController.doPrivileged(
(PrivilegedAction<String>) () -> System.getProperty("sun.java2d.vulkan.deviceNumber", "0"));
(PrivilegedAction<Boolean>) () ->
"true".equals(System.getProperty("sun.java2d.vulkan")));
static {
vulkanRequested = "true".equalsIgnoreCase(vulkanOption);
try {
vulkanRequestedDeviceNumber = Integer.parseInt(vulkanOptionDeviceNumber);
} catch (NumberFormatException e) {
log.warning("Invalid Vulkan device number:" + vulkanOptionDeviceNumber);
}
verboseVulkanStatus = "True".equals(vulkanOption);
System.loadLibrary("awt");
SurfaceManagerFactory.setInstance(new UnixSurfaceManagerFactory());
if (vulkanRequested) {
vulkanEnabled = initVKWL(verboseVulkanStatus, vulkanRequestedDeviceNumber);
vulkanEnabled = initVKWL();
}
if (log.isLoggable(Level.FINE)) {
log.fine("Vulkan rendering enabled: " + (vulkanEnabled?"YES":"NO"));
}
// Make sure the toolkit is loaded because otherwise this GE is going to be empty
WLToolkit.isInitialized();
}
private static native boolean initVKWL(boolean verbose, int deviceNumber);
private static native boolean initVKWL();
private WLGraphicsEnvironment() {
}
@@ -120,8 +100,7 @@ public class WLGraphicsEnvironment extends SunGraphicsEnvironment {
private final List<WLGraphicsDevice> devices = new ArrayList<>(5);
private void notifyOutputConfigured(String name, String make, String model, int wlID,
int x, int y, int width, int height, int widthMm, int heightMm,
private void notifyOutputConfigured(String name, int wlID, int x, int y, int width, int height,
int subpixel, int transform, int scale) {
// Called from native code whenever a new output appears or an existing one changes its properties
// NB: initially called during WLToolkit.initIDs() on the main thread; later on EDT.
@@ -129,10 +108,6 @@ public class WLGraphicsEnvironment extends SunGraphicsEnvironment {
log.fine(String.format("Output configured id=%d at (%d, %d) %dx%d %dx scale", wlID, x, y, width, height, scale));
}
String humanID =
(name != null ? name + " " : "")
+ (make != null ? make + " " : "")
+ (model != null ? model : "");
synchronized (devices) {
boolean newOutput = true;
for (int i = 0; i < devices.size(); i++) {
@@ -140,10 +115,9 @@ public class WLGraphicsEnvironment extends SunGraphicsEnvironment {
if (gd.getID() == wlID) {
newOutput = false;
if (gd.isSameDeviceAs(wlID, x, y)) {
gd.updateConfiguration(humanID, width, height, scale);
gd.updateConfiguration(name, width, height, scale);
} else {
final WLGraphicsDevice updatedDevice = WLGraphicsDevice.createWithConfiguration(wlID, humanID,
x, y, width, height, widthMm, heightMm, scale);
final WLGraphicsDevice updatedDevice = WLGraphicsDevice.createWithConfiguration(wlID, name, x, y, width, height, scale);
devices.set(i, updatedDevice);
gd.invalidate(updatedDevice);
}
@@ -151,8 +125,7 @@ public class WLGraphicsEnvironment extends SunGraphicsEnvironment {
}
}
if (newOutput) {
final WLGraphicsDevice gd = WLGraphicsDevice.createWithConfiguration(wlID, humanID, x, y,
width, height, widthMm, heightMm, scale);
final WLGraphicsDevice gd = WLGraphicsDevice.createWithConfiguration(wlID, name, x, y, width, height, scale);
devices.add(gd);
}
}

View File

@@ -35,7 +35,7 @@ public class WLKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
@Override
public void setCurrentFocusOwner(Component comp) {
if (comp != null && comp != currentFocusedWindow) {
if (comp != currentFocusedWindow) {
// In Wayland, only Window can be focused, not any widget in it.
focusLog.severe("Unexpected focus owner set in a Window: " + comp);
}

View File

@@ -28,7 +28,6 @@ package sun.awt.wl;
import jdk.internal.misc.InnocuousThread;
import sun.awt.AWTAccessor;
import sun.awt.AWTAutoShutdown;
import sun.awt.AppContext;
import sun.awt.LightweightFrame;
import sun.awt.PeerEvent;
@@ -205,14 +204,12 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
@Override
public void run() {
while(true) {
AWTAutoShutdown.notifyToolkitThreadFree(); // will now wait for events
int result = readEvents();
if (result == READ_RESULT_ERROR) {
log.severe("Wayland protocol I/O error");
// TODO: display disconnect handling here?
break;
} else if (result == READ_RESULT_FINISHED_WITH_EVENTS) {
AWTAutoShutdown.notifyToolkitThreadBusy(); // busy processing events
SunToolkit.postEvent(AppContext.getAppContext(), new PeerEvent(this, () -> {
WLToolkit.awtLock();
try {
@@ -237,7 +234,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
* the next click is considered separate and not part of multi-click event.
* @return maximum milliseconds between same mouse button clicks for them to be a multiclick
*/
static int getMulticlickTime() {
static long getMulticlickTime() {
/* TODO: get from the system somehow */
return AWT_MULTICLICK_DEFAULT_TIME_MS;
}
@@ -817,8 +814,8 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
@Override
public int getScreenResolution() {
var defaultScreen = (WLGraphicsDevice)WLGraphicsEnvironment.getSingleInstance().getDefaultScreenDevice();
return defaultScreen.getResolution();
// TODO
return 150;
}
/**
@@ -858,14 +855,8 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
protected void initializeDesktopProperties() {
super.initializeDesktopProperties();
desktopProperties.put("DnD.Autoscroll.initialDelay", 50);
desktopProperties.put("DnD.Autoscroll.interval", 50);
desktopProperties.put("DnD.Autoscroll.cursorHysteresis", 5);
desktopProperties.put("Shell.shellFolderManager", "sun.awt.shell.ShellFolderManager");
if (!GraphicsEnvironment.isHeadless()) {
desktopProperties.put("awt.multiClickInterval", getMulticlickTime());
desktopProperties.put("awt.mouse.numButtons", getNumberOfButtons());
desktopProperties.put("awt.mouse.numButtons", MOUSE_BUTTONS_COUNT);
}
}
@@ -1005,17 +996,6 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
flushImpl();
}
@Override
public Insets getScreenInsets(final GraphicsConfiguration gc) {
final GraphicsDevice gd = gc.getDevice();
if (gd instanceof WLGraphicsDevice device) {
Insets insets = device.getInsets();
return (Insets) insets.clone();
} else {
return super.getScreenInsets(gc);
}
}
private native int readEvents();
private native void dispatchEventsOnEDT();
private native void flushImpl();

View File

@@ -89,7 +89,7 @@ public class WLWindowPeer extends WLComponentPeer implements WindowPeer {
@Override
public void toFront() {
activate();
// TODO
}
@Override

View File

@@ -82,9 +82,22 @@ ReportFatalError(const char* file, int line, const char *msg)
assert(0);
}
static inline void
AssertCalledOnEDT(const char* file, int line)
{
char threadName[16];
pthread_getname_np(pthread_self(), threadName, sizeof(threadName));
if (strncmp(threadName, "AWT-EventQueue", 14) != 0) {
fprintf(stderr, "Assert failed (called on %s instead of EDT) at %s:%d\n", threadName, file, line);
fflush(stderr);
assert(0);
}
}
static void
AssertDrawLockIsHeld(WLSurfaceBufferManager* manager, const char * file, int line);
#define ASSERT_ON_EDT() AssertCalledOnEDT(__FILE__, __LINE__)
#define WL_FATAL_ERROR(msg) ReportFatalError(__FILE__, __LINE__, msg)
#define ASSERT_DRAW_LOCK_IS_HELD(manager) AssertDrawLockIsHeld(manager, __FILE__, __LINE__)
#define ASSERT_SHOW_LOCK_IS_HELD(manager) AssertShowLockIsHeld(manager, __FILE__, __LINE__)
@@ -757,7 +770,7 @@ WLSBM_Create(jint width, jint height, jint scale, jint bgPixel, jint wlShmFormat
// both read from and written to (when scrolling, for instance).
// So it needs to be able to be "locked" twice: once for writing and
// once for reading.
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&manager->drawLock, &attr);
DrawBufferCreate(manager);
ShowBufferCreate(manager);

View File

@@ -261,7 +261,7 @@ Java_sun_java2d_wl_WLSMSurfaceData_initOps(JNIEnv *env, jobject wsd,
// Recursive mutex is required because blit can be done with both source
// and destination being the same surface (during scrolling, for example).
// So WLSD_Lock() should be able to lock the same surface twice in a row.
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&wsdo->lock, &attr);
#endif /* !HEADLESS */
}

View File

@@ -280,11 +280,8 @@ JNI_OnUnload(JavaVM *vm, void *reserved) {
#define TEXT_AA_LCD_VRGB 6
#define TEXT_AA_LCD_VBGR 7
typedef FcResult (*FcPatternGetValueFuncType)(const FcPattern *p, const char *object, int n, void *b);
static void setRenderingFontHintsField(FcPatternGetValueFuncType fcPatternGetValue, FcPattern* matchPattern,
const char* property, int* value) {
if (FcResultMatch != (*fcPatternGetValue)(matchPattern, property, 0, value)) {
static void setRenderingFontHintsField(FcPattern* matchPattern, const char* property, int* value) {
if (FcResultMatch != (*fcPatternGetBool)(matchPattern, property, 0, value)) {
*value = -1;
}
}
@@ -295,13 +292,10 @@ JNIEXPORT int setupRenderingFontHints
FcPattern *pattern, *matchPattern;
FcResult result;
if (usingFontConfig() == false) {
return -1;
}
if (fcName == NULL) {
return -1;
}
pattern = (*fcNameParse)((FcChar8 *)fcName);
if (locale != NULL) {
(*fcPatternAddString)(pattern, FC_LANG, (unsigned char*)locale);
@@ -318,19 +312,13 @@ JNIEXPORT int setupRenderingFontHints
*/
if (matchPattern) {
// Extract values from result
setRenderingFontHintsField((FcPatternGetValueFuncType)(fcPatternGetBool), matchPattern, FC_HINTING,
&renderingFontHints->fcHinting);
setRenderingFontHintsField((FcPatternGetValueFuncType)(fcPatternGetInteger), matchPattern, FC_HINT_STYLE,
&renderingFontHints->fcHintStyle);
setRenderingFontHintsField((FcPatternGetValueFuncType)(fcPatternGetBool), matchPattern, FC_ANTIALIAS,
&renderingFontHints->fcAntialias);
setRenderingFontHintsField((FcPatternGetValueFuncType)(fcPatternGetBool), matchPattern, FC_AUTOHINT,
&renderingFontHints->fcAutohint);
setRenderingFontHintsField((FcPatternGetValueFuncType)(fcPatternGetInteger), matchPattern, FC_RGBA,
&renderingFontHints->fcRGBA);
setRenderingFontHintsField((FcPatternGetValueFuncType)(fcPatternGetInteger), matchPattern, FC_LCD_FILTER,
&renderingFontHints->fcLCDFilter);
setRenderingFontHintsField(matchPattern, FC_HINTING, &renderingFontHints->fcHinting);
setRenderingFontHintsField(matchPattern, FC_HINT_STYLE, &renderingFontHints->fcHintStyle);
setRenderingFontHintsField(matchPattern, FC_ANTIALIAS, &renderingFontHints->fcAntialias);
setRenderingFontHintsField(matchPattern, FC_AUTOHINT, &renderingFontHints->fcAutohint);
setRenderingFontHintsField(matchPattern, FC_LCD_FILTER, &renderingFontHints->fcRGBA);
setRenderingFontHintsField(matchPattern, FC_RGBA, &renderingFontHints->fcLCDFilter);
(*fcPatternDestroy)(matchPattern);
}
(*fcPatternDestroy)(pattern);

View File

@@ -28,7 +28,6 @@
#include <jni.h>
#include <Trace.h>
#include <assert.h>
#include <gtk-shell1-client-protocol.h>
#include "jni_util.h"
#include "WLToolkit.h"
@@ -45,54 +44,12 @@ static jmethodID notifyConfiguredMID;
static jmethodID notifyEnteredOutputMID;
static jmethodID notifyLeftOutputMID;
struct activation_token_list_item {
struct xdg_activation_token_v1 *token;
struct activation_token_list_item *next_item;
};
static struct activation_token_list_item *add_token(struct activation_token_list_item *list,
struct xdg_activation_token_v1 *token_to_add) {
struct activation_token_list_item *new_item =
(struct activation_token_list_item *) calloc(1, sizeof(struct activation_token_list_item));
new_item->token = token_to_add;
new_item->next_item = list;
return new_item;
}
static struct activation_token_list_item *delete_last_token(struct activation_token_list_item *list) {
assert(list);
xdg_activation_token_v1_destroy(list->token);
struct activation_token_list_item *next_item = list->next_item;
free(list);
return next_item;
}
static struct activation_token_list_item *delete_token(struct activation_token_list_item *list,
struct xdg_activation_token_v1 *token_to_delete) {
if (list == NULL) {
return NULL;
} else if (list->token == token_to_delete) {
return delete_last_token(list);
} else {
list->next_item = delete_token(list->next_item, token_to_delete);
return list;
}
}
static void delete_all_tokens(struct activation_token_list_item *list) {
while (list) {
list = delete_last_token(list);
}
}
struct WLFrame {
jobject nativeFramePeer; // weak reference
struct wl_surface *wl_surface;
struct xdg_surface *xdg_surface;
struct gtk_surface1 *gtk_surface;
struct WLFrame *parent;
struct xdg_positioner *xdg_positioner;
struct activation_token_list_item *activation_token_list;
jboolean toplevel;
union {
struct xdg_toplevel *xdg_toplevel;
@@ -267,22 +224,6 @@ static const struct xdg_popup_listener xdg_popup_listener = {
.popup_done = xdg_popup_done,
};
static void
xdg_activation_token_v1_done(void *data,
struct xdg_activation_token_v1 *xdg_activation_token_v1,
const char *token) {
struct WLFrame *frame = (struct WLFrame *) data;
assert(frame);
struct wl_surface *surface = frame->wl_surface;
assert(surface);
xdg_activation_v1_activate(xdg_activation_v1, token, surface);
frame->activation_token_list = delete_token(frame->activation_token_list, xdg_activation_token_v1);
}
static const struct xdg_activation_token_v1_listener xdg_activation_token_v1_listener = {
.done = xdg_activation_token_v1_done,
};
JNIEXPORT void JNICALL
Java_sun_awt_wl_WLComponentPeer_initIDs
(JNIEnv *env, jclass clazz)
@@ -411,7 +352,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeRequestUnsetFullScreen
JNIEXPORT void JNICALL
Java_sun_awt_wl_WLComponentPeer_nativeCreateWLSurface
(JNIEnv *env, jobject obj, jlong ptr, jlong parentPtr,
jint x, jint y, jboolean isModal,
jint x, jint y,
jstring title, jstring appid)
{
struct WLFrame *frame = (struct WLFrame *) ptr;
@@ -419,9 +360,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreateWLSurface
if (frame->wl_surface) return;
frame->wl_surface = wl_compositor_create_surface(wl_compositor);
frame->xdg_surface = xdg_wm_base_get_xdg_surface(xdg_wm_base, frame->wl_surface);
if (gtk_shell1 != NULL) {
frame->gtk_surface = gtk_shell1_get_gtk_surface(gtk_shell1, frame->wl_surface);
}
wl_surface_add_listener(frame->wl_surface, &wl_surface_listener, frame);
xdg_surface_add_listener(frame->xdg_surface, &xdg_surface_listener, frame);
@@ -438,10 +376,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreateWLSurface
xdg_toplevel_set_parent(frame->xdg_toplevel, parentFrame->xdg_toplevel);
}
if (isModal && frame->gtk_surface != NULL) {
gtk_surface1_set_modal(frame->gtk_surface);
}
#ifdef WAKEFIELD_ROBOT
if (wakefield) {
// TODO: this doesn't work quite as expected for some reason
@@ -504,16 +438,8 @@ DoHide(struct WLFrame *frame)
} else {
xdg_popup_destroy(frame->xdg_popup);
}
if (wl_surface_in_focus == frame->wl_surface) {
wl_surface_in_focus = NULL;
}
if (frame->gtk_surface != NULL) {
gtk_surface1_destroy(frame->gtk_surface);
}
xdg_surface_destroy(frame->xdg_surface);
wl_surface_destroy(frame->wl_surface);
delete_all_tokens(frame->activation_token_list);
frame->activation_token_list = NULL;
frame->wl_surface = NULL;
frame->xdg_surface = NULL;
frame->xdg_toplevel = NULL;
@@ -599,20 +525,3 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeShowWindowMenu
xdg_toplevel_show_window_menu(frame->xdg_toplevel, wl_seat, last_mouse_pressed_serial, x, y);
}
}
JNIEXPORT void JNICALL
Java_sun_awt_wl_WLComponentPeer_nativeActivate
(JNIEnv *env, jobject obj, jlong ptr)
{
struct WLFrame *frame = jlong_to_ptr(ptr);
if (frame->wl_surface && xdg_activation_v1 && wl_seat) {
struct xdg_activation_token_v1 *token = xdg_activation_v1_get_activation_token(xdg_activation_v1);
xdg_activation_token_v1_add_listener(token, &xdg_activation_token_v1_listener, frame);
xdg_activation_token_v1_set_serial(token, last_input_or_focus_serial, wl_seat);
if (wl_surface_in_focus) {
xdg_activation_token_v1_set_surface(token, wl_surface_in_focus);
}
xdg_activation_token_v1_commit(token);
frame->activation_token_list = add_token(frame->activation_token_list, token);
}
}

View File

@@ -43,15 +43,11 @@ typedef struct WLOutput {
int32_t y;
int32_t width;
int32_t height;
int32_t width_mm;
int32_t height_mm;
uint32_t subpixel;
uint32_t transform;
uint32_t scale;
char * make;
char * model;
char * name;
} WLOutput;
@@ -83,10 +79,6 @@ wl_output_geometry(
output->y = y;
output->subpixel = subpixel;
output->transform = transform;
output->width_mm = physical_width;
output->height_mm = physical_height;
output->make = make != NULL ? strdup(make) : NULL;
output->model = model != NULL ? strdup(model) : NULL;
}
static void
@@ -146,23 +138,16 @@ wl_output_done(
JNIEnv *env = getEnv();
jobject obj = (*env)->CallStaticObjectMethod(env, geClass, getSingleInstanceMID);
JNU_CHECK_EXCEPTION(env);
CHECK_NULL_THROW_IE(env, obj, "WLGraphicsEnvironment.getSingleInstance() returned null");
jstring name = output->name ? JNU_NewStringPlatform(env, output->name) : NULL;
jstring make = output->make ? JNU_NewStringPlatform(env, output->make) : NULL;
jstring model = output->model ? JNU_NewStringPlatform(env, output->model) : NULL;
jstring outputName = output->name ? JNU_NewStringPlatform(env, output->name) : NULL;
JNU_CHECK_EXCEPTION(env);
(*env)->CallVoidMethod(env, obj, notifyOutputConfiguredMID,
name,
make,
model,
outputName,
output->id,
output->x,
output->y,
output->width,
output->height,
output->width_mm,
output->height_mm,
(jint)output->subpixel,
(jint)output->transform,
(jint)output->scale);
@@ -197,7 +182,7 @@ WLGraphicsEnvironment_initIDs
CHECK_NULL_RETURN(
notifyOutputConfiguredMID = (*env)->GetMethodID(env, clazz,
"notifyOutputConfigured",
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIIIIII)V"),
"(Ljava/lang/String;IIIIIIII)V"),
JNI_FALSE);
CHECK_NULL_RETURN(
notifyOutputDestroyedMID = (*env)->GetMethodID(env, clazz,
@@ -236,8 +221,6 @@ WLOutputDeregister(struct wl_registry *wl_registry, uint32_t id)
wl_output_destroy(cur->wl_output);
WLOutput * next = cur->next;
free(cur->name);
free(cur->make);
free(cur->model);
free(cur);
cur = next;
} else {
@@ -283,7 +266,7 @@ WLOutputByID(uint32_t id)
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL
Java_sun_awt_wl_WLGraphicsEnvironment_initVKWL(JNIEnv *env, jclass wlge, jboolean verbose, jint requestedDevice)
Java_sun_awt_wl_WLGraphicsEnvironment_initVKWL(JNIEnv *env, jclass wlge)
{
jboolean vkwlAvailable = JNI_FALSE;
/* TODO: The following sequence lead to uninitialized awt lock
@@ -295,7 +278,7 @@ Java_sun_awt_wl_WLGraphicsEnvironment_initVKWL(JNIEnv *env, jclass wlge, jboolea
WLGraphicsEnvironment.initVKWL()
*/
//AWT_LOCK();
vkwlAvailable = VK_Init(verbose, requestedDevice);
vkwlAvailable = VK_Init();
//AWT_UNLOCK();
return vkwlAvailable;
}

View File

@@ -39,8 +39,6 @@
#include <unistd.h>
#include <time.h>
#include "gtk-shell1-client-protocol.h"
#include "jvm_md.h"
#include "jni_util.h"
#include "awt.h"
@@ -60,8 +58,6 @@ struct wl_display *wl_display = NULL;
struct wl_shm *wl_shm = NULL;
struct wl_compositor *wl_compositor = NULL;
struct xdg_wm_base *xdg_wm_base = NULL;
struct xdg_activation_v1 *xdg_activation_v1 = NULL;
struct gtk_shell1* gtk_shell1 = NULL;
struct wl_seat *wl_seat = NULL;
struct wl_keyboard *wl_keyboard;
@@ -69,11 +65,8 @@ struct wl_pointer *wl_pointer;
struct wl_cursor_theme *wl_cursor_theme = NULL;
struct wl_surface *wl_surface_in_focus = NULL;
uint32_t last_mouse_pressed_serial = 0;
uint32_t last_pointer_enter_serial = 0;
uint32_t last_input_or_focus_serial = 0;
static uint32_t num_of_outstanding_sync = 0;
@@ -318,7 +311,6 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial,
pointer_event.button = button,
pointer_event.state = state;
if (state) {
last_input_or_focus_serial = serial;
last_mouse_pressed_serial = serial;
}
}
@@ -460,9 +452,6 @@ static void
wl_keyboard_enter(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, struct wl_surface *surface, struct wl_array *keys)
{
wl_surface_in_focus = surface;
last_input_or_focus_serial = serial;
JNIEnv* env = getEnv();
(*env)->CallStaticVoidMethod(env,
tkClass,
@@ -492,8 +481,6 @@ static void
wl_keyboard_key(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, uint32_t time, uint32_t evdev_key, uint32_t state)
{
last_input_or_focus_serial = serial;
const uint32_t scancode = evdev_key + 8;
const uint32_t keychar32 = xkb_ifs.xkb_state_key_get_utf32(xkb_state, scancode);
const xkb_keysym_t keysym = xkb_ifs.xkb_state_key_get_one_sym(xkb_state, scancode);
@@ -516,8 +503,6 @@ static void
wl_keyboard_leave(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, struct wl_surface *surface)
{
wl_surface_in_focus = NULL;
JNIEnv* env = getEnv();
(*env)->CallStaticVoidMethod(env,
tkClass,
@@ -533,8 +518,6 @@ wl_keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard,
uint32_t mods_latched, uint32_t mods_locked,
uint32_t group)
{
last_input_or_focus_serial = serial;
xkb_ifs.xkb_state_update_mask(xkb_state,
mods_depressed,
mods_latched,
@@ -685,10 +668,6 @@ registry_global(void *data, struct wl_registry *wl_registry,
} else if (strcmp(interface, wl_output_interface.name) == 0) {
WLOutputRegister(wl_registry, name);
process_new_listener_before_end_of_init();
} else if (strcmp(interface, xdg_activation_v1_interface.name) == 0) {
xdg_activation_v1 = wl_registry_bind(wl_registry, name, &xdg_activation_v1_interface, 1);
} else if (strcmp(interface, gtk_shell1_interface.name) == 0) {
gtk_shell1 = wl_registry_bind(wl_registry, name, &gtk_shell1_interface, 1);
}
#ifdef WAKEFIELD_ROBOT
else if (strcmp(interface, wakefield_interface.name) == 0) {

View File

@@ -26,7 +26,6 @@
#include <wayland-client.h>
#include <wayland-cursor.h>
#include "xdg-shell-client-protocol.h"
#include "xdg-activation-v1-client-protocol.h"
#define CHECK_NULL_THROW_OOME_RETURN(env, x, msg, z)\
do { \
@@ -44,23 +43,15 @@
} \
} while(0) \
struct gtk_shell1;
extern struct wl_seat *wl_seat;
extern struct wl_display *wl_display;
extern struct wl_pointer *wl_pointer;
extern struct wl_compositor *wl_compositor;
extern struct xdg_wm_base *xdg_wm_base;
extern struct xdg_activation_v1 *xdg_activation_v1;
extern struct gtk_shell1* gtk_shell1; // optional, check for NULL before use
extern struct wl_cursor_theme *wl_cursor_theme;
extern struct wl_surface *wl_surface_in_focus;
extern uint32_t last_mouse_pressed_serial;
extern uint32_t last_pointer_enter_serial;
extern uint32_t last_input_or_focus_serial;
JNIEnv *getEnv();

View File

@@ -1,430 +0,0 @@
/* Generated by wayland-scanner 1.19.0 */
#ifndef GTK_CLIENT_PROTOCOL_H
#define GTK_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_gtk The gtk protocol
* @section page_ifaces_gtk Interfaces
* - @subpage page_iface_gtk_shell1 - gtk specific extensions
* - @subpage page_iface_gtk_surface1 -
*/
struct gtk_shell1;
struct gtk_surface1;
struct wl_seat;
struct wl_surface;
#ifndef GTK_SHELL1_INTERFACE
#define GTK_SHELL1_INTERFACE
/**
* @page page_iface_gtk_shell1 gtk_shell1
* @section page_iface_gtk_shell1_desc Description
*
* gtk_shell is a protocol extension providing additional features for
* clients implementing it.
* @section page_iface_gtk_shell1_api API
* See @ref iface_gtk_shell1.
*/
/**
* @defgroup iface_gtk_shell1 The gtk_shell1 interface
*
* gtk_shell is a protocol extension providing additional features for
* clients implementing it.
*/
extern const struct wl_interface gtk_shell1_interface;
#endif
#ifndef GTK_SURFACE1_INTERFACE
#define GTK_SURFACE1_INTERFACE
/**
* @page page_iface_gtk_surface1 gtk_surface1
* @section page_iface_gtk_surface1_api API
* See @ref iface_gtk_surface1.
*/
/**
* @defgroup iface_gtk_surface1 The gtk_surface1 interface
*/
extern const struct wl_interface gtk_surface1_interface;
#endif
#ifndef GTK_SHELL1_CAPABILITY_ENUM
#define GTK_SHELL1_CAPABILITY_ENUM
enum gtk_shell1_capability {
GTK_SHELL1_CAPABILITY_GLOBAL_APP_MENU = 1,
GTK_SHELL1_CAPABILITY_GLOBAL_MENU_BAR = 2,
GTK_SHELL1_CAPABILITY_DESKTOP_ICONS = 3,
};
#endif /* GTK_SHELL1_CAPABILITY_ENUM */
/**
* @ingroup iface_gtk_shell1
* @struct gtk_shell1_listener
*/
struct gtk_shell1_listener {
/**
*/
void (*capabilities)(void *data,
struct gtk_shell1 *gtk_shell1,
uint32_t capabilities);
};
/**
* @ingroup iface_gtk_shell1
*/
static inline int
gtk_shell1_add_listener(struct gtk_shell1 *gtk_shell1,
const struct gtk_shell1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) gtk_shell1,
(void (**)(void)) listener, data);
}
#define GTK_SHELL1_GET_GTK_SURFACE 0
#define GTK_SHELL1_SET_STARTUP_ID 1
#define GTK_SHELL1_SYSTEM_BELL 2
#define GTK_SHELL1_NOTIFY_LAUNCH 3
/**
* @ingroup iface_gtk_shell1
*/
#define GTK_SHELL1_CAPABILITIES_SINCE_VERSION 1
/**
* @ingroup iface_gtk_shell1
*/
#define GTK_SHELL1_GET_GTK_SURFACE_SINCE_VERSION 1
/**
* @ingroup iface_gtk_shell1
*/
#define GTK_SHELL1_SET_STARTUP_ID_SINCE_VERSION 1
/**
* @ingroup iface_gtk_shell1
*/
#define GTK_SHELL1_SYSTEM_BELL_SINCE_VERSION 1
/**
* @ingroup iface_gtk_shell1
*/
#define GTK_SHELL1_NOTIFY_LAUNCH_SINCE_VERSION 3
/** @ingroup iface_gtk_shell1 */
static inline void
gtk_shell1_set_user_data(struct gtk_shell1 *gtk_shell1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) gtk_shell1, user_data);
}
/** @ingroup iface_gtk_shell1 */
static inline void *
gtk_shell1_get_user_data(struct gtk_shell1 *gtk_shell1)
{
return wl_proxy_get_user_data((struct wl_proxy *) gtk_shell1);
}
static inline uint32_t
gtk_shell1_get_version(struct gtk_shell1 *gtk_shell1)
{
return wl_proxy_get_version((struct wl_proxy *) gtk_shell1);
}
/** @ingroup iface_gtk_shell1 */
static inline void
gtk_shell1_destroy(struct gtk_shell1 *gtk_shell1)
{
wl_proxy_destroy((struct wl_proxy *) gtk_shell1);
}
/**
* @ingroup iface_gtk_shell1
*/
static inline struct gtk_surface1 *
gtk_shell1_get_gtk_surface(struct gtk_shell1 *gtk_shell1, struct wl_surface *surface)
{
struct wl_proxy *gtk_surface;
gtk_surface = wl_proxy_marshal_constructor((struct wl_proxy *) gtk_shell1,
GTK_SHELL1_GET_GTK_SURFACE, &gtk_surface1_interface, NULL, surface);
return (struct gtk_surface1 *) gtk_surface;
}
/**
* @ingroup iface_gtk_shell1
*/
static inline void
gtk_shell1_set_startup_id(struct gtk_shell1 *gtk_shell1, const char *startup_id)
{
wl_proxy_marshal((struct wl_proxy *) gtk_shell1,
GTK_SHELL1_SET_STARTUP_ID, startup_id);
}
/**
* @ingroup iface_gtk_shell1
*/
static inline void
gtk_shell1_system_bell(struct gtk_shell1 *gtk_shell1, struct gtk_surface1 *surface)
{
wl_proxy_marshal((struct wl_proxy *) gtk_shell1,
GTK_SHELL1_SYSTEM_BELL, surface);
}
/**
* @ingroup iface_gtk_shell1
*/
static inline void
gtk_shell1_notify_launch(struct gtk_shell1 *gtk_shell1, const char *startup_id)
{
wl_proxy_marshal((struct wl_proxy *) gtk_shell1,
GTK_SHELL1_NOTIFY_LAUNCH, startup_id);
}
#ifndef GTK_SURFACE1_STATE_ENUM
#define GTK_SURFACE1_STATE_ENUM
enum gtk_surface1_state {
GTK_SURFACE1_STATE_TILED = 1,
/**
* @since 2
*/
GTK_SURFACE1_STATE_TILED_TOP = 2,
/**
* @since 2
*/
GTK_SURFACE1_STATE_TILED_RIGHT = 3,
/**
* @since 2
*/
GTK_SURFACE1_STATE_TILED_BOTTOM = 4,
/**
* @since 2
*/
GTK_SURFACE1_STATE_TILED_LEFT = 5,
};
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_STATE_TILED_TOP_SINCE_VERSION 2
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_STATE_TILED_RIGHT_SINCE_VERSION 2
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_STATE_TILED_BOTTOM_SINCE_VERSION 2
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_STATE_TILED_LEFT_SINCE_VERSION 2
#endif /* GTK_SURFACE1_STATE_ENUM */
#ifndef GTK_SURFACE1_EDGE_CONSTRAINT_ENUM
#define GTK_SURFACE1_EDGE_CONSTRAINT_ENUM
enum gtk_surface1_edge_constraint {
GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_TOP = 1,
GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_RIGHT = 2,
GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_BOTTOM = 3,
GTK_SURFACE1_EDGE_CONSTRAINT_RESIZABLE_LEFT = 4,
};
#endif /* GTK_SURFACE1_EDGE_CONSTRAINT_ENUM */
#ifndef GTK_SURFACE1_GESTURE_ENUM
#define GTK_SURFACE1_GESTURE_ENUM
enum gtk_surface1_gesture {
GTK_SURFACE1_GESTURE_DOUBLE_CLICK = 1,
GTK_SURFACE1_GESTURE_RIGHT_CLICK = 2,
GTK_SURFACE1_GESTURE_MIDDLE_CLICK = 3,
};
#endif /* GTK_SURFACE1_GESTURE_ENUM */
#ifndef GTK_SURFACE1_ERROR_ENUM
#define GTK_SURFACE1_ERROR_ENUM
enum gtk_surface1_error {
GTK_SURFACE1_ERROR_INVALID_GESTURE = 0,
};
#endif /* GTK_SURFACE1_ERROR_ENUM */
/**
* @ingroup iface_gtk_surface1
* @struct gtk_surface1_listener
*/
struct gtk_surface1_listener {
/**
*/
void (*configure)(void *data,
struct gtk_surface1 *gtk_surface1,
struct wl_array *states);
/**
* @since 2
*/
void (*configure_edges)(void *data,
struct gtk_surface1 *gtk_surface1,
struct wl_array *constraints);
};
/**
* @ingroup iface_gtk_surface1
*/
static inline int
gtk_surface1_add_listener(struct gtk_surface1 *gtk_surface1,
const struct gtk_surface1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) gtk_surface1,
(void (**)(void)) listener, data);
}
#define GTK_SURFACE1_SET_DBUS_PROPERTIES 0
#define GTK_SURFACE1_SET_MODAL 1
#define GTK_SURFACE1_UNSET_MODAL 2
#define GTK_SURFACE1_PRESENT 3
#define GTK_SURFACE1_REQUEST_FOCUS 4
#define GTK_SURFACE1_RELEASE 5
#define GTK_SURFACE1_TITLEBAR_GESTURE 6
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_CONFIGURE_SINCE_VERSION 1
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION 2
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_SET_DBUS_PROPERTIES_SINCE_VERSION 1
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_SET_MODAL_SINCE_VERSION 1
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_UNSET_MODAL_SINCE_VERSION 1
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_PRESENT_SINCE_VERSION 1
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_REQUEST_FOCUS_SINCE_VERSION 3
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_RELEASE_SINCE_VERSION 4
/**
* @ingroup iface_gtk_surface1
*/
#define GTK_SURFACE1_TITLEBAR_GESTURE_SINCE_VERSION 5
/** @ingroup iface_gtk_surface1 */
static inline void
gtk_surface1_set_user_data(struct gtk_surface1 *gtk_surface1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) gtk_surface1, user_data);
}
/** @ingroup iface_gtk_surface1 */
static inline void *
gtk_surface1_get_user_data(struct gtk_surface1 *gtk_surface1)
{
return wl_proxy_get_user_data((struct wl_proxy *) gtk_surface1);
}
static inline uint32_t
gtk_surface1_get_version(struct gtk_surface1 *gtk_surface1)
{
return wl_proxy_get_version((struct wl_proxy *) gtk_surface1);
}
/** @ingroup iface_gtk_surface1 */
static inline void
gtk_surface1_destroy(struct gtk_surface1 *gtk_surface1)
{
wl_proxy_destroy((struct wl_proxy *) gtk_surface1);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_set_dbus_properties(struct gtk_surface1 *gtk_surface1, const char *application_id, const char *app_menu_path, const char *menubar_path, const char *window_object_path, const char *application_object_path, const char *unique_bus_name)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_SET_DBUS_PROPERTIES, application_id, app_menu_path, menubar_path, window_object_path, application_object_path, unique_bus_name);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_set_modal(struct gtk_surface1 *gtk_surface1)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_SET_MODAL);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_unset_modal(struct gtk_surface1 *gtk_surface1)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_UNSET_MODAL);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_present(struct gtk_surface1 *gtk_surface1, uint32_t time)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_PRESENT, time);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_request_focus(struct gtk_surface1 *gtk_surface1, const char *startup_id)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_REQUEST_FOCUS, startup_id);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_release(struct gtk_surface1 *gtk_surface1)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_RELEASE);
wl_proxy_destroy((struct wl_proxy *) gtk_surface1);
}
/**
* @ingroup iface_gtk_surface1
*/
static inline void
gtk_surface1_titlebar_gesture(struct gtk_surface1 *gtk_surface1, uint32_t serial, struct wl_seat *seat, uint32_t gesture)
{
wl_proxy_marshal((struct wl_proxy *) gtk_surface1,
GTK_SURFACE1_TITLEBAR_GESTURE, serial, seat, gesture);
}
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,73 +0,0 @@
/* Generated by wayland-scanner 1.19.0 */
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface gtk_surface1_interface;
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
static const struct wl_interface *gtk_types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&gtk_surface1_interface,
&wl_surface_interface,
&gtk_surface1_interface,
NULL,
&wl_seat_interface,
NULL,
};
static const struct wl_message gtk_shell1_requests[] = {
{ "get_gtk_surface", "no", gtk_types + 6 },
{ "set_startup_id", "?s", gtk_types + 0 },
{ "system_bell", "?o", gtk_types + 8 },
{ "notify_launch", "3s", gtk_types + 0 },
};
static const struct wl_message gtk_shell1_events[] = {
{ "capabilities", "u", gtk_types + 0 },
};
WL_PRIVATE const struct wl_interface gtk_shell1_interface = {
"gtk_shell1", 5,
4, gtk_shell1_requests,
1, gtk_shell1_events,
};
static const struct wl_message gtk_surface1_requests[] = {
{ "set_dbus_properties", "?s?s?s?s?s?s", gtk_types + 0 },
{ "set_modal", "", gtk_types + 0 },
{ "unset_modal", "", gtk_types + 0 },
{ "present", "u", gtk_types + 0 },
{ "request_focus", "3?s", gtk_types + 0 },
{ "release", "4", gtk_types + 0 },
{ "titlebar_gesture", "5uou", gtk_types + 9 },
};
static const struct wl_message gtk_surface1_events[] = {
{ "configure", "a", gtk_types + 0 },
{ "configure_edges", "2a", gtk_types + 0 },
};
WL_PRIVATE const struct wl_interface gtk_surface1_interface = {
"gtk_surface1", 5,
7, gtk_surface1_requests,
2, gtk_surface1_events,
};

View File

@@ -1,413 +0,0 @@
/* Generated by wayland-scanner 1.18.0 */
#ifndef XDG_ACTIVATION_V1_CLIENT_PROTOCOL_H
#define XDG_ACTIVATION_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_activation_v1 The xdg_activation_v1 protocol
* Protocol for requesting activation of surfaces
*
* @section page_desc_xdg_activation_v1 Description
*
* The way for a client to pass focus to another toplevel is as follows.
*
* The client that intends to activate another toplevel uses the
* xdg_activation_v1.get_activation_token request to get an activation token.
* This token is then forwarded to the client, which is supposed to activate
* one of its surfaces, through a separate band of communication.
*
* One established way of doing this is through the XDG_ACTIVATION_TOKEN
* environment variable of a newly launched child process. The child process
* should unset the environment variable again right after reading it out in
* order to avoid propagating it to other child processes.
*
* Another established way exists for Applications implementing the D-Bus
* interface org.freedesktop.Application, which should get their token under
* XDG_ACTIVATION_TOKEN on their platform_data.
*
* In general activation tokens may be transferred across clients through
* means not described in this protocol.
*
* The client to be activated will then pass the token
* it received to the xdg_activation_v1.activate request. The compositor can
* then use this token to decide how to react to the activation request.
*
* The token the activating client gets may be ineffective either already at
* the time it receives it, for example if it was not focused, for focus
* stealing prevention. The activating client will have no way to discover
* the validity of the token, and may still forward it to the to be activated
* client.
*
* The created activation token may optionally get information attached to it
* that can be used by the compositor to identify the application that we
* intend to activate. This can for example be used to display a visual hint
* about what application is being started.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*
* @section page_ifaces_xdg_activation_v1 Interfaces
* - @subpage page_iface_xdg_activation_v1 - interface for activating surfaces
* - @subpage page_iface_xdg_activation_token_v1 - an exported activation handle
* @section page_copyright_xdg_activation_v1 Copyright
* <pre>
*
* Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
* Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
* </pre>
*/
struct wl_seat;
struct wl_surface;
struct xdg_activation_token_v1;
struct xdg_activation_v1;
/**
* @page page_iface_xdg_activation_v1 xdg_activation_v1
* @section page_iface_xdg_activation_v1_desc Description
*
* A global interface used for informing the compositor about applications
* being activated or started, or for applications to request to be
* activated.
* @section page_iface_xdg_activation_v1_api API
* See @ref iface_xdg_activation_v1.
*/
/**
* @defgroup iface_xdg_activation_v1 The xdg_activation_v1 interface
*
* A global interface used for informing the compositor about applications
* being activated or started, or for applications to request to be
* activated.
*/
extern const struct wl_interface xdg_activation_v1_interface;
/**
* @page page_iface_xdg_activation_token_v1 xdg_activation_token_v1
* @section page_iface_xdg_activation_token_v1_desc Description
*
* An object for setting up a token and receiving a token handle that can
* be passed as an activation token to another client.
*
* The object is created using the xdg_activation_v1.get_activation_token
* request. This object should then be populated with the app_id, surface
* and serial information and committed. The compositor shall then issue a
* done event with the token. In case the request's parameters are invalid,
* the compositor will provide an invalid token.
* @section page_iface_xdg_activation_token_v1_api API
* See @ref iface_xdg_activation_token_v1.
*/
/**
* @defgroup iface_xdg_activation_token_v1 The xdg_activation_token_v1 interface
*
* An object for setting up a token and receiving a token handle that can
* be passed as an activation token to another client.
*
* The object is created using the xdg_activation_v1.get_activation_token
* request. This object should then be populated with the app_id, surface
* and serial information and committed. The compositor shall then issue a
* done event with the token. In case the request's parameters are invalid,
* the compositor will provide an invalid token.
*/
extern const struct wl_interface xdg_activation_token_v1_interface;
#define XDG_ACTIVATION_V1_DESTROY 0
#define XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN 1
#define XDG_ACTIVATION_V1_ACTIVATE 2
/**
* @ingroup iface_xdg_activation_v1
*/
#define XDG_ACTIVATION_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_v1
*/
#define XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_v1
*/
#define XDG_ACTIVATION_V1_ACTIVATE_SINCE_VERSION 1
/** @ingroup iface_xdg_activation_v1 */
static inline void
xdg_activation_v1_set_user_data(struct xdg_activation_v1 *xdg_activation_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_activation_v1, user_data);
}
/** @ingroup iface_xdg_activation_v1 */
static inline void *
xdg_activation_v1_get_user_data(struct xdg_activation_v1 *xdg_activation_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_activation_v1);
}
static inline uint32_t
xdg_activation_v1_get_version(struct xdg_activation_v1 *xdg_activation_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1);
}
/**
* @ingroup iface_xdg_activation_v1
*
* Notify the compositor that the xdg_activation object will no longer be
* used.
*
* The child objects created via this interface are unaffected and should
* be destroyed separately.
*/
static inline void
xdg_activation_v1_destroy(struct xdg_activation_v1 *xdg_activation_v1)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_v1,
XDG_ACTIVATION_V1_DESTROY);
wl_proxy_destroy((struct wl_proxy *) xdg_activation_v1);
}
/**
* @ingroup iface_xdg_activation_v1
*
* Creates an xdg_activation_token_v1 object that will provide
* the initiating client with a unique token for this activation. This
* token should be offered to the clients to be activated.
*/
static inline struct xdg_activation_token_v1 *
xdg_activation_v1_get_activation_token(struct xdg_activation_v1 *xdg_activation_v1)
{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_activation_v1,
XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN, &xdg_activation_token_v1_interface, NULL);
return (struct xdg_activation_token_v1 *) id;
}
/**
* @ingroup iface_xdg_activation_v1
*
* Requests surface activation. It's up to the compositor to display
* this information as desired, for example by placing the surface above
* the rest.
*
* The compositor may know who requested this by checking the activation
* token and might decide not to follow through with the activation if it's
* considered unwanted.
*
* Compositors can ignore unknown activation tokens when an invalid
* token is passed.
*/
static inline void
xdg_activation_v1_activate(struct xdg_activation_v1 *xdg_activation_v1, const char *token, struct wl_surface *surface)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_v1,
XDG_ACTIVATION_V1_ACTIVATE, token, surface);
}
#ifndef XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM
#define XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM
enum xdg_activation_token_v1_error {
/**
* The token has already been used previously
*/
XDG_ACTIVATION_TOKEN_V1_ERROR_ALREADY_USED = 0,
};
#endif /* XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM */
/**
* @ingroup iface_xdg_activation_token_v1
* @struct xdg_activation_token_v1_listener
*/
struct xdg_activation_token_v1_listener {
/**
* the exported activation token
*
* The 'done' event contains the unique token of this activation
* request and notifies that the provider is done.
* @param token the exported activation token
*/
void (*done)(void *data,
struct xdg_activation_token_v1 *xdg_activation_token_v1,
const char *token);
};
/**
* @ingroup iface_xdg_activation_token_v1
*/
static inline int
xdg_activation_token_v1_add_listener(struct xdg_activation_token_v1 *xdg_activation_token_v1,
const struct xdg_activation_token_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) xdg_activation_token_v1,
(void (**)(void)) listener, data);
}
#define XDG_ACTIVATION_TOKEN_V1_SET_SERIAL 0
#define XDG_ACTIVATION_TOKEN_V1_SET_APP_ID 1
#define XDG_ACTIVATION_TOKEN_V1_SET_SURFACE 2
#define XDG_ACTIVATION_TOKEN_V1_COMMIT 3
#define XDG_ACTIVATION_TOKEN_V1_DESTROY 4
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_DONE_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_SET_SERIAL_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_SET_APP_ID_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_SET_SURFACE_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_COMMIT_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_xdg_activation_token_v1 */
static inline void
xdg_activation_token_v1_set_user_data(struct xdg_activation_token_v1 *xdg_activation_token_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_activation_token_v1, user_data);
}
/** @ingroup iface_xdg_activation_token_v1 */
static inline void *
xdg_activation_token_v1_get_user_data(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_activation_token_v1);
}
static inline uint32_t
xdg_activation_token_v1_get_version(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* Provides information about the seat and serial event that requested the
* token.
*
* The serial can come from an input or focus event. For instance, if a
* click triggers the launch of a third-party client, the launcher client
* should send a set_serial request with the serial and seat from the
* wl_pointer.button event.
*
* Some compositors might refuse to activate toplevels when the token
* doesn't have a valid and recent enough event serial.
*
* Must be sent before commit. This information is optional.
*/
static inline void
xdg_activation_token_v1_set_serial(struct xdg_activation_token_v1 *xdg_activation_token_v1, uint32_t serial, struct wl_seat *seat)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_SET_SERIAL, serial, seat);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* The requesting client can specify an app_id to associate the token
* being created with it.
*
* Must be sent before commit. This information is optional.
*/
static inline void
xdg_activation_token_v1_set_app_id(struct xdg_activation_token_v1 *xdg_activation_token_v1, const char *app_id)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_SET_APP_ID, app_id);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* This request sets the surface requesting the activation. Note, this is
* different from the surface that will be activated.
*
* Some compositors might refuse to activate toplevels when the token
* doesn't have a requesting surface.
*
* Must be sent before commit. This information is optional.
*/
static inline void
xdg_activation_token_v1_set_surface(struct xdg_activation_token_v1 *xdg_activation_token_v1, struct wl_surface *surface)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_SET_SURFACE, surface);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* Requests an activation token based on the different parameters that
* have been offered through set_serial, set_surface and set_app_id.
*/
static inline void
xdg_activation_token_v1_commit(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_COMMIT);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* Notify the compositor that the xdg_activation_token_v1 object will no
* longer be used.
*/
static inline void
xdg_activation_token_v1_destroy(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
wl_proxy_marshal((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_DESTROY);
wl_proxy_destroy((struct wl_proxy *) xdg_activation_token_v1);
}
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,84 +0,0 @@
/* Generated by wayland-scanner 1.18.0 */
/*
* Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
* Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface xdg_activation_token_v1_interface;
static const struct wl_interface *xdg_activation_v1_types[] = {
NULL,
&xdg_activation_token_v1_interface,
NULL,
&wl_surface_interface,
NULL,
&wl_seat_interface,
&wl_surface_interface,
};
static const struct wl_message xdg_activation_v1_requests[] = {
{ "destroy", "", xdg_activation_v1_types + 0 },
{ "get_activation_token", "n", xdg_activation_v1_types + 1 },
{ "activate", "so", xdg_activation_v1_types + 2 },
};
WL_PRIVATE const struct wl_interface xdg_activation_v1_interface = {
"xdg_activation_v1", 1,
3, xdg_activation_v1_requests,
0, NULL,
};
static const struct wl_message xdg_activation_token_v1_requests[] = {
{ "set_serial", "uo", xdg_activation_v1_types + 4 },
{ "set_app_id", "s", xdg_activation_v1_types + 0 },
{ "set_surface", "o", xdg_activation_v1_types + 6 },
{ "commit", "", xdg_activation_v1_types + 0 },
{ "destroy", "", xdg_activation_v1_types + 0 },
};
static const struct wl_message xdg_activation_token_v1_events[] = {
{ "done", "s", xdg_activation_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_activation_token_v1_interface = {
"xdg_activation_token_v1", 1,
5, xdg_activation_token_v1_requests,
1, xdg_activation_token_v1_events,
};

View File

@@ -53,9 +53,7 @@ gtest/MetaspaceGtests.java#balanced-no-ccs initial_run generic-all
gtest/MetaspaceGtests.java#reclaim-aggressive-ndebug initial_run generic-all
gtest/LargePageGtests.java#use-large-pages initial_run linux-all,windows-all
gtest/NMTGtests.java#nmt-detail JBR-5718 generic-all
gtest/NMTGtests.java#nmt-off JBR-5718 generic-all
gtest/NMTGtests.java#nmt-summary JBR-5718 generic-all
gtest/NMTGtests.java JBR-5718 generic-all
gc/stress/TestReclaimStringsLeaksMemory.java initial_run windows-all
@@ -258,11 +256,13 @@ vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription
gc/shenandoah/mxbeans/TestChurnNotifications.java#aggressive NO_BUG macosx_all
runtime/cds/appcds/TestDumpClassListSource.java NO_BUG generic_all
runtime/cds/appcds/CommandLineFlagCombo.java NO_BUG generic_all
runtime/cds/appcds/TestDumpClassListSource.java JBR-6099 generic_all
runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java NO_BUG generic_all
runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveUpgrade.java NO_BUG generic_all
runtime/cds/CheckDefaultArchiveFile.java NO_BUG generic_all
serviceability/jvmti/SetBreakpoint/TestManyBreakpoints.java NO_BUG linux_aarch64
vmTestbase/nsk/stress/thread/thread008.java initial_run windows-all
compiler/vectorapi/VectorRebracket128Test.java NO_BUG linux_aarch64

View File

@@ -785,252 +785,3 @@ jdk_containers_extended = \
:jdk_io \
:jdk_nio \
:jdk_svc
# Wayland tests to be executed with -Dawt.toolkit.name=WLToolkit
jdk_awt_wayland = \
:jdk_awt \
jb/java/awt/wayland \
-com/apple/eawt \
-com/apple/laf \
-sun/awt \
-java/awt/a11y \
-java/awt/applet \
-java/awt/BasicStroke/DashOffset.java \
-java/awt/BasicStroke/DashScaleMinWidth.java \
-java/awt/BasicStroke/DashZeroWidth.java \
-java/awt/BorderLayout \
-java/awt/Button \
-java/awt/Checkbox \
-java/awt/Choice \
-java/awt/Clipboard \
-java/awt/ColorClass/AlphaColorTest.java \
-java/awt/Component/7097771 \
-java/awt/Component/CompEventOnHiddenComponent \
-java/awt/Component/ComponentRedrawnTest.java \
-java/awt/Component/CreateImage \
-java/awt/Component/DimensionEncapsulation \
-java/awt/Component/F10TopToplevel \
-java/awt/Component/GetListenersTest.java \
-java/awt/Component/GetScreenLocTest \
-java/awt/Component/InsetsEncapsulation \
-java/awt/Component/isLightweightCrash \
-java/awt/Component/NativeInLightShow \
-java/awt/Component/NoUpdateUponShow \
-java/awt/Component/PaintAll \
-java/awt/Component/PrintAllXcheckJNI \
-java/awt/Component/RepaintTest.java \
-java/awt/Component/Revalidate \
-java/awt/Component/SetComponentsBounds \
-java/awt/Component/SetEnabledPerformance \
-java/awt/Component/TreeLockDeadlock \
-java/awt/Component/UpdatingBootTime \
-java/awt/Component/Validate \
-java/awt/ComponentOrientation \
-java/awt/Container \
-java/awt/Cursor \
-java/awt/datatransfer/Clipboard/GetContentsInterruptedTest.java \
-java/awt/datatransfer/ClipboardInterVMTest/ClipboardInterVMTest.java \
-java/awt/datatransfer/ConstructFlavoredObjectTest/ConstructFlavoredObjectTest.java \
-java/awt/datatransfer/CustomClassLoaderTransferTest/CustomClassLoaderTransferTest.java \
-java/awt/datatransfer/DataFlavor/DataFlavorRemoteTest.java \
-java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java \
-java/awt/datatransfer/HTMLDataFlavors/ManualHTMLDataFlavorTest.html \
-java/awt/datatransfer/ImageTransfer/ImageTransferTest.java \
-java/awt/datatransfer/Independence/IndependenceAWTTest.java \
-java/awt/datatransfer/Independence/IndependenceSwingTest.java \
-java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java \
-java/awt/datatransfer/SystemSelection/SystemSelectionAWTTest.java \
-java/awt/datatransfer/SystemSelection/SystemSelectionSwingTest.java \
-java/awt/datatransfer/UnicodeTransferTest/UnicodeTransferTest.java \
-java/awt/Debug \
-java/awt/Desktop \
-java/awt/Dialog \
-java/awt/dnd \
-java/awt/EmbeddedFrame \
-java/awt/event \
-java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java \
-java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java \
-java/awt/EventDispatchThread/PropertyPermissionOnEDT/PropertyPermissionOnEDT.java \
-java/awt/EventQueue/6980209/bug6980209.java \
-java/awt/FileDialog \
-java/awt/FlowLayout \
-java/awt/Focus/6378278 \
-java/awt/Focus/6382144 \
-java/awt/Focus/6401036 \
-java/awt/Focus/6981400 \
-java/awt/Focus/8000326 \
-java/awt/Focus/8013611 \
-java/awt/Focus/8073453 \
-java/awt/Focus/8282640 \
-java/awt/Focus/ActualFocusedWindowTest \
-java/awt/Focus/AppletInitialFocusTest \
-java/awt/Focus/AsyncUpFocusCycleTest.java \
-java/awt/Focus/AutoRequestFocusTest \
-java/awt/Focus/Cause \
-java/awt/Focus/ChildWindowFocusTest \
-java/awt/Focus/ChoiceFocus \
-java/awt/Focus/ClearGlobalFocusOwnerTest \
-java/awt/Focus/ClearLwQueueBreakTest \
-java/awt/Focus/ClearMostRecentFocusOwnerTest.java \
-java/awt/Focus/CloseDialogActivateOwnerTest \
-java/awt/Focus/ConsumedTabKeyTest.java \
-java/awt/Focus/ConsumeNextKeyTypedOnModalShowTest \
-java/awt/Focus/ContainerFocusAutoTransferTest \
-java/awt/Focus/DeiconifiedFrameLoosesFocus \
-java/awt/Focus/DisposedWindow \
-java/awt/Focus/EventRetargetTest.java \
-java/awt/Focus/ExtraPropChangeNotifVetoingTest.java \
-java/awt/Focus/FocusEmbeddedFrameTest \
-java/awt/Focus/FocusForRemovedComponentTest.java \
-java/awt/Focus/FocusOwnerFrameOnClick \
-java/awt/Focus/FocusSubRequestTest \
-java/awt/Focus/FocusTransitionTest \
-java/awt/Focus/FocusTraversalPolicy \
-java/awt/Focus/FocusTraversalPolicyIAE.java \
-java/awt/Focus/FrameJumpingToMouse \
-java/awt/Focus/FrameMinimizeTest \
-java/awt/Focus/IconifiedFrameFocusChangeTest \
-java/awt/Focus/InitialFocusTest.java \
-java/awt/Focus/InputVerifierTest3 \
-java/awt/Focus/KeyEventForBadFocusOwnerTest \
-java/awt/Focus/LabelScrollBarFocus.java \
-java/awt/Focus/ModalBlockedStealsFocusTest \
-java/awt/Focus/ModalDialogActivationTest \
-java/awt/Focus/ModalDialogInFocusEventTest.java \
-java/awt/Focus/ModalDialogInitialFocusTest \
-java/awt/Focus/ModalExcludedWindowClickTest \
-java/awt/Focus/MouseClickRequestFocusRaceTest \
-java/awt/Focus/NoAutotransferToDisabledCompTest \
-java/awt/Focus/NoFocusOwnerAWTTest.java \
-java/awt/Focus/NoFocusOwnerSwingTest.java \
-java/awt/Focus/NonFocusableBlockedOwnerTest \
-java/awt/Focus/NonFocusableResizableTooSmall \
-java/awt/Focus/NonFocusableWindowTest \
-java/awt/Focus/NullActiveWindowOnFocusLost \
-java/awt/Focus/OwnedWindowFocusIMECrashTest \
-java/awt/Focus/QuickTypeTest.java \
-java/awt/Focus/RemoveAfterRequest \
-java/awt/Focus/RequestFocusAndHideTest \
-java/awt/Focus/RequestFocusByCause \
-java/awt/Focus/RequestFocusToDisabledCompTest \
-java/awt/Focus/RequestOnCompWithNullParent \
-java/awt/Focus/ResetMostRecentFocusOwnerTest \
-java/awt/Focus/RestoreFocusInfiniteLoopTest.java \
-java/awt/Focus/RestoreFocusOnDisabledComponentTest \
-java/awt/Focus/RollbackFocusFromAnotherWindowTest \
-java/awt/Focus/RowToleranceTransitivityTest.java \
-java/awt/Focus/SequencedLightweightRequestsTest.java \
-java/awt/Focus/SetFocusableTest.java \
-java/awt/Focus/ShowFrameCheckForegroundTest \
-java/awt/Focus/SimpleWindowActivationTest \
-java/awt/Focus/SortingFPT \
-java/awt/Focus/TemporaryLostComponentDeadlock.java \
-java/awt/Focus/ToFrontFocusTest \
-java/awt/Focus/TranserFocusToWindow \
-java/awt/Focus/TraversalKeysPropertyNamesTest.java \
-java/awt/Focus/TypeAhead \
-java/awt/Focus/UnaccessibleChoice \
-java/awt/Focus/UpFocusCycleTest.java \
-java/awt/Focus/VetoableChangeListenerLoopTest.java \
-java/awt/Focus/WindowInitialFocusTest \
-java/awt/Focus/WindowIsFocusableAccessByThreadsTest \
-java/awt/Focus/WindowUpdateFocusabilityTest \
-java/awt/Focus/WrongKeyTypedConsumedTest \
-java/awt/font/TextLayout/MyanmarTextTest.java \
-java/awt/font/TextLayout/TestJustification.html \
-java/awt/font/TextLayout/TestOldHangul.java \
-java/awt/font/TextLayout/TestTibetan.java \
-java/awt/font/TextLayout/TestVS.java \
-java/awt/font/TextLayout/VariationSelectorTest.java \
-java/awt/FontClass/FontAccess.java \
-java/awt/Frame \
-java/awt/FullScreen/8013581 \
-java/awt/FullScreen/AllFramesMaximize \
-java/awt/FullScreen/AltTabCrashTest \
-java/awt/FullScreen/BufferStrategyExceptionTest \
-java/awt/FullScreen/FullScreenInsets \
-java/awt/FullScreen/FullscreenWindowProps \
-java/awt/FullScreen/TranslucentWindow \
-java/awt/grab \
-java/awt/Graphics/DrawOvalTest.java \
-java/awt/Graphics/LCDTextAndGraphicsState.java \
-java/awt/Graphics/TextAAHintsTest.java \
-java/awt/Graphics/XORPaint.java \
-java/awt/Graphics2D/CopyAreaOOB.java \
-java/awt/GraphicsDevice/DisplayModes/CompareToXrandrTest.java \
-java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java \
-java/awt/GridBagLayout \
-java/awt/GridLayout \
-java/awt/Gtk \
-java/awt/hidpi \
-java/awt/Icon \
-java/awt/im \
-java/awt/image/BufferStrategy/ExceptionAfterComponentDispose.java \
-java/awt/image/MemoryLeakTest/MemoryLeakTest.java \
-java/awt/image/OpaquePNGToGIFTest.java \
-java/awt/image/VolatileImage/DrawBufImgOp.java \
-java/awt/image/VolatileImage/TransparentVImage.java \
-java/awt/image/mlib/MlibOpsTest.java \
-java/awt/image/multiresolution/MenuMultiresolutionIconTest.java \
-java/awt/image/multiresolution/MultiDisplayTest/MultiDisplayTest.java \
-java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java \
-java/awt/image/multiresolution/MultiresolutionIconTest.java \
-java/awt/Insets/CombinedTestApp1.java \
-java/awt/Insets/RemoveMenuBarTest.java \
-java/awt/InputMethods \
-java/awt/JAWT \
-java/awt/keyboard \
-java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest \
-java/awt/KeyboardFocusmanager/TypeAhead \
-java/awt/Label \
-java/awt/Layout \
-java/awt/LightweightComponent \
-java/awt/LightweightDispatcher \
-java/awt/List \
-java/awt/Menu \
-java/awt/MenuBar \
-java/awt/MenuItem \
-java/awt/Mixing \
-java/awt/Modal \
-java/awt/Mouse \
-java/awt/MouseAdapter \
-java/awt/MouseInfo \
-java/awt/MultipleGradientPaint \
-java/awt/Multiscreen/MouseEventTest/MouseEventTest.java \
-java/awt/Multiscreen/MultiScreenInsetsTest/MultiScreenInsetsTest.java \
-java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java \
-java/awt/Paint/bug8024864.java \
-java/awt/Paint/ButtonRepaint.java \
-java/awt/Paint/CheckboxRepaint.java \
-java/awt/Paint/ComponentIsNotDrawnAfterRemoveAddTest \
-java/awt/Paint/ExposeOnEDT.java \
-java/awt/Paint/LabelRepaint.java \
-java/awt/Paint/ListRepaint.java \
-java/awt/Paint/PaintNativeOnUpdate.java \
-java/awt/Panel \
-java/awt/PopupMenu \
-java/awt/print \
-java/awt/PrintJob \
-java/awt/Robot \
-java/awt/Scrollbar \
-java/awt/ScrollPane \
-java/awt/security \
-java/awt/SplashScreen \
-java/awt/TextArea \
-java/awt/TextComponent \
-java/awt/TextField \
-java/awt/Toolkit/BadDisplayTest/BadDisplayTest.java \
-java/awt/Toolkit/DesktopProperties/rfe4758438.java \
-java/awt/Toolkit/DynamicLayout/bug7172833.java \
-java/awt/Toolkit/Headless/GetPrintJob/GetPrintJob.java \
-java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh \
-java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java \
-java/awt/Toolkit/RealSync/Test.java \
-java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java \
-java/awt/Toolkit/SecurityTest/SecurityTest2.java \
-java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java \
-java/awt/TrayIcon \
-java/awt/wakefield \
-java/awt/Window \
-java/awt/WMSpecificTests \
-java/awt/xembed

View File

@@ -146,7 +146,6 @@ public class RowToleranceTransitivityTest {
if (!setFocusOn(cb, new Runnable() {
public void run() {
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
}
})) {
System.out.println("Focus got stuck while traversing.");

View File

@@ -182,6 +182,13 @@ public class FontExtensionsTest {
return !textDrawingEquals(BASE_FONT, fontWithFeatures(FontExtensions.FeatureTag.FRAC), FRACTION_STRING);
}
@JBRTest
private static Boolean testFeaturesZeroFrac() {
Font fontFZ = fontWithFeatures(FontExtensions.FeatureTag.FRAC, FontExtensions.FeatureTag.ZERO);
return !textDrawingEquals(fontFZ, fontWithFeatures(FontExtensions.FeatureTag.FRAC), ZERO_STRING + " " + FRACTION_STRING) &&
!textDrawingEquals(fontFZ, fontWithFeatures(FontExtensions.FeatureTag.ZERO), ZERO_STRING + " " + FRACTION_STRING);
}
@JBRTest
private static Boolean testFeaturesDerive1() {
Font fontFZ1 = fontWithFeatures(FontExtensions.FeatureTag.FRAC, FontExtensions.FeatureTag.ZERO).

View File

@@ -1,79 +0,0 @@
import java.awt.*;
import java.lang.reflect.InvocationTargetException;
/*
* @test
* @summary JBR-6060 Verify that the focus traverse to the next component if the current focused became invisible
* @run main/othervm FocusTraversalOrderTest
*/
public class FocusTraversalOrderTest {
private static Frame frame;
private static Button button0, button1, button2, button3, button4;
public static void main(String... args) throws InterruptedException, InvocationTargetException, AWTException {
Robot robot = new Robot();
try {
EventQueue.invokeAndWait(() -> {
frame = new Frame();
frame.setLayout(new FlowLayout());
frame.setFocusTraversalPolicy(new ContainerOrderFocusTraversalPolicy());
button0 = new Button();
button0.setFocusable(true);
frame.add(button0);
button1 = new Button();
button1.setFocusable(true);
frame.add(button1);
button2 = new Button();
button2.setFocusable(true);
frame.add(button2);
button3 = new Button();
button3.setFocusable(true);
frame.add(button3);
button4 = new Button();
button4.setFocusable(true);
frame.add(button4);
frame.pack();
frame.setVisible(true);
});
frame.requestFocus();
frame.toFront();
robot.waitForIdle();
button2.requestFocusInWindow();
robot.waitForIdle();
button2.setVisible(false);
robot.waitForIdle();
boolean isRightFocus = button3.isFocusOwner();
if (!isRightFocus) {
System.out.println("ERROR: button3 expected to be focus owner");
}
FocusTraversalPolicy focusTraversalPolicy = frame.getFocusTraversalPolicy();
Component compAfterButton2 = focusTraversalPolicy.getComponentAfter(frame, button2);
boolean isRightNextComp = compAfterButton2.equals(button3);
if (!isRightNextComp) {
System.out.println("ERROR: the next component after button2 expected to be button3, but got " + compAfterButton2.getName());
}
if (!(isRightFocus && isRightNextComp)) {
throw new RuntimeException("TEST FAILED: the next component didn't gain the focus");
} else {
System.out.println("TEST PASSED");
}
} finally {
EventQueue.invokeAndWait(() -> {
if (frame != null) {
frame.dispose();
}
});
}
}
}

View File

@@ -1,141 +0,0 @@
/*
* Copyright (c) 2023, 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.
*/
/*
* @test
* @summary A manual test of JBR-5984 bug checks if an IM's window is placed above Swing's/AWT's popups
* @author Nikita Provotorov
* @requires (os.family == "mac")
* @key headful
* @run main/othervm/manual -Xcheck:jni ImWindowIsPlacedUnderPopup5984
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
public class ImWindowIsPlacedUnderPopup5984 extends JFrame {
static final CompletableFuture<RuntimeException> swingError = new CompletableFuture<>();
public static void main(String[] args) throws InterruptedException, InvocationTargetException, ExecutionException {
final ImWindowIsPlacedUnderPopup5984 frame;
{
final CompletableFuture<ImWindowIsPlacedUnderPopup5984> frameFuture = new CompletableFuture<>();
SwingUtilities.invokeAndWait(() -> {
try {
final var result = new ImWindowIsPlacedUnderPopup5984();
result.setVisible(true);
frameFuture.complete(result);
} catch (Throwable err) {
frameFuture.completeExceptionally(err);
}
});
frame = frameFuture.get();
}
try {
final var err = swingError.get();
if (err != null) {
throw err;
}
} finally {
if (frame != null) {
SwingUtilities.invokeAndWait(frame::dispose);
}
}
}
public ImWindowIsPlacedUnderPopup5984() {
super("JBR-5984");
setDefaultCloseOperation(HIDE_ON_CLOSE);
popupShowingButton = new JButton("Show a Popup");
add(popupShowingButton, BorderLayout.NORTH);
instructionTextArea = new JTextArea();
instructionTextArea.setLineWrap(true);
instructionTextArea.setWrapStyleWord(true);
instructionTextArea.setText(
"""
INSTRUCTION:
1. Switch the input source to an input method (e.g. "Pinyin - Simplified");
2. Press the "Show a Popup" button;
3. Start typing into the text field on the shown popup;
4. Check if the input candidates' popup is shown above the java popup:
4.1. If it's shown above, press the "PASS" button;
4.2. Otherwise, press the "FAIL" button.
"""
);
instructionTextArea.setEditable(false);
add(instructionTextArea, BorderLayout.CENTER);
final JPanel southContainer = new JPanel(new BorderLayout());
failTestButton = new JButton("FAIL");
passTestButton = new JButton("PASS");
southContainer.add(failTestButton, BorderLayout.LINE_START);
southContainer.add(passTestButton, BorderLayout.LINE_END);
add(southContainer, BorderLayout.SOUTH);
popupPanel = new JPanel();
popupTextField = new JTextArea();
popupTextField.setPreferredSize(new Dimension(200, 125));
popupPanel.add(popupTextField);
pack();
setSize(400, 250);
setLocationRelativeTo(null);
popup = new JPopupMenu();
popup.add(popupPanel);
popup.pack();
popupShowingButton.addActionListener(ignored -> popup.show(ImWindowIsPlacedUnderPopup5984.this, 100, 65));
failTestButton.addActionListener(ignored -> swingError.completeExceptionally(new RuntimeException("The tester has pressed FAILED")));
passTestButton.addActionListener(ignored -> swingError.complete(null));
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
swingError.completeExceptionally(new RuntimeException("The window was closed not through the \"PASS\"/\"FAIL\" buttons"));
}
});
}
private final JButton popupShowingButton;
private final JTextArea instructionTextArea;
private final JButton failTestButton;
private final JButton passTestButton;
private final JPanel popupPanel;
private final JTextArea popupTextField;
private final JPopupMenu popup;
}

View File

@@ -1,141 +0,0 @@
/*
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 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.
*/
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.concurrent.CountDownLatch;
/*
* @test
* @summary Verifies that the program finishes after disposing of JFrame
* @run main WLShutdownTest
*/
public class WLShutdownTest {
private static JFrame frame = null;
public static void main(String[] args) throws Exception {
final CountDownLatch latchShownFrame = new CountDownLatch(1);
final CountDownLatch latchClosedFrame = new CountDownLatch(1);
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
frame = new JFrame("TEST");
frame.addComponentListener(new ComponentAdapter() {
@Override
public void componentShown(ComponentEvent e) {
latchShownFrame.countDown();
}
});
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
latchClosedFrame.countDown();
}
});
JPanel panel = new JPanel() {
int n = 0;
@Override
protected void paintComponent(Graphics g) {
System.out.print("P");
g.setColor((n++ % 2 == 0) ? Color.RED : Color.BLUE);
g.fillRect(0, 0, getWidth(), getHeight());
System.out.print("Q");
}
};
panel.setPreferredSize(new Dimension(800, 800));
panel.setBackground(Color.BLACK);
frame.add(panel);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
System.out.print(">>");
}
});
// Wait frame to be shown:
latchShownFrame.await();
System.out.print(":>>");
final long startTime = System.currentTimeMillis();
final long endTime = startTime + 3000;
// Start 1st measurement:
repaint();
for (; ; ) {
System.out.print(".");
repaint();
if (System.currentTimeMillis() >= endTime) {
break;
}
sleep();
} // end measurements
SwingUtilities.invokeAndWait(() -> {
frame.setVisible(false);
frame.dispose();
});
latchClosedFrame.await();
System.out.print("<<\n");
frame = null; // free static ref: gc
System.out.println("Waiting AWT to shutdown JVM soon ...");
}
static void repaint() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
frame.repaint();
}
});
}
static void sleep() {
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
ie.printStackTrace(System.err);
}
}
}

View File

@@ -29,8 +29,6 @@
* @requires (jdk.version.major >= 8 & os.family == "mac")
*/
import sun.lwawt.macosx.LWCToolkit;
import static java.awt.event.KeyEvent.*;
public class KeyCodesTest implements Runnable {
@@ -142,10 +140,6 @@ public class KeyCodesTest implements Runnable {
}
private void verify(String typed, int vk, String layout, int key, int charKeyCode, int location, int modifiers) {
if (!LWCToolkit.isKeyboardLayoutInstalled(layout)) {
System.out.printf("WARNING: Skipping key code test, vk = %d, layout = %s: this layout is not installed", vk, layout);
return;
}
char ch = (typed.length() == 1) ? typed.charAt(0) : 0;
InputMethodTest.section("Key code test: " + vk + ", layout: " + layout + ", char: " + String.format("U+%04X", (int)ch));
InputMethodTest.layout(layout);

View File

@@ -1,48 +1,6 @@
java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java 8202931,JBR-5398 macosx-all,linux-all,windows-all
java/awt/Debug/X11Trace.java JBR-5442 linux-all
java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java JBR-6058 windows-all
java/awt/FullScreen/CurrentDisplayModeTest/CurrentDisplayModeTest.java JBR-5059 linux-all
java/awt/FullScreen/MultimonFullscreenTest/MultimonDeadlockTest.java JBR-4379 windows-all
java/awt/Frame/FramesGC/FramesGC.java JBR-6057 windows-all
java/awt/GraphicsDevice/DisplayModes/CompareToXrandrTest.java JBR-5062 linux-all
java/awt/datatransfer/Clipboard/GetContentsInterruptedTest.java JBR-5086 linux-5.15.0-46-generic Ubuntu 20.04
java/awt/dnd/MissedDragEnterTest.java JBR-6091 windows-all
java/awt/Frame/FramesGC/FramesGC.java JBR-6057 windows-all
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-5117 linux-all
java/awt/LightweightDispatcher/LWDispatcherMemoryLeakTest.java 8311535 windows-all
java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java#id1 JBR-5442 linux-all
java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java 8253184,JBR-5442 windows-all,linux-all
java/awt/MouseInfo/MultiscreenPointerInfo.java JBR-5442 linux-all
java/awt/Multiscreen/LocationRelativeToTest/LocationRelativeToTest.java 8253184,JBR-5442 windows-all,linux-all
java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java JBR-5442 linux-all
java/awt/Multiscreen/WindowGCChangeTest/WindowGCChangeTest.java JBR-5531,JBR-5442 macosx-all,linux-all
java/awt/Multiscreen/UpdateGCTest/UpdateGCTest.java JBR-5442 linux-all
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-5442 windows-all,linux-all
java/awt/Robot/CheckCommonColors/CheckCommonColors.java 8253184,JBR-5510,JBR-5442,JBR-6092 windows-all,linux-all,macosx-aarch64
java/awt/Robot/CheckCommonColors/CheckCommonColors.java JBR-6092 macosx-aarch64
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184,JBR-5442 windows-all,linux-all
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-5390 macosx-all,linux-all
java/awt/Robot/NonEmptyErrorStream.java JBR-5442 linux-all
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
java/awt/Window/WindowSizeDifferentScreens/WindowSizeDifferentScreens.java JBR-5442 linux-all
java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java JBR-5442 linux-all
java/awt/im/memoryleak/InputContextMemoryLeakTest.java JBR-6065 windows-all
java/awt/image/VolatileImage/DrawHugeImageTest.java JBR-5442 linux-all
javax/swing/GraphicsConfigNotifier/TestMultiScreenGConfigNotify.java JBR-5442 linux-all
javax/swing/JComboBox/TestComboBoxComponentRendering.java JBR-6100 linux-all
javax/swing/JInternalFrame/Test6325652.java JBR-6065 windows-all
javax/swing/JMenu/4692443/bug4692443.java JBR-6065 windows-all
javax/swing/JMenuBar/4750590/bug4750590.java JBR-6065 windows-all
javax/swing/JMenuItem/4171437/bug4171437.java JBR-6065 windows-all
javax/swing/JTable/7124218/SelectEditTableCell.java JBR-5442 linux-all
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java 8253184 windows-all
javax/swing/JTextField/8036819/bug8036819.java JBR-6065 windows-all
javax/swing/JTree/4927934/bug4927934.java JBR-6065 windows-all
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-5442 linux-all
javax/swing/plaf/metal/MetalGradient/8163193/ButtonGradientTest.java 8253184,JBR-5510,JBR-5442 windows-all,linux-all
javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java JBR-5442 linux-all
javax/swing/text/html/StyleSheet/bug4936917.java JBR-899,JBR-5510,JBR-5442 windows-all,linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-5442 windows-x64,linux-all
java/awt/Multiscreen/WindowGCChangeTest/WindowGCChangeTest.java JBR-5531 macosx-all

View File

@@ -142,7 +142,6 @@ java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_2.java 820420
java/awt/event/MouseWheelEvent/InfiniteRecursion/InfiniteRecursion_4.java 8204200 windows-all,macosx-all,linux-all
java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java 8029680 generic-all
java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java JBR-5730 linux-all
java/awt/dnd/NextDropActionTest/NextDropActionTest.java 8313633 macosx-aarch64
java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java 8288839,JBR-5727,JBR-5959 windows-x64,linux-all, windows-aarch64
java/awt/dnd/URIListBetweenJVMsTest/URIListBetweenJVMsTest.java 8171510,JBR-881 macosx-all,linux-all
javax/swing/dnd/7171812/bug7171812.java 8041447,8253184 macosx-all,windows-all
@@ -344,9 +343,9 @@ java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java 8017454 macosx-all
java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java JBR-5210 windows-all
java/awt/Frame/MiscUndecorated/ActiveSwingWindowTest.java JBR-5210 windows-all
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/Frame/MiscUndecorated/RepaintTest.java 8266244,JBR-5786 macosx-aarch64,linux-all
java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java 8253184 windows-all
java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 7186009,8253184 macosx-all,windows-all
java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 7186009,8253184,JBR-5827 macosx-all,windows-all,linux-all
java/awt/Modal/FileDialog/FileDialogAppModal2Test.java 7186009,8253184 macosx-all,windows-all
java/awt/Modal/FileDialog/FileDialogAppModal3Test.java 7186009,8253184 macosx-all,windows-all
java/awt/Modal/FileDialog/FileDialogAppModal4Test.java 7186009,8253184 macosx-all,windows-all
@@ -634,7 +633,6 @@ java/awt/Mouse/MouseWheelAbsXY/MouseWheelAbsXY.java 8253184 windows-all
java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java 6847163 linux-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 linux-5.4.0-1103-aws
java/awt/Frame/DisposeParentGC/DisposeParentGC.java 8079786 macosx-all
java/awt/GraphicsDevice/CheckDisplayModes.java 8266242 macosx-aarch64
@@ -664,7 +662,6 @@ java/awt/GridLayout/ComponentPreferredSize/ComponentPreferredSize.java 8238720 w
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720 windows-all
java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java 8238720 windows-all
java/awt/wakefield/RobotKeyboard.java JBR-5653 linux-all
java/awt/wakefield/ScreenCapture.java JBR-5653 linux-all
# Several tests which fail sometimes on macos11
@@ -877,13 +874,12 @@ javax/imageio/plugins/external_plugin_tests/TestClassPathPlugin.sh JBR-5363 wind
javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java 8194945 macosx-all
javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java 8253184 windows-all
javax/swing/plaf/basic/BasicTableHeaderUI/6394566/bug6394566.java JBR-5846 windows-all
javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java 8233177 linux-all,windows-all
javax/swing/plaf/basic/BasicTreeUI/8023474/bug8023474.java 8253184 linux-all,windows-all
javax/swing/plaf/nimbus/8041642/bug8041642.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
javax/swing/plaf/nimbus/8057791/bug8057791.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
javax/swing/plaf/nimbus/TestNimbusBGColor.java JBR-5359 windows-aarch64
javax/swing/plaf/nimbus/TestNimbusOverride.java 8253184, JBR-5829 windows-all,linux-all
javax/swing/plaf/nimbus/TestNimbusOverride.java 8253184 windows-all
javax/swing/plaf/windows/6921687/bug6921687.java 8253184 windows-all
javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java JBR-4372 windows-all
@@ -898,21 +894,14 @@ javax/swing/JColorChooser/Test6524757.java JBR-5210 windows-all
javax/swing/JColorChooser/Test6827032.java JBR-5210 windows-all
javax/swing/JComboBox/6406264/bug6406264.java JBR-5210 windows-all
javax/swing/JComboBox/bug4890345.java JBR-5799 windows-all
javax/swing/JComboBox/bug4924758.java JBR-5846 windows-all
javax/swing/JComboBox/bug5029504.java JBR-5799 windows-all
javax/swing/JComponent/6683775/bug6683775.java 8172337 generic-all
javax/swing/JDialog/Transparency/TransparencyTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
javax/swing/JLabel/4138746/JLabelMnemonicsTest.java JBR-4949 linux-all,windows-all
javax/swing/JLabel/6596966/bug6596966.java 8197552 windows-all
javax/swing/JLabel/7004134/bug7004134.java JBR-5437 linux-all
javax/swing/JMenu/4213634/bug4213634.java 8197552 windows-all
javax/swing/JMenu/4515762/bug4515762.java 8197552 windows-all
javax/swing/JMenu/4692443/bug4692443.java JBR-6093 windows-x64
javax/swing/JMenu/6470128/bug6470128.java 8253184 windows-all
javax/swing/JMenu/6538132/bug6538132.java JBR-894 windows-all00
javax/swing/JMenu/PopupReferenceMemoryLeak.java JBR-5890,JBR-6056 windows-aarch64,windows-x64
javax/swing/JMenuBar/4750590/bug4750590.java JBR-6094 windows-x64
javax/swing/JMenuItem/4171437/bug4171437.java JBR-6112 windows-x64
javax/swing/JMenuItem/4654927/bug4654927.java JBR-164 windows-all
javax/swing/JMenuItem/4654927/bug4654927.java JBR-164,JBR-4337 windows-all,linux-all
javax/swing/JMenuItem/6209975/bug6209975.java 8253184 windows-all
@@ -955,7 +944,6 @@ javax/swing/JEditorPane/bug4714674.java JBR-5810 windows-all
javax/swing/JComboBox/DisabledComboBoxFontTestAuto.java 8310072 linux-all,windows-all
javax/swing/JEditorPane/JEditorPaneGCSwitchTest/JEditorPaneGCSwitchTest_i18n.java JBR-912 windows-all
javax/swing/JEditorPane/JEditorPaneGCSwitchTest/JEditorPaneGCSwitchTest.java JBR-912 windows-all
javax/swing/JFileChooser/4524490/bug4524490.java JBR-5846 windows-all
javax/swing/JFileChooser/8021253/bug8021253.java JBR-107 windows-all
javax/swing/JFileChooser/8041694/bug8041694.java JBR-5210 windows-all
javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8198003 generic-all
@@ -963,7 +951,7 @@ javax/swing/JFileChooser/6520101/bug6520101.java JBR-5703 linux-5.8.0-1032-raspi
javax/swing/JFileChooser/6570445/bug6570445.java JBR-5767 windows-all
javax/swing/JFileChooser/6738668/bug6738668.java JBR-5767 windows-all
javax/swing/JFileChooser/7036025/bug7036025.java JBR-5767 windows-all
javax/swing/JFileChooser/8062561/bug8062561.java JBR-5767,JBR-5808 windows-all
javax/swing/JFileChooser/8062561/bug8062561.java JBR-5767 windows-all
javax/swing/JFileChooser/8194044/FileSystemRootTest.java JBR-5767 windows-all
javax/swing/JFileChooser/ShellFolderQueries/ShellFolderQueriesSecurityManagerTest.java JBR-5767 windows-all
javax/swing/JFrame/8016356/bug8016356.java JBR-108 windows-all
@@ -976,11 +964,9 @@ javax/swing/JTabbedPane/4361477/bug4361477.java JBR-5932 linux-all
javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922,8197552 macosx-all,windows-all 8064922:macosx-all, 8197552:windows-all
javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java 8253184,windows-all
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/SwingUtilities/TestBadBreak/TestBadBreak.java 8160720 generic-all
javax/swing/text/AbstractDocument/8190763/TestCCEOnEditEvent.java JBR-5799 windows-all
javax/swing/text/DefaultCaret/HidingSelection/HidingSelectionTest.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/text/TableView/TableViewLayoutTest.java 8194936,JBR-4316,JBR-5510 linux-5.18.2-arch1-1,linux-all
javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all
@@ -991,7 +977,6 @@ 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/Test6325652.java JBR-6111 windows-all
javax/swing/JInternalFrame/Test6505027.java JBR-5954 linux-all,osx-all
javax/swing/JInternalFrame/Test6802868.java 8253184 windows-all
javax/swing/JPopupMenu/4634626/bug4634626.java 8253184 windows-all
@@ -1017,7 +1002,6 @@ javax/swing/JInternalFrame/5066752/bug5066752.java 8253184,JBR-5510 windows-all,
javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
javax/swing/JInternalFrame/8020708/bug8020708.java JBR-4879 windows-all
javax/swing/JInternalFrame/8069348/bug8069348.java 8253184,JBR-900 macosx-aarch64,windows-all
javax/swing/ToolTipManager/Test6256140.java 8197552 windows-all
javax/swing/text/DefaultEditorKit/4278839/bug4278839.java CODETOOLS-7901623 windows-all
javax/swing/text/GlyphPainter2/6427244/bug6427244.java JBR-896 windows-all
javax/swing/text/JTextComponent/5074573/bug5074573.java CODETOOLS-7901623,JBR-5386 windows-all,linux-all
@@ -1026,7 +1010,7 @@ javax/swing/text/StyledEditorKit/4506788/bug4506788.java JBR-180 windows-all
javax/swing/text/View/8014863/bug8014863.java JBR-5541 windows-all
javax/swing/text/View/8156217/FPMethodCalledTest.java JBR-5541 linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952 windows-x64
javax/swing/UIDefaults/6795356/TableTest.java JBR-5767 windows-all
javax/swing/UIDefaults/6795356/TableTest.java.TableTest JBR-5767 windows-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184 windows-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184 windows-all
java/awt/Robot/CheckCommonColors/CheckCommonColors.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
@@ -1039,8 +1023,7 @@ sanity/client/SwingSet/src/DialogDemoTest.java 8253184 windows-all
sanity/client/SwingSet/src/FrameDemoTest.java 8253184 windows-all
sanity/client/SwingSet/src/InternalFrameDemoTest.java 8253184 windows-all
sanity/client/SwingSet/src/GridBagLayoutDemoTest.java 8253184 windows-all
sanity/client/SwingSet/src/TextFieldDemoTest.java JBR-5061 linux-all Ubuntu-22.04
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
sanity/client/SwingSet/src/TextFieldDemoTest.java JBR-5061 linux-5.15.0-39-generic Ubuntu-22.04
sanity/client/SwingSet/src/SliderDemoTest.java 8253184 windows-all
sanity/client/SwingSet/src/SpinnerDemoTest.java 8253184 windows-all
sanity/client/SwingSet/src/SplitPaneDemoTest.java JBR-5817 linux-5.19.0-1025-aws
@@ -1171,8 +1154,6 @@ java/awt/font/EmojiVariation.java JBR-5009,JBR-5510 linux-aarch64,linux-5.18.2-a
java/awt/font/TextLayout/TestJustification.html 8250791 macosx-all
java/awt/font/TextLayout/TestSinhalaChar.java JBR-5103 generic-all
javax/swing/JTableHeader/6889007/bug6889007.java 8310238,8253184,JBR-5387 macosx-all,windows-all,linux-all
javax/swing/JTextField/8036819/bug8036819.java JBR-6113 windows-x64
javax/swing/JTree/4927934/bug4927934.java JBR-6114 windows-x64
java/awt/TrayIcon/DragEventSource/DragEventSource.java 8252242 macosx-all
java/awt/FileDialog/DefaultFocusOwner/DefaultFocusOwner.java 7187728 macosx-all,linux-all
java/awt/FileDialog/RegexpFilterTest/RegexpFilterTest.html 7187728 macosx-all,linux-all
@@ -1185,7 +1166,6 @@ java/awt/TextArea/TextAreaTwicePack/TextAreaTwicePack.java 8253184 windows-all
java/awt/TextField/OverScrollTest/OverScrollTest.java 8253184 windows-all
java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter.java 8254841 macosx-all
java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 8256289,JBR-5359 windows-x64,windows-aarch64
java/awt/Focus/RemoveAfterRequest/RemoveAfterRequest.java JBR-6052 macosx-all,linux-all
java/awt/Focus/RowToleranceTransitivityTest.java JBR-5751 windows-all
java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 8258103,8253184 linux-all,windows-all
@@ -1242,7 +1222,6 @@ com/sun/java/swing/plaf/windows/AltFocusIssueTest.java
java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java JBR-4207 windows-all
jb/java/awt/Graphics2D/TextRender/OGLMetalTextRender.java JBR-5392 windows-aarch64
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTestLinux.sh JBR-4078 linux-all
jb/java/awt/event/MouseEvent/ReleaseAndClickModifiers.java JBR-5366 windows-all
jb/java/awt/Font/Font467.java JBR-3960 generic-all
jb/java/awt/keyboard/AltGrMustGenerateAltGrModifierTest4207.java JBR-4207 windows-all
jb/java/awt/Toolkit/AWTThreadingTest.java JBR-4350 macosx-all
@@ -1279,7 +1258,6 @@ javax/swing/JSpinner/JSpinnerFocusTest.java JBR-5288 windows-all
javax/swing/JSpinner/SpinnerTest.java JBR-4880 windows-all
javax/swing/JSpinner/TestJSpinnerFocusLost.java JBR-5210 windows-all
javax/swing/JTable/7068740/bug7068740.java 8197552 windows-all
javax/swing/JTable/8236907/LastVisibleRow.java JBR-6066 macosx-aarch64
javax/swing/text/FlowView/LayoutTest.java JBR-4880 windows-all
javax/swing/text/html/7189299/bug7189299.java JBR-4880 windows-all
jb/java/jcef/HandleJSQueryTest3314.sh JBR-4866 linux-all
@@ -1341,7 +1319,6 @@ javax/sound/sampled/Mixers/BogusMixers.java JBR-4455 linux-aarch64
java/awt/Choice/RemoveAllShrinkTest/RemoveAllShrinkTest.java JBR-5359,JBR-5510,8310487 windows-aarch64,linux-5.18.2-arch1-1,linux-all
java/awt/Choice/ResizeAutoClosesChoice/ResizeAutoClosesChoice.java JBR-5359,JBR-5510,JBR-5905 windows-aarch64,linux-5.18.2-arch1-1,linux-all
java/awt/Choice/SelectNewItemTest/SelectNewItemTest.java 8315733 macosx-all
java/awt/ColorClass/XRenderTranslucentColorDrawTest.java JBR-5359 windows-aarch64
java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
java/awt/Graphics/CopyScaledArea/CopyScaledAreaTest.java JBR-5359 windows-aarch64
@@ -1367,7 +1344,6 @@ java/awt/image/VolatileImage/ReportRenderingError.java#windows JBR-5359 windows-
java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
java/awt/Mixing/AWT_Mixing/JInternalFrameOverlapping.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
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
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
@@ -1390,26 +1366,24 @@ jb/java/awt/CustomTitleBar/HitTestNonClientArea.java JBR-5465,JBR-5550 windows-a
jb/java/awt/CustomTitleBar/MaximizeWindowTest.java JBR-5465,JBR-5550 windows-all
jb/java/awt/CustomTitleBar/MaximizedWindowFocusTest.java JBR-5828 windows-all
jb/java/awt/CustomTitleBar/MinimizingWindowTest.java JBR-5359,JBR-5345 windows-aarch64,windows-x64
jb/java/awt/CustomTitleBar/MouseEventsOnClientArea.java JBR-5910 windows-x64
jb/java/awt/CustomTitleBar/NativeControlsVisibilityTest.java JBR-5359,JBR-5345 windows-aarch64,windows-x64
jb/java/awt/CustomTitleBar/WindowsControlWidthTest.java JBR-5359,JBR-5345 windows-aarch64,windows-x64
jb/java/awt/CustomTitleBar/WindowResizeTest.java JBR-5592 windows-all
sanity/client/SwingSet/src/EditorPaneDemoTest.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
sun/java2d/AcceleratedXORModeTest.java JBR-5359 windows-aarch64
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5359,JBR-5366,JBR-5510 windows-all,linux-5.18.2-arch1-1
sun/java2d/GdiRendering/InsetClipping.java 7124403,JBR-5359,JBR-5366,JBR-5510 windows-all,macosx-all,windows-aarch64,linux-5.18.2-arch1-1
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
sun/java2d/GdiRendering/InsetClipping.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
java/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Insets/DialogInsets.java JBR-5510 linux-5.18.2-arch1-1
java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JMenu/JMenuSelectedColorTest.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JMenuItem/8158566/CloseOnMouseClickPropertyTest.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JSpinner/4670051/DateFieldUnderCursorTest.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JSpinner/4788637/bug4788637.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/LookAndFeel/8145547/DemandGTK2.sh JBR-5510 linux-5.18.2-arch1-1
javax/swing/LookAndFeel/8145547/DemandGTK3.sh JBR-5510 linux-5.18.2-arch1-1
java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java JBR-5765 macosx-all
jb/sun/awt/macos/InputMethodTest/FocusMoveUncommitedCharactersTest.java JBR-5765 macosx-all
jb/java/awt/Focus/FocusTraversalOrderTest.java JBR-6060 generic-all
jb/sun/awt/macos/InputMethodTest/FocusMoveUncommitedCharactersTest.java JBR-5765 macosx-all

View File

@@ -1,47 +1,16 @@
java/awt/Dialog/DialogLocationTest.java JBR-6090 windows-all
java/awt/datatransfer/DragUnicodeBetweenJVMTest/DragUnicodeBetweenJVMTest.java JBR-5538 windows-all
java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java JBR-6027 windows-all
java/awt/dnd/MissedDragEnterTest.java JBR-6091 windows-all
java/awt/event/StressTest/MouseAndKeyEventStressTest.java JBR-6090 windows-all
java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java 8238720,JBR-6095 windows-all,linux-all
java/awt/Focus/6378278/InputVerifierTest.java JBR-6090 windows-all
java/awt/Focus/6382144/EndlessLoopTest.java JBR-6090 windows-all
java/awt/Focus/8282640/ScrollPaneFocusBugTest.java JBR-6090 windows-all
java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java JBR-6090 windows-all
java/awt/Focus/LabelScrollBarFocus.java JBR-6090 windows-x64
java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java JBR-6090 windows-x64
java/awt/Focus/MouseClickRequestFocusRaceTest/MouseClickRequestFocusRaceTest.java JBR-6090 windows-x64
java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java JBR-6089 windows-all
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java JBR-6090 windows-all
java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-6090 windows-all
java/awt/Frame/MaximizedToOppositeScreen/MaximizedToOppositeScreenSmall.java JBR-6090 windows-all
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java JBR-6090 windows-all
java/awt/Frame/WindowDragTest/WindowDragTest.java JBR-6090 windows-x64
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java 8238720,JBR-4199,JBR-6090 linux-5.4.0-1083-aws,linux-5.4.0-1103-aws,windows-all
java/awt/GridLayout/ComponentPreferredSize/ComponentPreferredSize.java JBR-4199,JBR-6090 linux-5.4.0-1083-aws,linux-5.4.0-1103-aws,windows-all
java/awt/datatransfer/DragUnicodeBetweenJVMTest/DragUnicodeBetweenJVMTest.java JBR-5538 windows-all
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
java/awt/GridLayout/ChangeGridSize/ChangeGridSize.java JBR-4199 linux-5.4.0-1083-aws
java/awt/GridLayout/ComponentPreferredSize/ComponentPreferredSize.java JBR-4199 linux-5.4.0-1083-aws
java/awt/Graphics/LineClipTest.java JBR-5071 linux-all
java/awt/image/VolatileImage/DrawHugeImageTest.java JBR-5071,JBR-5359 linux-all,windows-aarch64
java/awt/image/VolatileImage/DrawHugeImageTest.java JBR-5071 linux-all
java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java JBR-5071 linux-all
java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405,JBR-5359,JBR-5510,JBR-6090 macosx-all,windows-aarch64,linux-5.18.2-arch1-1,windows-all
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-5359,JBR-5510,JBR-6090 windows-aarch64,linux-5.18.2-arch1-1,windows-all
java/awt/Mixing/MixingOnDialog.java JBR-6090 windows-all
java/awt/Modal/BlockedMouseInputTest2.java JBR-6090 windows-all
java/awt/PopupMenu/PopupMenuLocation.java 8238720,JBR-5071 windows-all,macosx-all,linux-all
javax/swing/JComboBox/TestComboBoxComponentRendering.java JBR-6100 linux-all
javax/swing/JComponent/7154030/bug7154030.java JBR-6134 windows-x64
javax/swing/JPopupMenu/6580930/bug6580930.java JBR-5071 linux-all
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedPerPixelTranslucentGradient.java JBR-6090 windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedTranslucentPerPixelTranslucentGradient.java JBR-6090 windows-all
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5204 linux-all,windows-all
jb/java/awt/Focus/RequestFocusInParent.java JBR-5715 windows-all
jb/java/awt/Focus/SecondLevelPopupTest.java JBR-6090 windows-all
java/awt/Window/WindowSizeDifferentScreens/WindowSizeDifferentScreens.java JBR-5513 linux-all
jb/java/awt/Window/UndecoratedDialogInTransientsChain.java JBR-6090 windows-all
java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java JBR-6089 windows-all
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java JBR-6089 windows-all
jb/java/awt/Window/ZOrderOnModalDialogActivation.java JBR-5713 windows-all
jdk/editpad/EditPadTest.java JBR-5712 windows-all

View File

@@ -20,9 +20,13 @@ java/awt/KeyboardFocusmanager/TypeAhead/FreezeTest/FreezeTest.java nobug windows
java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.java nobug windows-all
java/awt/MenuBar/SeparatorsNavigation/SeparatorsNavigation.java nobug windows-all
java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java nobug windows-all
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java nobug windows-all
java/awt/Mouse/ExtraMouseClick/ExtraMouseClick.java JBR-4354 windows-all,linux-all # linux: JBR-4354
java/awt/Mouse/MouseComboBoxTest/MouseComboBoxTest.java nobug windows-all
java/awt/Paint/PaintNativeOnUpdate.java nobug windows-all
java/awt/Robot/CheckCommonColors/CheckCommonColors.java nobug windows-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java nobug windows-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java nobug windows-all
java/awt/TextArea/OverScrollTest/OverScrollTest.java nobug windows-all
java/awt/TextField/OverScrollTest/OverScrollTest.java nobug windows-all
java/awt/Window/8159168/SetShapeTest.java nobug windows-all
@@ -48,10 +52,15 @@ javax/swing/JInternalFrame/5066752/bug5066752.java nobug windows-all
javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java nobug windows-all,linux-all
javax/swing/JInternalFrame/Test6505027.java nobug windows-all
javax/swing/JLabel/7004134/bug7004134.java nobug linux-all
javax/swing/JMenu/4213634/bug4213634.java nobug windows-all
javax/swing/JMenu/4692443/bug4692443.java nobug windows-all
javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java nobug windows-all,linux-all
javax/swing/JMenuBar/4750590/bug4750590.java nobug windows-all
javax/swing/JMenuItem/4171437/bug4171437.java nobug windows-all
javax/swing/JMenuItem/4654927/bug4654927.java nobug windows-all,linux-all
javax/swing/JMenuItem/6209975/bug6209975.java JBR-4894 windows-all
javax/swing/JMenuItem/6249972/bug6249972.java JBR-4894 windows-all
javax/swing/JMenuItem/8158566/CloseOnMouseClickPropertyTest.java nobug windows-all,linux-all
javax/swing/JPopupMenu/4634626/bug4634626.java nobug windows-all
javax/swing/JPopupMenu/4760494/bug4760494.java JBR-4894 windows-all
javax/swing/JPopupMenu/6415145/bug6415145.java nobug windows-all
@@ -70,9 +79,12 @@ javax/swing/JSpinner/TestJSpinnerFocusLost.java nobug windows-all
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922,8197552 macosx-all,windows-all,linux-all 8064922:macosx-all, 8197552:windows-all
javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java nobug windows-all
javax/swing/JTable/7124218/SelectEditTableCell.java JBR-4894 windows-all
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java nobug windows-all
javax/swing/JTextField/8036819/bug8036819.java nobug windows-all
javax/swing/JToolTip/4846413/bug4846413.java nobug windows-all
javax/swing/JToolTip/6219960/bug6219960.java nobug windows-all
javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all,windows-all
javax/swing/JTree/4927934/bug4927934.java nobug windows-all
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all,windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 8194128 macosx-all,windows-all
javax/swing/JWindow/ShapedAndTranslucentWindows/SetShapeAndClickSwing.java 8013450 macosx-all,windows-all
@@ -89,3 +101,4 @@ javax/swing/text/html/HTMLEditorKit/5043626/bug5043626.java nobug windows-all
javax/swing/text/JTextComponent/6361367/bug6361367.java nobug windows-all
javax/swing/text/View/8014863/bug8014863.java nobug windows-all
javax/swing/text/View/8156217/FPMethodCalledTest.java nobug linux-all
javax/swing/ToolTipManager/Test6256140.java nobug windows-all

View File

@@ -30,13 +30,11 @@ import quality.util.RenderUtil;
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.font.TextAttribute;
import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.awt.geom.Path2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.util.Map;
public class TextMetricsTest {
@@ -44,6 +42,7 @@ public class TextMetricsTest {
public void testTextBounds() throws Exception {
final Font font = new Font("Menlo", Font.PLAIN, 22);
BufferedImage bi = RenderUtil.capture(120, 120,
g2 -> {
String s = "A";
@@ -93,49 +92,4 @@ public class TextMetricsTest {
Assert.assertTrue(bnd.getX() == 0.0 && bnd.getY() == 0.0 &&
bnd.getWidth() == 0.0 && bnd.getHeight() == 0.0);
}
private static void checkStringWidth(Font font, FontRenderContext frc, String str) {
float width = (float) font.getStringBounds(str.toCharArray(), 0, str.length(), frc).getWidth();
float standard = new TextLayout(str, font, frc).getAdvance();
Assert.assertTrue(Math.abs(width - standard) < 0.1f);
}
private static void checkCalculationStringWidth(Font font, String text) {
AffineTransform affineTransform = new AffineTransform();
Map<TextAttribute, Object> attributes = null;
FontRenderContext frc = new FontRenderContext(affineTransform, true, true);
FontRenderContext baseFrc = new FontRenderContext(new AffineTransform(), true, true);
checkStringWidth(font, frc, text);
checkStringWidth(font.deriveFont(affineTransform), frc, text);
affineTransform.translate(0.5f, 0.0f);
checkStringWidth(font, frc, text);
checkStringWidth(font.deriveFont(affineTransform), baseFrc, text);
attributes = Map.of(TextAttribute.TRACKING, 0.5);
checkStringWidth(font.deriveFont(attributes), baseFrc, text);
attributes = Map.of(TextAttribute.KERNING, TextAttribute.KERNING_ON);
checkStringWidth(font.deriveFont(attributes), baseFrc, text);
attributes = Map.of(TextAttribute.LIGATURES, TextAttribute.LIGATURES_ON);
checkStringWidth(font.deriveFont(attributes), baseFrc, text);
}
@Test
// checking equals of calculation of string's width with two different approach:
// fast implementation inside FontDesignMetrics and guaranteed correct implementation in TextLayout
public void checkCalculationStringWidth() {
final Font font = new Font("Arial", Font.PLAIN, 15);
checkCalculationStringWidth(font,
"AVAVAVAVAVAVAAAAVVAVVAVVVAVAVAVAVAVA !@#$%^&*12345678zc.vbnm.a..s.dfg,hjqwertgyh}{}{}///");
checkCalculationStringWidth(font,
"a");
checkCalculationStringWidth(font,
"世丕且且世两上与丑万丣丕且丗丕");
checkCalculationStringWidth(font,
"\uD83D\uDE06\uD83D\uDE06\uD83D\uDE06\uD83D\uDE06\uD83D\uDE06\uD83D\uDE06\uD83D\uDE06");
}
}