From 399fa07bfac673a8846466b16c76549e329b55b8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 20 May 2023 10:17:50 +0100 Subject: gentoo auto-resync : 20:05:2023 - 10:17:50 --- .../files/openjdk-17.0.6-multihead-fix.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch (limited to 'dev-java/openjdk/files') diff --git a/dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch b/dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch new file mode 100644 index 000000000000..46f503dd8e0b --- /dev/null +++ b/dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch @@ -0,0 +1,24 @@ +From cfc9a881afd300bd7c1ce784287d1669308e89fc Mon Sep 17 00:00:00 2001 +From: Sergey Bylokhov +Date: Sat, 2 Jul 2022 00:25:20 +0000 +Subject: [PATCH] 8288854: getLocalGraphicsEnvironment() on for multi-screen + setups throws exception NPE + +Reviewed-by: azvegint, aivanov +--- + .../unix/classes/sun/awt/X11GraphicsEnvironment.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java b/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java +index 5c9d2a1b695..93f5eaf6656 100644 +--- a/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java ++++ b/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java +@@ -236,7 +236,7 @@ private synchronized void initDevices() { + throw new AWTError("no screen devices"); + } + int index = getDefaultScreenNum(); +- mainScreen = 0 < index && index < screens.length ? index : 0; ++ mainScreen = 0 < index && index < numScreens ? index : 0; + + for (int id = 0; id < numScreens; ++id) { + devices.put(id, old.containsKey(id) ? old.remove(id) : -- cgit v1.2.3